refactor(container): track external runs with the task supervisor - #2603
Merged
jonathanKingston merged 2 commits intoSep 9, 2026
Merged
jonathanKingston merged 2 commits into
jonathanKingston merged 2 commits into
Conversation
Contributor
jonathanKingston
marked this pull request as ready for review
September 9, 2026 02:53
jonathanKingston
merged commit Sep 9, 2026
399e114
into
claude/copse-container-execution-nw4ln8
35 checks passed
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Container runs had separate, session-only lifecycle ownership. Register them as external tasks with the existing supervisor before image preparation, persist ownership and terminal outcomes, route cancellation through its external canceller, and cancel live runs during app shutdown. One AbortController replaces the separate stop-request ledger, including stops during checkout preparation.
Docker execution, attestation, credentials, egress, carry-out and runtime budget enforcement remain in the runner. External task adoption does not enforce queued-handler concurrency limits. Lost runtime handles fail on restart; no handler replays the run and explicit continuation remains required. Prompts and credentials are not stored in supervisor metadata.
Follow-up to #2348, targeting its feature branch. Contract documented in
docs/plans/thread-in-container.md.Validation: 61 focused lifecycle/reconciliation tests passed; the final 34-test service run also passed, including the regression for starting a new run while the previous outcome is still being saved; all 207 combined regression tests passed outside the sandbox. Typecheck, lint, formatting and dead-code checks passed in an isolated checkout rebased onto
origin/mainat4253dfd0f; all static check stages passed. The integrated full unit suite passed 8,953 tests outside the sandbox, and the final targeted run passed all 208 tests after adding the cancellation regression. Redundant sandboxed full-suite runs were stopped. Build passed. Focused Electron e2e (container-supervised-task.e2e.ts) passed; screenshot inspected: readable container task label, blocked state and cancel action in the Background tasks rail, then row removal after cancellation. Screenshot included.