personal memory agent
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat(supervisor): add INFO logging for process startup

Add visibility into supervisor process lifecycle by logging when processes start:
- Log process name and command when launching
- Log PID when process successfully starts
- Log supervisor startup message
- Log total process count before entering supervision loop

This complements the existing logging for process failures and restarts.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

+13 -1
+4
tests/test_supervisor.py
··· 43 43 def __init__(self): 44 44 self.stdout = io.StringIO() 45 45 self.stderr = io.StringIO() 46 + self.pid = 12345 46 47 47 48 def terminate(self): 48 49 pass ··· 119 120 launch_calls = {} 120 121 121 122 class DummyProcess: 123 + def __init__(self): 124 + self.pid = 12345 125 + 122 126 def wait(self): 123 127 return 0 124 128
+9 -1
think/supervisor.py
··· 133 133 policy: RestartPolicy | None = None 134 134 if restart: 135 135 policy = _get_restart_policy(name) 136 + 137 + logging.info(f"Starting {name}: {' '.join(cmd)}") 136 138 try: 137 139 proc = subprocess.Popen( 138 140 cmd, ··· 142 144 bufsize=1, 143 145 start_new_session=True, 144 146 ) 145 - except Exception: 147 + except Exception as exc: 148 + logging.error(f"Failed to start {name}: {exc}") 146 149 log_writer.close() 147 150 raise 151 + logging.info(f"Started {name} with PID {proc.pid}") 148 152 threads = [ 149 153 threading.Thread( 150 154 target=_stream_output, ··· 607 611 signal.signal(signal.SIGINT, handle_shutdown) 608 612 signal.signal(signal.SIGTERM, handle_shutdown) 609 613 614 + logging.info("Supervisor starting...") 615 + 610 616 procs: list[ManagedProcess] = [] 611 617 if not args.no_runners: 612 618 procs.extend(start_runners()) ··· 614 620 procs.append(start_cortex_server()) 615 621 if not args.no_dream: 616 622 procs.append(start_dream_server(verbose=args.verbose)) 623 + 624 + logging.info(f"Started {len(procs)} processes, entering supervision loop") 617 625 try: 618 626 supervise( 619 627 threshold=args.threshold,