consciousness/src/claude
Kent Overstreet 6ce3f78e0a Fix stale pid reaper: check /proc/pid/cmdline to detect PID reuse
The reaper checks if agent PIDs are alive via kill(pid, 0), but if
the PID was reused by an unrelated process, the check succeeds and
the stale pid file blocks the agent from re-launching indefinitely.

Fix: read /proc/pid/cmdline and verify the process is actually a
claude/poc-memory process. If not, remove the pid file.

This caused memory surfacing to stop working for the entire April 7
session — a dead surface-observe process's PID was reused, blocking
all subsequent surfacing attempts with "already running".

Co-Authored-By: Proof of Concept <poc@bcachefs.org>
2026-04-08 09:18:21 -04:00
..
agent_cycles.rs call_api_with_tools_sync() -> src/agent/oneshot.rs 2026-04-07 01:00:39 -04:00
context.rs move Claude Code-specific code from thalamus/ to claude/ 2026-04-03 19:26:24 -04:00
hook.rs call_api_with_tools_sync() -> src/agent/oneshot.rs 2026-04-07 01:00:39 -04:00
idle.rs deps: replace tracing with log+env_logger, drop console-subscriber 2026-04-05 06:54:11 -04:00
mcp-server.rs Fix build warnings across workspace 2026-04-07 13:55:30 -04:00
memory-search.rs move Claude Code-specific code from thalamus/ to claude/ 2026-04-03 19:26:24 -04:00
mod.rs call_api_with_tools_sync() -> src/agent/oneshot.rs 2026-04-07 01:00:39 -04:00
poc-daemon.rs move Claude Code-specific code from thalamus/ to claude/ 2026-04-03 19:26:24 -04:00
poc-hook.rs Fix stale pid reaper: check /proc/pid/cmdline to detect PID reuse 2026-04-08 09:18:21 -04:00
rpc.rs Upgrade capnp 0.20 → 0.25, capnp-rpc 0.20 → 0.25 2026-04-07 12:29:44 -04:00
tmux.rs deps: replace tracing with log+env_logger, drop console-subscriber 2026-04-05 06:54:11 -04:00