An agent turn cut off at the output limit fails its step with no reason, and is not retried #101

Closed
opened 2026-09-28 00:50:24 -04:00 by cmoriarty · 1 comment
Owner

On production, run run_01M3K3S6TM44X7K9S2VH51RKHB (git-flow, cmoriarty/scratch#1) failed at agent.review[test]. The console gave no clear reason.

Its only model turn ended finish: "length" with input 14,268, reasoning 20,480, output 0. The model spent the whole output reservation thinking and was cut off before writing its verdict. Braid never looks at finish, so the step failed with only .osf/review/test.json is missing or empty. The attempt row's error_text is null.

Asked for:

  1. Name the cut-off. When a turn ends finish: length without doing the step's work, fail the step saying the model hit the N-token output limit while thinking and wrote nothing. Put that on the attempt too, so the console shows it.
  2. Retry once without thinking. Braid already has a no-thinking variant, used for handoffs. Re-prompt the cut-off turn once with it before failing.

Also find out whether the 20,480 comes from Braid or vLLM, and whether it can easily be raised.

On production, run `run_01M3K3S6TM44X7K9S2VH51RKHB` (git-flow, cmoriarty/scratch#1) failed at `agent.review[test]`. The console gave no clear reason. Its only model turn ended `finish: "length"` with input 14,268, **reasoning 20,480, output 0**. The model spent the whole output reservation thinking and was cut off before writing its verdict. Braid never looks at `finish`, so the step failed with only `.osf/review/test.json is missing or empty`. The attempt row's `error_text` is null. Asked for: 1. **Name the cut-off.** When a turn ends `finish: length` without doing the step's work, fail the step saying the model hit the N-token output limit while thinking and wrote nothing. Put that on the attempt too, so the console shows it. 2. **Retry once without thinking.** Braid already has a no-thinking variant, used for handoffs. Re-prompt the cut-off turn once with it before failing. Also find out whether the 20,480 comes from Braid or vLLM, and whether it can easily be raised.
Author
Owner

Shipped in the OpenSpec change output-limit-cutoff, now archived.

What changed

  • A turn that ends finish: length gets one retry. It is prompted once more in the same session, without thinking (nothink on vLLM), and asked to write the step's files now.
  • A second cut-off is named. The attempt closes as output_limit, and the step's failure reads "the model was cut off at the N-token output limit twice … raise Settings → Output reservation", followed by the file check's summary.

Verified on production. In run_01M3K3S6TM44X7K9S2VH51RKHB, agent.review.r2[test] was cut off again (20,472 reasoning tokens, 8 output). It got the retry, wrote its review and succeeded.

Where 20,480 came from. It is Braid's Output reservation default, not a vLLM limit; vLLM serves a 524,288 window. opencode sends max_tokens = min(reservation, OPENCODE_EXPERIMENTAL_OUTPUT_TOKEN_MAX ?? 32000). Production's reservation is now 32,000.

Found and fixed along the way: redoing a step could make the scheduler run a fan-out's key-less placeholder row as a real step (e6a3600).

Shipped in the OpenSpec change `output-limit-cutoff`, now archived. **What changed** - **A turn that ends `finish: length` gets one retry.** It is prompted once more in the same session, without thinking (`nothink` on vLLM), and asked to write the step's files now. - **A second cut-off is named.** The attempt closes as `output_limit`, and the step's failure reads "the model was cut off at the N-token output limit twice … raise Settings → Output reservation", followed by the file check's summary. **Verified on production.** In run_01M3K3S6TM44X7K9S2VH51RKHB, `agent.review.r2[test]` was cut off again (20,472 reasoning tokens, 8 output). It got the retry, wrote its review and succeeded. **Where 20,480 came from.** It is Braid's Output reservation default, not a vLLM limit; vLLM serves a 524,288 window. opencode sends `max_tokens = min(reservation, OPENCODE_EXPERIMENTAL_OUTPUT_TOKEN_MAX ?? 32000)`. Production's reservation is now 32,000. **Found and fixed along the way:** redoing a step could make the scheduler run a fan-out's key-less placeholder row as a real step (e6a3600).
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cmoriarty/braid#101
No description provided.