Repository navigation
Conversation
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.
Fixes #172
The Codex parser marked a tool call as interrupted whenever its output contained "rejected by user" or "aborted by user" anywhere, and it checked that before reading the exit code header. So a passing
npm testwhose mocha output listed "returns 403 when the upload is rejected by user", or anrg -n 'rejected by user' srcthat exited 0, was recorded as interrupted. When that command was the task's check, the task was thrown away with "no check ran after the last edit".Codex writes these markers in a fixed shape, and never next to a command's real output. A declined approval becomes
ToolError::Rejected("rejected by user"), which Codex normalizes toexec command rejected by userorpatch rejected by user, and that string is the whole tool output, with no exec header. A call the user aborts getsWall time: 4.2 seconds\naborted by userforexec_commandandaborted by user after 2.5sfor every other tool. The parser now matches exactly these outputs and nothing else, so any output that carries an exit code keeps it.Other rejections Codex sends through the same path, such as the automatic approval reviewer's denial, are left as they were. They are not user interruptions and were never matched before either.
To reproduce, I fed
trodden ingest --agent codex --endeda rollout with anapply_patchtosrc/upload.jsfollowed bynpm testexiting 0 with the mocha output above, using a scratchTRODDEN_HOME. Before the fix the task was rejected with "no check ran after the last edit". After it, the same rollout learns a procedure: editsrc/upload.js, then check withnpm test.New tests cover passing and failing commands whose output mentions a rejection or an abort keeping their exit code (this one fails on the old matcher), and each of Codex's real rejection and abort outputs still being recorded as interrupted.