personal memory agent
0
fork

Configure Feed

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

Add exit code logging to macOS screencapture manager

Log sck-cli exit codes to help debug health monitoring issues:
- is_running() logs once when process exit is detected
- stop() logs exit code after SIGTERM or SIGKILL

This helps diagnose whether sck-cli exits after early video stream
failures or hangs until the boundary timeout.

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

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

+13 -3
+13 -3
observe/macos/screencapture.py
··· 77 77 self.displays: list[DisplayInfo] = [] 78 78 self.audio: Optional[AudioInfo] = None 79 79 self._output_threads: list[threading.Thread] = [] 80 + self._exit_logged: bool = False 80 81 81 82 def start( 82 83 self, ··· 119 120 ] 120 121 121 122 logger.info(f"Starting sck-cli: {' '.join(cmd)}") 123 + self._exit_logged = False 122 124 123 125 try: 124 126 self.process = subprocess.Popen( ··· 272 274 try: 273 275 self.process.send_signal(signal.SIGTERM) 274 276 try: 275 - self.process.wait(timeout=5) 277 + exit_code = self.process.wait(timeout=5) 278 + logger.info(f"sck-cli stopped with exit code {exit_code}") 276 279 except subprocess.TimeoutExpired: 277 280 logger.warning("sck-cli did not exit cleanly, killing") 278 281 self.process.kill() 279 - self.process.wait() 282 + exit_code = self.process.wait() 283 + logger.info(f"sck-cli killed with exit code {exit_code}") 280 284 except Exception as e: 281 285 logger.warning(f"Error stopping sck-cli: {e}") 282 286 ··· 322 326 """ 323 327 if self.process is None: 324 328 return False 325 - return self.process.poll() is None 329 + exit_code = self.process.poll() 330 + if exit_code is not None: 331 + if not self._exit_logged: 332 + logger.info(f"sck-cli exited with code {exit_code}") 333 + self._exit_logged = True 334 + return False 335 + return True