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.
Summary
killAgent()inbrowse/src/server.ts:471signalsagentProcess, butagentProcessis never assigned after the queue-based refactor.spawnClaude()writes tosidebar-agent-queue.jsonlinstead of spawning directly. The/sidebar-agent/killand/sidebar-agent/stopendpoints reset local state (status, timestamps) but the actualclaudesubprocess insidebar-agent.tskeeps 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.tspolls for it every 500ms during active processing, and kills the subprocess on detection.Found via sqry AST-based semantic code graph analysis.