Skip to content

Agent turn ending with stopReason max_tokens is treated as completion; continue the session instead - #759

Merged
AdamFrisby merged 2 commits into
mainfrom
codeybox/a4309aaf
Nov 8, 2026
Merged

AdamFrisby merged 2 commits into
mainfrom
codeybox/a4309aaf

Conversation

@AdamFrisby

Copy link
Copy Markdown
Owner

Automated via CodeyBox — work item a4309aaf63254883ae2c41534a41ffcc

Initiated by CodeyBox operator


Co-Authored-By: CodeyBox noreply@codeybox.invalid
🤖 Generated with CodeyBox

AdamFrisby and others added 2 commits November 8, 2026 06:59
…stead of completing

When the model hits its per-turn output-token ceiling, the Devin ACP
shim re-prompts the SAME session with the shared truncation-continuation
wording, bounded by hot-reloadable Agents:Devin:MaxTokenContinuations
(default 8), recording each as a token_continuation envelope. A shared
OutputTokenLimit contract plus orchestrator nudge path applies the rule
generically (claude/codex/agy stop shapes). Exhaustion fails terminally
as output-limit-exhausted, never no-changes.

CodeyBox-Prompt-Revision: 1
Co-Authored-By: CodeyBox <noreply@codeybox.invalid>
The MaxTokenContinuations feature shipped CodeyBox:Devin in
appsettings.json with no matching CodeyBoxOptions property, so the
unbound-key gate rejected every host, and the new shim argv flags broke
the exact dispatch pin. Adds the Devin property alongside the other
agent sections and extends the pin to cover the bound and wording.

CodeyBox-Prompt-Revision: 1
Co-Authored-By: CodeyBox <noreply@codeybox.invalid>
@AdamFrisby
AdamFrisby merged commit 3a15025 into main Nov 8, 2026
@AdamFrisby
AdamFrisby deleted the codeybox/a4309aaf branch November 8, 2026 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant