yao/agent/sandbox/v2
Max c26d764857 fix(sandbox/v2): oneshot containers never cleaned up by watcher
Three related bugs caused oneshot containers to run indefinitely:

1. watcher.go: switch b.policy had no case OneShot, so even when the
   idle timeout fired, no remove action was emitted.

2. watcher.go + manager.go/recoverBoxes: idleTimeoutD was only set for
   Session and LongRunning on recovery; OneShot defaulted to 0, which
   caused the watcher to hit the `timeout <= 0` early-return and skip
   all checks entirely.

3. agent/sandbox/v2/options.go: same gap — opts.IdleTimeout == 0 guard
   only filled defaults for Session and LongRunning.

Fix: add DefaultOneShotIdleTimeout (30 min), wire it in recoverBoxes
and options.go, and add case OneShot → Remove in watcher.go.

Made-with: Cursor
2026-03-29 23:01:21 +08:00
..
claude fix(claude): update environment variable setup to use dynamic model values 2026-03-28 10:35:09 +08:00
testutils feat(sandbox/v2): enhance V2 sandbox integration and testing 2026-03-10 01:13:17 +08:00
types feat(claude): refactor runner and enhance request handling 2026-03-27 23:07:11 +08:00
yao feat(sandbox): enhance assistant directory handling and update RunPrepareSteps signature 2026-03-18 22:58:38 +08:00
init.go feat(sandbox/v2): enhance V2 sandbox integration and testing 2026-03-10 01:13:17 +08:00
lifecycle.go feat(robot): add workspace support to robot management 2026-03-28 16:59:52 +08:00
lifecycle_test.go feat(sandbox): enhance sandbox initialization and image management 2026-03-15 13:17:58 +08:00
options.go fix(sandbox/v2): oneshot containers never cleaned up by watcher 2026-03-29 23:01:21 +08:00
prepare.go feat(claude): refactor runner and enhance request handling 2026-03-27 23:07:11 +08:00
prepare_test.go feat(sandbox): enhance assistant directory handling and update RunPrepareSteps signature 2026-03-18 22:58:38 +08:00
runner.go feat(sandbox/v2): enhance V2 sandbox integration and testing 2026-03-10 01:13:17 +08:00
shell.go feat(sandbox/v2): enhance V2 sandbox integration and testing 2026-03-10 01:13:17 +08:00
stream.go feat(stream): introduce execute message handling for sandbox CLI actions 2026-03-20 22:48:36 +08:00
testutils_remote_test.go feat(tai): refactor Dial* functions and remove requireKubeConfig hard-fail 2026-03-12 15:44:24 +08:00
testutils_test.go feat(tai): refactor Dial* functions and remove requireKubeConfig hard-fail 2026-03-12 15:44:24 +08:00
testutils_wintest_test.go feat(tai): refactor Dial* functions and remove requireKubeConfig hard-fail 2026-03-12 15:44:24 +08:00
token.go fix(sandbox): update token generation and improve ClaudeRunner file handling 2026-03-15 17:22:44 +08:00