Skip to content

[Bug]: "Edit from here" is missing on most prompts on stable 0.0.45 (checkpoint race, same root as #14216) #15295

Closed

Description

@netopolit

Before submitting

Area

apps/server (cause), apps/web (symptom)

Steps to reproduce

  1. T3 Code 0.0.45 stable (V1 orchestrator), Anthropic provider.
  2. Run several turns in one thread.
  3. Look for Edit from here beneath each sent prompt.

Timing-dependent, but frequent: 12 of 16 completed turns in the thread measured below.

Expected behavior

Edit from here is offered beneath every sent prompt, as docs/user/composer.md ("Edit an earlier prompt") describes.

Actual behavior

The action appears beneath only some prompts. The others have no rewind action at all, although every one of those turns has a ready checkpoint.

Cause. Same race as #14216:

  • On turn.completed, CheckpointReactor reads the thread projection before ProviderRuntimeIngestion has committed the turn's final assistant message, finds no assistant message for the turn, and stores the fallback assistantMessageId assistant:<turnId> (apps/server/src/orchestration/Layers/CheckpointReactor.ts:335-340 at v0.0.45).
  • The client derives revertTurnCount only from a checkpoint whose assistantMessageId matches a message in the timeline (buildRevertTurnCountByUserMessageId in apps/web/src/components/chat/MessagesTimeline.logic.ts). The fallback id matches nothing, so RevertUserMessageButton is not rendered for that prompt.

So #14216's broken link also removes rewind, not just the diff card.

Impact

Major degradation or frequent failure

Version or commit

0.0.45 (stable)

Environment

macOS desktop app, Anthropic provider, provider CLI 2.1.288 (#14216 ties the race to CLI 2.1.280 and later).

Logs or stack traces

From server.trace.ndjson and orchestration_events, one thread, 17 turns. "Read − save" is the end of the reactor's resolveThreadDetail span minus the end of the first orchestration.command.thread.message.assistant.* span for that turn. Negative means the reactor read the thread before the reply was saved.

turn  read − save   stored assistantMessageId   Edit from here
  1     -2.4 ms     assistant:<turnId>          missing
  2     -6.5 ms     assistant:<turnId>          missing
  3     -4.2 ms     assistant:<turnId>          missing
  4     -4.4 ms     assistant:<turnId>          missing
  5     -4.2 ms     assistant:<turnId>          missing
  6     +4.7 ms     real message id             present
  7     -3.7 ms     assistant:<turnId>          missing
  8    -24.5 ms     assistant:<turnId>          missing
  9    +25.2 ms     real message id             present
 10     +6.9 ms     real message id             present
 11     -4.9 ms     assistant:<turnId>          missing
 12       n/a       assistant:<turnId>          missing   (interrupted, no assistant message)
 13     -4.2 ms     assistant:<turnId>          missing
 14    +19.2 ms     real message id             present
 15     -2.5 ms     assistant:<turnId>          missing
 16     -4.5 ms     assistant:<turnId>          missing
 17     -6.0 ms     assistant:<turnId>          missing

The sign of the gap predicts the stored id in 16 of 16 completed turns. The rate here (12 of 16) is well above the roughly 1 in 6 reported in #14216.

Workaround

None on 0.0.45. The action still works on the turns that did not hit the race.

Notes

  • V2: I read the source at v0.0.46-nightly.20261003.2632 but did not run it. There the action is keyed by run identity (deriveRevertTurnCountByUserMessageId in apps/web/src/session-logic.ts matches a prompt's runId to a ready checkpoint) and the two V1 reactors are gone, so this race should not produce the symptom on V2.
  • Why file it anyway: the current stable release still ships V1, the symptom is not documented anywhere, and it costs users rewind on most turns.
  • Possible V1 fix: the client-side fallback suggested in [Bug]: Inline turn diff card is missing or attached mid-turn when a Claude turn ends quickly #14216 (use the last assistant message of the checkpoint's turnId) would also restore the action, including for checkpoints already stored with the fallback id.

Activity

  1. juliusmarminge commented on Oct 3, 2026

    @juliusmarminge
    Member

    Note

    Grok responding on behalf of Julius.

    Triage

    Thanks @netopolit for the timing table, which makes the race very clear. This matches the V1 checkpoint race already reported in #14216.

    What's happening

    • On stable 0.0.45 (6c8fed35), CheckpointReactor reads the thread projection when turn.completed arrives. If the final assistant message isn't committed yet, it stores assistant:<turnId> (apps/server/src/orchestration/Layers/CheckpointReactor.ts, lines 335–340).
    • Edit from here is only offered when that stored id matches an assistant message in the timeline (buildRevertTurnCountByUserMessageId in apps/web/src/components/chat/MessagesTimeline.logic.ts). The fallback id matches nothing, so the action is left out even though the checkpoint is ready.
    • That's the same stored id that hides or misplaces the inline diff card in [Bug]: Inline turn diff card is missing or attached mid-turn when a Claude turn ends quickly #14216; this report is the rewind lookup hitting it. Your read-versus-save gaps predict the stored id on every completed turn in the table.

    V2

    Orchestrator V2 (merged #2829) replaced those independent V1 reactors, and stable 0.0.45 was cut before that merge. On current nightlies, including v0.0.46-nightly.20261003.2632, the action is keyed by run identity: a ready checkpoint is matched to the prompt's runId (deriveRevertTurnCountByUserMessageId in apps/web/src/session-logic.ts) without consulting assistantMessageId, so this race can't hide the button on turns completed under V2.

    #14216 was closed as obsolete for V2. I've marked this as a duplicate of it; a maintainer will decide whether anything is needed for the V1 stable line.

    If Edit from here is still missing for turns completed on a 0.0.46 nightly or newer, please add the T3 version, provider CLI version, repro steps, and logs here.

  2. added
    bug
    duplicate
    via-triage
    on Oct 3, 2026
  3. kushaldotdev commented on Oct 9, 2026

    @kushaldotdev

    One detail that makes this hard to characterize: the action is only rendered when the server provides a rewind target (typeof revertTurnCount === "number" in apps/web/src/components/chat/MessagesTimeline.tsx), so a turn where the server emits none shows nothing at all — no disabled button, no tooltip explaining why. That is consistent with the timing-dependent pattern reported here, and it also means a client cannot distinguish "not rewindable for this turn" from "not supported at all".

  4. t3dotgg commented on Oct 21, 2026

    @t3dotgg
    Member

    Note

    🤖 Claude Opus 5.5 responding on behalf of Theo

    Thanks for the report. This is fixed on main in #2829. Please test on the nightly built from main on 2026-10-21, or on the next stable release. If the problem still occurs there, please open a new issue that links to this one, with your version and steps to reproduce it.

  5. szarma commented on Oct 21, 2026

    @szarma

    Additional Codex observation (likely distinct from the ready-checkpoint race described here):

    On T3 Code v0.1.0 with Codex (gpt-5.6-terra), a fresh thread launched in a non-Git scratch directory showed no “Edit from here” action on any prompt. The V2 projection stored every checkpoint with status: "missing", rather than ready. The local source explains this: CheckpointService.capture returns a missing checkpoint when isGitCheckpointable(cwd) is false, and the web client only derives a rewind target from ready checkpoints.

    So this reproduces the same visible symptom for Codex, but not the same race: it appears that the current UI effectively requires a Git-checkpointable workspace even for conversation-only rewind. Might be worth documenting or surfacing as an explicit disabled-state explanation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugduplicatevia-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions