Instead of snapshotting assemble_api_messages() at construction, the
forked backend pushes step prompts and tool results into the agent's
context.entries and reassembles messages each turn. Standalone backend
(oneshot CLI) keeps the bare message list.
Co-Authored-By: Proof of Concept <poc@bcachefs.org>
Agent::fork() clones context for KV cache sharing with conscious agent.
AutoAgent runs multi-step prompt sequences with tool dispatch — used by
both oneshot CLI agents and (soon) Mind's subconscious agents.
call_api_with_tools() now delegates to AutoAgent internally; existing
callers unchanged.
Co-Authored-By: Proof of Concept <poc@bcachefs.org>
run_one_agent is meant to run within a long-running process (daemon,
CLI) — PID tracking is the caller's concern. Remove PidGuard, signal
handlers, setup_agent_state. Process management (scan_pid_files,
spawn_agent) stays for callers that need it.
Co-Authored-By: Proof of Concept <poc@bcachefs.org>