Repository navigation
Description
Problem
An answer that runs out of output ends with a dead-end sentence: the last assistant message stopped for length renders the notice "The response reached its output limit." and nothing else (ui-packages/web/src/features/conversation/use-conversation/messages.ts:74-76). There is no Continue anywhere in the conversation UI — the reader's only repair is to invent a "please continue" prompt themselves, and the cut text stays cut unless they do.
The state is not exotic. Every model added as "Another OpenAI-compatible service" runs with maxTokens: 4_096 (ui-packages/web/src/core/models/byok/runtime.ts:55), so on a reader's own key, a translation or a long summary stops routinely at the cap (#199 tracks the cap's value itself). The product already treats the partial as worth keeping — it is copyable (messages.ts:86) — but offers no way to finish it.
The continuation primitive exists and is already exercised, just not for the reader: recovering from context overflow calls agent.continue() after summarizing (ui-packages/web/src/features/conversation/use-conversation/compaction.ts:90-101), and messages queued during a run are steered into a finished turn (use-conversation/agent-session.ts:142-146). A length stop is the one ending that needs no new message at all, and it is the only one with no path forward.
Proposal
- When the last assistant message of a run stopped for
length, offer a Continue control beside the "output limit" notice. - One tap resumes the run with the agent's own continuation (
agent.continue()), adding no synthetic user message to the transcript. - Stop works during a continuation as during any reply.
Goal
After this, an answer that hits its output limit ends with a working Continue that finishes it in one tap; the reader never has to type a continuation prompt to see the rest of an answer.
Verification
grep -rE "Continue" ui-packages/web/src/features/conversation/ | grep -v runContinues
pnpm --filter -reader/web test --silent -- src/shell/conversation-panel.integration.test.tsx
pnpm checkRefs
- ui-packages/web/src/features/conversation/use-conversation/messages.ts:74-76 — the length stop's terminal notice
- ui-packages/web/src/core/models/byok/runtime.ts:55 — the 4,096-token cap that makes the state routine on custom endpoints
- ui-packages/web/src/features/conversation/use-conversation/compaction.ts:90-101 —
agent.continue()already in use for overflow recovery - ui-packages/web/src/features/conversation/use-conversation/agent-session.ts:142-146 — turn-end steering, the machinery a continuation joins
- Let a custom endpoint answer past 4,096 tokens — every model added as 'Another OpenAI-compatible service' is hard-capped at 32–94× under the free allowance today, and nothing shows or lifts the ceiling #199 (open) — the cap's value on custom endpoints; this issue is the repair path that helps whatever the cap is
- Let readers regenerate an assistant reply in place instead of retyping the question #42 (closed) — re-rolling a failed reply instead of retyping; finishing a cut-off one is its sibling on the output side
Activity
bencode commentedon Oct 26, 2026
Independent review — posted by the scheduled issue-reviewer loop, independent of the authoring session. Audited against
main@1d515f9(2026-10-26, i.e. after PR #224).Evidence audit: core anchors hold; one citation drifted by events.
use-conversation/messages.ts:74–76— the length stop's terminal notice confirmed verbatim ("The response reached its output limit."), andcopyableincludeslengthat :86, exactly as cited.compaction.ts:100—agent.continue()confirmed as the existing overflow-recovery primitive (cited :90–101, guard block starts :85).runContinues(messages.ts:92–94) already classifies alengthstop as a run that continues — the seam a Continue control joins exists verbatim.agent-session.tsat :151–154 (cited :142–146; ±6 lines of drift from Say what happened: own-key fallback, failed background replies, delete-project counts, legacy Office files, and no 4,096 cap on custom endpoints #224's reshaping — substance unchanged).byok/runtime.ts:55 maxTokens: 4_096no longer exists. PR Say what happened: own-key fallback, failed background replies, delete-project counts, legacy Office files, and no 4,096 cap on custom endpoints #224 (aacecc0) landed four minutes after this issue was filed: today :56 readsmaxTokens: 0with an options passthrough at :72, and Let a custom endpoint answer past 4,096 tokens — every model added as 'Another OpenAI-compatible service' is hard-capped at 32–94× under the free allowance today, and nothing shows or lifts the ceiling #199 is closed as implemented. The Problem's "routine on custom endpoints" premise is therefore historical — length stops now arise from the model/server's own ceiling. The core gap is untouched: a length stop remains the only ending with no repair path. (Body edited only in the Verification block, per policy; this paragraph is the corrected citation record.)Duplicates: none — #42 (closed) is the input-side sibling; nothing open or closed offers a length-stop continuation.
Sensor + Verification block repaired (logged here per policy): lint ✓; verify ✓ passed on unmodified main — a false pass (the block runs existing tests; no Continue control exists anywhere in the conversation feature). A naive
grep Continueanchor also false-passes by matching the existingrunContinuesidentifier — caught during this audit. Final anchor:Re-linted ✓; verify now ✗ on main for the right reason.
Sharpening: (a) offer Continue only when the length-stopped message is the last of the last turn — a superseded mid-history length stop must not offer it; (b) the continuation rides the existing
turn_end/runContinuesseam — afteragent.continue()the turn ends again and queued-message steering already handles it, so no new run-state machinery is needed; (c) Stop during continuation is theabortedpath that already exists.Verdict: valid — stays open.
bencode commentedon Oct 27, 2026
Closing: since #199 an added model sends no output ceiling of its own, so a reply stops only at the model's own limit, which reading rarely reaches. When it does, asking the assistant to continue already works; a Continue button would duplicate that.