Skip to content

refactor(terminal-bench): retire the legacy direct-agent sandbox lifecycle #4570

Open

Description

@yaoyu-33

The legacy Terminal-Bench direct-agent seed/verify lifecycle is still used by opencode_sandboxed_agent and terminus_2_sandboxed_agent. Track its retirement under #2763, as requested in the review of #3902.

The follow-up in #3902 separates sandbox ownership now: normal Resources sessions keep teardown in close, legacy verify owns immediate cleanup, and golden-patch verification owns its temporary sandbox in a bounded try/finally. This removes keep_sandbox_for_close without requiring the legacy migration to land first.

Remaining work:

  • Migrate or retire the two direct-agent callers and their configs; identify users and document the migration.
  • Remove the obsolete direct seed/verify ownership path and duplicate agent-side stop() calls. Avoid allocating an unused seed sandbox in golden mode; its teardown is now covered by feat(terminal-bench): support Pi, Codex, OpenCode and OpenClaw #3902.
  • Preserve standalone golden-patch verification with owner-scoped, bounded try/finally cleanup and meaningful cancellation/failure tests.
  • Validate migrated model/tool/verifier rollouts and cleanup before removing compatibility code.

Removing single_agent_turn_legacy alone does not remove these callers: that EnvironmentServer component adapts flat rows over shared sessions and is distinct from the direct-agent lifecycle.

Implemented ownership repair: c2a6dec84 removes the flag, bounds golden cleanup, and closes a distinct legacy seed alongside the golden sandbox. The remaining work above is caller migration and retirement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions