mirror of
https://github.com/hanzoai/python-sdk.git
synced 2026-11-23 04:31:13 +00:00
Once an auto-backgrounded process exited, its tracking record was deleted, so every later exec lookup for it - wait, logs, ps by proc_id and kill - raised NotFoundError even though the process had completed normally and its captured output existed in the log file. ProcessManager now moves finished processes into a bounded completed registry (default 100 records) instead of dropping them, and the exec tool's wait/logs/ps/kill actions consult live and completed records through get_process_info(). kill on a finished process now reports already-terminated with its exit code instead of NOT_FOUND; genuinely unknown process IDs still raise NOT_FOUND. The added tests fail without the fix (the completed record is gone and the tool returns NOT_FOUND) and pass with it.