Skip to content

Feat/sandbox transport injection#1291

Draft
srtab wants to merge 10 commits into
feat/sandbox-filebackend-scratchpadfrom
feat/sandbox-transport-injection
Draft

Feat/sandbox transport injection#1291
srtab wants to merge 10 commits into
feat/sandbox-filebackend-scratchpadfrom
feat/sandbox-transport-injection

Conversation

@srtab

@srtab srtab commented Jun 5, 2026

Copy link
Copy Markdown
Owner

No description provided.

srtab and others added 10 commits June 3, 2026 17:32
Address review feedback on the sandbox-transport-injection branch:

- Guard the run-scoped sandbox client teardown in set_runtime_ctx so a
  transport-close error can't mask the in-flight exception, and always
  reset the contextvar.
- Fold protected_branch_fallback_source into the frozen PublishOutcome,
  dropping the mutable publisher side-channel read by both callers.
- Remove the dead GitManager query methods (is_dirty / get_diff /
  has_unpushed / remote_branches) superseded by status_snapshot.
- Add status_snapshot error-branch tests; re-target the empty-results
  and no-index hard-error tests onto the surviving helpers.
- Fix the "read once" client comments (BaseManager is a second reader),
  annotate GitMiddleware.sandbox_client, and flag the possibly orphaned
  container in _session_exists.
…andle (#1290)

* feat(sandbox): add run_commands to SandboxFileBackend

* refactor(git): thread bound sandbox backend through git/publish path

* refactor(sandbox): run bash through the bound backend; thread it to subagents

* test(sandbox): guard that the backend never advertises execution

* feat(sandbox): classify bash failures as transient or permanent

The bash tool degraded every transport/HTTP error to the same generic
"sandbox call failed" string, so the agent could not tell a momentary
blip (worth one retry) from a non-recoverable rejection (stop using the
tool). Introduce a BashFailure enum that maps httpx errors to TRANSIENT
(no response, or a retryable status: 408/425/429/5xx) vs PERMANENT
(auth, session-gone, bad-request, not-implemented), and return distinct
agent-facing guidance for each. The transient message is byte-stable so
the system prompt's "two identical error strings => stop" backstop still
fires when a retry fails the same way.

Non-httpx failures (malformed 200 body, unbound-backend RuntimeError)
are left to propagate as loud wire/programming bugs.
@srtab srtab self-assigned this Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant