Summary
killAgent() in browse/src/server.ts:471 signals agentProcess, but agentProcess is never assigned after the queue-based refactor. spawnClaude() writes to sidebar-agent-queue.jsonl instead of spawning directly. The /sidebar-agent/kill and /sidebar-agent/stop endpoints reset local state (status, timestamps) but the actual claude subprocess in sidebar-agent.ts keeps running.
Impact
Users clicking "Stop" in the sidebar UI see the agent marked as stopped, but the real claude process continues executing — consuming API tokens and potentially making changes.
Fix
PR #664 adds a cancel-file protocol: killAgent() writes a cancel file, sidebar-agent.ts polls for it every 500ms during active processing, and kills the subprocess on detection.
Found via sqry AST-based semantic code graph analysis.