odysseus/src/agent_tools
Léo 6cda92080c fix(browser): stop treating a missing cmdline as proof the daemon exited
_terminate_owned_daemon() read /proc/<pid>/cmdline and, on FileNotFoundError,
unlinked the pid file on the stated assumption that "the daemon may have
exited". Off Linux that file is always missing, so the branch always fired:
the pid file of a live daemon was deleted and the daemon itself never killed.
_owned_daemon_exists() swallowed the same error and therefore always returned
False, which is precisely the state its own docstring warns about, since a
close against an unrecognised session can bootstrap a fresh daemon and wait on
its browser indefinitely.

Demonstrated on macOS before the change: a pid file holding a live pid is
removed by _terminate_owned_daemon() and _owned_daemon_exists() reports False.
After it, the file survives and the daemon is reported present.

_process_command_line() now returns None for "this host cannot tell" and
_process_is_alive() answers the separate question of whether the pid exists.
Without procfs we decline to kill a process we cannot confirm is ours, and we
only forget a pid file once the pid is genuinely gone. Linux behaviour is
unchanged: the command-line identity check still gates both paths.
2026-09-29 16:27:22 +02:00
..
__init__.py Squash Odysseus development history 2026-09-11 06:04:19 +00:00
admin_tools.py Consolidate Odysseus agent harness and tool contracts 2026-09-17 10:07:40 +00:00
bg_job_tools.py feat(agent): add manage_bg_jobs tool to inspect and kill background bash jobs (#4577) 2026-06-19 00:28:22 -07:00
coding_tools.py Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00
document_tools.py Consolidate Odysseus agent harness and tool contracts 2026-09-17 10:07:40 +00:00
filesystem_tools.py fix workspace write path disclosure 2026-09-18 14:36:09 +00:00
interaction_tools.py Merge dev into main for testing 2026-06-28 14:07:23 +00:00
media_tools.py Consolidate Odysseus agent harness and tool contracts 2026-09-17 10:07:40 +00:00
model_interaction_tools.py Consolidate Odysseus agent harness and tool contracts 2026-09-17 10:07:40 +00:00
ocr_engine.py Squash Odysseus development history 2026-09-11 06:04:19 +00:00
session_tools.py Squash Odysseus development history 2026-09-11 06:04:19 +00:00
subprocess_tools.py fix(tools): constrain Python environment namespace mount 2026-09-23 00:10:50 +01:00
web_tools.py fix(browser): stop treating a missing cmdline as proof the daemon exited 2026-09-29 16:27:22 +02:00