[Fix] Shell exit codes are always missing from task transcripts and the completion check - #3080
Merged
Merged
Conversation
…he completion check
Contributor
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.
Problem
OpenCode's shell tool (1.18, which the worker pins) reports a command's exit code as
metadata.exit.extractOpenCodeExitCodein the harness readsmetadata.exitCode,metadata.code, and the same two keys on the output object, so every shell result is recorded with a null exit code. On the nightly deployment, 0 of 3,283 shell results in the last 24 hours carry one. The shell tool's own<shell_metadata>block only reports timeouts and aborts, so the code is not recoverable from the output text either.This matters more since #3071: the completion check holds the agent's "tests pass" claim against the recorded commands, and without exit codes it can only go by the output tail.
Change
Read
metadata.exitas well, ahead of the legacy keys. One line plus a test that feeds the 1.18 metadata shape through the harness and checks the exit code reaches the completion check.Validation
pnpm lint:fast,pnpm check-types:fast.