Skip to content

Show the quiet terminal notice when a task's sandbox is gone - #383

Closed
minutechreview wants to merge 1 commit into
useagenthq:mainfrom
minutechreview:fix/terminal-sandbox-gone-313
Closed

minutechreview wants to merge 1 commit into
useagenthq:mainfrom
minutechreview:fix/terminal-sandbox-gone-313

Conversation

@minutechreview

@minutechreview minutechreview commented Oct 25, 2026 •

Copy link
Copy Markdown

terminalFailureNotice only treated a missing sandbox as idle when the message matched not found. Providers now throw SandboxNotFoundError, whose message is "The sandbox does not exist", so an expired sandbox printed a red [UseAgent] The sandbox does not exist line in the terminal pane.

  • backend/src/runs/terminal.ts: check for SandboxNotFoundError (by instanceof, or by error.name in case the error crosses a package copy) before the text check, and return the "no live sandbox yet" notice.
  • backend/src/runs/terminal.test.ts: replace the hand-written new Error("Sandbox abc not found") input with new SandboxNotFoundError(), and assert the notice is not the red error line. The existing "connection timed out" case still prints as an error.

Testing:

  • bun test src/runs/terminal.test.ts: 2 pass. With terminal.ts from main, the updated case fails with Received: "\r\n\u001B[31m[UseAgent] The sandbox does not exist\u001B[0m\r\n".
  • backend tsc --noEmit (TypeScript 5.9.3) is clean.

Fixes #313


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

Signed-off-by: minutechreview <141821420+minutechreview@users.noreply.github.com>
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show the quiet terminal notice when a task's computer is gone

2 participants