You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6739059
Browse filesBrowse the repository at this point in the historyBrowse files
fix(headless): keep going when a reply hits the output limit (#6379)
A model reply that stopped at the output-token cap while writing a tool
call came back with no complete call, and the runner took that as the
final answer: the turn ended "completed" with nothing done. Background
tasks that wrote one large script (a whole Blender scene) finished this
way with an empty report.
Every provider now reports a cut-off reply. A call it was writing gets an
error saying to split the work, and a reply with no complete call is
dropped; the next step is told to send less. Three cut-off replies in a
row fail the turn with output_limit, which Workbot and task reports
explain in plain words. The desktop tool now suggests building Blender
scenes in several short scripts, or with blender -b for long builds.
Signed-off-by: Jalil <reachjalil@gmail.com>
Copy file name to clipboardExpand all lines: ee/apps/headless-runner/README.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -73,6 +73,7 @@ Turn status is one of `queued`, `running`, `completed`, `failed`, `interrupted`
73
73
-`turn_timeout`
74
74
-`max_steps_exceeded` (only with `HEADLESS_MAX_STEPS` set)
75
75
-`stuck_repeating`
76
+
-`output_limit` (the model's replies stopped at `HEADLESS_MAX_OUTPUT_TOKENS` three times in a row)
76
77
-`runner_restarted`
77
78
-`credentials_refresh` (an `interrupted` turn waiting to be resumed with a fresh MCP token)
78
79
-`step_crash_loop` (step mode: one step kept dying, see [Step mode](#step-mode))
@@ -316,7 +317,7 @@ Nothing on celld changes, so pointing the URLs back is the rollback.
316
317
|`HEADLESS_MAX_STEPS`|`0`| Model calls per turn. `0` means no limit: a long task ends with its answer, Stop, or the stuck check |
317
318
|`HEADLESS_TURN_TIMEOUT_MS`|`0`|`0` means no limit. Otherwise at least `10000`, applied to each stretch between credential refreshes |
318
319
|`HEADLESS_CREDENTIAL_REFRESH_MS`|`3000000`| A turn with an MCP token pauses between steps after this long so the caller resumes it with a fresh one. Keep it under the token lifetime (60 minutes for Den) |
319
-
|`HEADLESS_MAX_OUTPUT_TOKENS`|`8192`| Output cap per model call: Anthropic `max_tokens`, OpenAI `max_completion_tokens`|
320
+
|`HEADLESS_MAX_OUTPUT_TOKENS`|`8192`| Output cap per model call: Anthropic `max_tokens`, OpenAI `max_completion_tokens`. A reply cut off there never ends a turn: a call it was writing gets an error, a reply with no complete call is dropped, and the next step asks for less|
320
321
|`HEADLESS_CONTEXT_CHAR_BUDGET`|`400000`| Past this, the oldest whole turns are left out, down to 60% of it (see [Long conversations](#long-conversations)). A turn that outgrows it alone replaces its oldest large tool outputs with a short note, in blocks of eight |
321
322
|`HEADLESS_SYSTEM_PROMPT`| built-in ||
322
323
|`HEADLESS_FILES`|`off`| Saved files: `off`, `disk`, or `s3`. Only sessions created with `files: true` use them. Off means the file routes answer `files_not_configured`|
assert.deepEqual(transcript(store,"hs_cut_off","m1").filter((message)=>message.role==="assistant").map((message)=>message.text),["Built it in parts."])
conststreamInterrupted=()=>newModelError("model_stream_interrupted","The AI gateway stream ended early.",true)
218
220
221
+
/** The error a call gets when the reply stopped at the output-token cap while writing it. */
222
+
exportconstCUT_OFF_CALL=
223
+
"Your reply reached the output limit while writing this call, so it was cut off and not run. Send less in one call: split long code, scripts or documents into parts (for example, write a file in several pieces, then run it)."
224
+
225
+
/** Marks a step that stopped at the output-token cap; a call left unparsable by the cut gets `CUT_OFF_CALL`. */
0 commit comments