Description
What happened
I came back to a long, idle Claude thread. T3 started its automatic idle compaction (a /compact message with idleCompaction: "onReturn", which t3_thread_read shows as created by system). Right after that I sent a long message: about 5.5k characters, 17 images, video attachments and a thread reference. The message went into the queue, and T3 skipped the compaction so it could send it. About 18 seconds later I ran the nightly update, which restarted the server and cancelled that run.
After the restart my message was gone from the timeline. The thread shows "Run interrupted before provider start", "Cancelled because the server shut down before the provider work completed", and then "T3 Code restarted and resumed this turn", with nothing in between. The message itself was never lost. It is stored, the agent received it in full (with attachment paths), and the agent acted on it in the continuation run. But it can't be seen, and thread search can't find it.
Diagnosis
The turn-item visibility rule hides a queued_turn user message whenever its run is cancelled:
// packages/shared/src/orchestrationV2Timeline.ts
// "…cancelled queued inputs stay hidden."
(status === "queued" || status === "cancelled") &&
item.type === "user_message" &&
item.inputIntent === "queued_turn"That rule is for a queued input the user withdraws before it is sent. But cancelled is also the status a server shutdown gives a run that had already started: the provider got the message and the turn was cut short. Here, run 3467 had startedAt set (06:11:54), the provider received the message at 06:12:02, and server recovery marked the run cancelled at 06:12:11. The same rule is repeated in SQL: the snapshot window query, the hidden-row lookup in openLocalTimeline, both shell item-count queries, and the thread-search filter in ThreadSearch.ts. So the message is missing from every read: the timeline, t3_thread_read, history pages, the shell item count and search.
The server already treats "cancelled and never started" as the definition of a withdrawn queued input (NOT (status = 'cancelled' AND startedAt IS NULL) in the last-executed-run index), so startedAt is the natural way to tell the two cases apart.
Steps to reproduce
- Open a long Claude thread that has been idle long enough for T3 to auto-compact when you return to it (or send
/compact). - While the compaction is still queued or starting, send a normal message. It is queued as
queued_turn, and T3 skips the compaction to send it. - While that run is still in progress (after
startedAtis set), restart the server, for example by updating the desktop nightly. - After the restart, open the thread. The run is
cancelled, a restart continuation resumes the turn, and the queued message is missing from the timeline and from search.
Expected: a message whose run started stays visible, as it does for interrupted or failed runs.
Version
0.1.12-nightly.20261123.5124 (desktop app and local server, same build; commit 2808e87). The rule is unchanged on main as of 58e309e.
Environment
macOS 27.0 (darwin arm64), T3 Code Desktop nightly with the local server, Node v24.22.1. Provider: Claude Agent (claude-fable-5-2). A long thread: about 3,450 runs and about 32,900 items.
Evidence
orchestration_v2_projection_runs:- 3466 (the idle compaction) is
interrupted. - 3467 (my message) is
cancelled, withstartedAt06:11:54.535Z andcompletedAt06:12:11.893Z. - 3468 is
completed, withrestartContinuationOfRunId= 3467.
- 3466 (the idle compaction) is
- Run 3467's
user_messageturn item is inorchestration_v2_projection_turn_itemsandorchestration_v2_turn_item_positions.t3_thread_read(activity) skips it: the row for the 3466 interrupt result is followed directly by the 3467server-recoverynotice. - The Claude native session transcript has the message, delivered at 06:12:02 inside a
delta_since_target_last_seencontext handoff. - I ran the visibility function from the user's build and from a fixed branch on the real rows of runs 3466–3468. The build hides the 3467
user_message; the fixed branch shows it. Nothing else changes.
Related issues
- [Bug]: Earlier chat history disappears from UI after context compaction, but remains accessible through t3_thread_read #23081 (closed): history disappeared from the UI after context compaction. It was still readable through
t3_thread_read; here it is hidden there too. - fix(chat): requeued steers no longer look delivered #23420 (merged): added the requeued-steer handling this rule comes from.
Workaround
None in the UI. The message is still in orchestration_v2_projection_messages, and the agent did receive it.
Agent
Diagnosed and written by Claude Opus 5.5 (Claude Code, running in T3 Code) through t3 triage.
Activity
EtanHey commentedon Nov 23, 2026
Follow-up from #41292, now closed:
startedAtis the wrong way to tell a delivered message from a withdrawn one. A review found three problems with it:startedAtbefore calling the provider, so a recoveredcancelledrun can havestartedAtset without the prompt ever arriving.rewindUnacceptedRunsinProviderRuntimeRecoveryService.tsalready treats a provider turn on one of the run's attempts as the only proof of delivery. The visibility rule should use that same check.createInheritedTurnItemVisibility, a source rewind that turns the run intorolled_backwith a cancelled attempt would hide the prompt in an existing fork that had shown it.orchestrationV2Timeline.ts, it lives in the snapshot window SQL, theopenLocalTimelinehidden-row lookup,selectShellRunItemCountsandselectShellItemCounts(which must keep their covering status lookups), andThreadSearch. The client re-filtersvisibleTurnItemswith the shared rule, so it needs the provider turns for those runs as well.On the reporter's machine, 16 queued messages are hidden this way. Every one belongs to a
cancelledrun that has a provider turn, so all 16 were delivered.This touches the core visibility contract and needs an e2e scenario that restarts the server mid-turn, so I'm leaving the fix to the team instead of sending a larger outside PR.
🤖 Claude (Opus 5.5) on behalf of Etan