Skip to content

Require runner output once the run has exited - #34

Merged
jacobprall merged 3 commits into
mainfrom
codex/issue-25-required-output-recovery
Oct 28, 2026
Merged

jacobprall merged 3 commits into
mainfrom
codex/issue-25-required-output-recovery

Conversation

@starmorph

@starmorph starmorph commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

When the exec stream reported an exit but downloading the output file failed, the error became empty output. classifyRun then reported a non-retryable agent_error, so a completed, paid investigation was thrown away.

run-investigation.sh always writes the output file before it exits, so once there's an exit status the download is required. The host now retries it up to three times in the same Sandbox, so the model run isn't repeated. If it still fails, it throws an infrastructure error with the transport cause, which investigate retries. Runs with no exit status (aborted or lost stream) keep best-effort reads.

The original version of this PR also re-derived timeout classification inside sandbox.ts and raced the SDK's download. That was trimmed: the classification duplicated classifyRun, and the SDK token-phase timeout is tracked upstream for #26.

Fixes #25.

starmorph and others added 3 commits October 27, 2026 10:05
run-investigation.sh always writes the output file before it exits, so after
an exit status a failed download is a transport error. Retry it in the same
Sandbox and throw an infrastructure error if it stays unavailable. This drops
the duplicated timeout classification and the SDK token-phase race, which is
tracked upstream for #26.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jacobprall jacobprall changed the title Recover required investigation output before retrying work Require runner output once the run has exited Oct 28, 2026
@jacobprall
jacobprall merged commit 611f458 into main Oct 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

[P2] Preserve required-output transport errors and recover completed answers

2 participants