Repository navigation
Description
Problem / summary
(measured) After the user stops a chat turn, the timeline labels that turn You stopped this response (or You stopped after …). There is no Resume action that continues the same turn. The only way to go on is to type a new message, often "continue".
(measured) A Continue / Continue in a copy action already exists, but only for imported CLI / History sessions, not for a turn the user just stopped in a BibCode chat.
(measured) Diagnosis is static only, at the SHA below. No app, test, or provider process was run.
Current behavior
(measured) Verified at be03142dcd9f14378d4357d83ad65d2cf5af513a (origin/main as of 15 November 2026, 19:21 America/Buenos_Aires, merge of PR #379). Every path:line below refers to this SHA.
- The timeline detects the latest turn with
state === "interrupted"and uses that only to choose the fold label You stopped this response / You stopped after {duration} (MessagesTimeline.logic.ts:718–745). Coverage:MessagesTimeline.test.tsx:1396andMessagesTimeline.logic.test.ts. (measured) - A workspace search of the chat UI finds no Resume control for that interrupted turn. (measured)
ComposerHistoryMenu.logic.tsoffers Continue (action: { kind: "continue", mode: "resume" }) only when building a History / imported-session row (:63–96). That path is the History feature from #141, not a stopped in-app turn. (measured)- Codex and Claude drivers implement
compact. Cursor and OpenCode do not; they inherit the defaultProviderCompactionStart::NotStarted(provider_runtime.rs:454–459, Codex:15243, Claude:20017,impl ProviderDriver for CursorDriverat:15670,OpenCodeDriverat:16208). (measured) Compaction is related context for Cursor, not the resume action itself.
(inferred) Sending a new user message after a stop starts a new turn. There is no provider-level "resume the interrupted turn" entry point in the UI.
Proposed fix
(inferred) Add a user-visible Resume action on the latest interrupted turn (timeline and/or composer) that asks the still-running provider session to continue without the user typing "continue".
Provider behavior, following the T3 approach and adapted to BibCode's drivers:
- Claude: resume from the last valid history entry after stripping interruption markers.
- Codex and OpenCode: native resume with an empty provider prompt (no fabricated user text).
- Cursor: native resume, as in T3's Cursor resume work.
- If a provider cannot resume, show a clear unsupported / failed state. Do not silently send a "continue" user message as the success path.
If this adds a new RPC, provider method, or persisted resume cursor, an approved design note (docs/plans/YYYY-MM-DD-resume-stopped-turn-design.md) is required before implementation.
Goals and non-goals
Goals:
- After stopping a Claude, Codex, OpenCode, or Cursor turn, the user can resume that work with one action and no typed "continue".
- Resume is explicit (a click), not automatic.
- Providers that cannot resume fail visibly.
Non-goals:
- Auto-resuming after every stop.
- Changing History / imported-session Continue from #141.
- Fixing lost resume-state delivery loops (#19, closed).
- Manual Cursor compaction as a separate feature (pingdotgg/t3code#31203); only include it if Cursor resume depends on it.
- Grok resume, unless it falls out of a shared interface and can be tested the same way.
Acceptance criteria
P0:
- Stopping a turn in a Claude, Codex, OpenCode, or Cursor chat, then choosing Resume, continues that work without a new user message whose text is "continue". Hermetic server tests cover each of those four drivers (fixtures, not live CLIs).
- A provider that cannot resume returns a distinct unsupported or failed outcome, shown in the UI, and does not enqueue a fake user "continue" message.
- The existing interrupted-turn fold labels in
MessagesTimeline.logic.test.ts/MessagesTimeline.test.tsxstill pass, and a new UI test asserts the Resume action is offered only for the latest interrupted turn (not for completed or older interrupted turns). -
cargo fmt --all --check,cargo clippy --workspace --all-targets -- -D warnings, focused Rust and web tests,vp check, andvp run typecheckpass. Contract changes, if any, includevp run check:contractsand committed fixtures.
P1:
- Resume is not offered after the session is gone, resume is refused, or the thread has moved on to a newer turn. History Continue for imported sessions is unchanged.
- If a new RPC or architecture is introduced, the approved design note ships in the same PR, and living architecture docs are updated.
- UI.md and
vercel-react-best-practicesreviews are recorded for the web change. Testing runbooks are reviewed and remain accurate or are updated. - Profiler coverage line in the delivery report. Prompt text and transcript content never reach profiler records or logs.
P2:
- Keyboard access and an accessible name for the Resume control.
- Cursor compact-on-demand stays out of this issue unless resume cannot ship without it.
Open questions
- (inferred) Should Resume live on the interrupted-turn fold, in the composer, or both?
- (guess) For Claude, is stripping interruption markers and resuming history enough on BibCode's stream-json CLI path, or is a different control request required? Confirm against the targeted Claude version.
- (inferred) If the provider session has already exited after the stop, should BibCode refuse Resume, or start a new session and retry?
- (inferred) Does Cursor resume need compact support in
CursorDriver, or is that a later issue?
Duplicate check
Searched open and closed issues (titles and body search for resume / continue / interrupted / "stopped turn" / "stopped this response" / "resume a stopped").
- Not a duplicate of #19 (closed): that was a retry loop after a session lost durable resume state.
- Not a duplicate of #141 (closed): History Continue for imported Claude Code terminal sessions.
- Not a duplicate of #215 (closed): scroll "resume at end".
- Compaction issues #163, #160, #166, #164 (all closed) are about context compaction, not resuming a stopped turn.
- No open or closed issue asks for a Resume action on a user-stopped in-app turn.
Reference
Similar changes in T3 Code: pingdotgg/t3code#36526 (native resume for Claude / Codex / OpenCode) and pingdotgg/t3code#36918 (Cursor resume). Related, not in scope unless required: pingdotgg/t3code#31203 (manual Cursor compaction).
Activity
mubeda commentedon Nov 18, 2026
Closing as not planned for now. Three implementations were written and reviewed in the current batch; none reached a state safe to ship, and the reasons are about where a resume sits in the delivery model, not about one bug.
What was tried
thread.turn.startmarkedresumeOfwith no text, admitted only for the latest interrupted turn of an idle session, then delivered, retried and recovered like any message. This removed the special route (the server change became smaller than the code it deleted) and is the right shape. The last review still traced these in it:Why not fix those four and ship
Each round of this issue fixed its findings and produced new ones of the same kind. A wrong resume sends an empty prompt into the wrong conversation state or binds a turn to the wrong message, which damages a thread's history; a missing Resume button costs the user one typed "continue". With correctness ranked above convenience in this repository, the feature should not go in on a third partial pass inside a 15-issue batch.
Workaround, unchanged: after Stop, send "continue". The provider keeps its conversation, so the work picks up from where it stopped.
If this is reopened: start from the third design. Its code was not pushed; the description above is the record of it. The admission rule needs to be "no message of any state after the stopped turn, and the provider cursor of that turn still exists", the resume needs a delivery key, and the row needs the ordinary message controls. It deserves its own pull request and a packaged run against each provider.