Spaces:
Chris4K
/
Paused

akseljoonas Claude Opus 4.6 commited on
Commit
3c91fc8
Β·
1 Parent(s): e229826

feat: kill sandbox processes and cancel HF jobs on user interrupt

Browse files

When the user clicks cancel, long-running sandbox commands and HF jobs
now actually stop instead of running to completion in the background.

- Sandbox server: track PIDs with Popen, add /api/kill endpoint
- Sandbox client: add kill_all() method
- HF jobs: track running job IDs in session, cancel on interrupt
- Agent loop: cleanup on cancel in both run_agent and exec_approval
- exec_approval: add cancellation support (was completely missing)
- Sandbox title: set descriptive name instead of inheriting template

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

5 files changed +190 -30
Files changed (5)
agent/core/agent_loop.py+104-14
agent/core/session.py+1
agent/tools/jobs_tool.py+8
agent/tools/sandbox_client.py+48-10
agent/tools/sandbox_tool.py+29-6