Skip to content

fix: show the message that was typed while Claude was working - #22

Merged
sleeyax merged 4 commits into
sleeyax:mainfrom
KobeVrancken:fix/claude-tty-queued-prompts
Sep 9, 2026
Merged

fix: show the message that was typed while Claude was working#22
sleeyax merged 4 commits into
sleeyax:mainfrom
KobeVrancken:fix/claude-tty-queued-prompts

Conversation

@KobeVrancken

@KobeVrancken KobeVrancken commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

A message you send while Claude is working never reaches the conversation the adapter rebuilds. Found while explaining the neighbouring case in #21, and it turns out to be a bug of its own rather than a footnote.

Stacked on #21, which is stacked on #20 and #19, so this branch carries all three and the diff against main includes them. The commit to read here is the last one.

What was happening

Claude does not take a message that arrives mid-turn: it queues it, and takes it at the end of the turn it was in. The queue is the whole record. From one of my sessions, this is every record in the transcript carrying what I typed:

{"type":"attachment","uuid":"a9be3e81-…","timestamp":"2026-09-03T21:04:16.591Z",
 "attachment":{"type":"queued_command","commandMode":"prompt",
               "prompt":"I interrupt you, what happens",
               "origin":{"kind":"human"},
               "source_uuid":"eaf73e0a-ef44-4f3c-90ad-f8a2f94e09cd"}}

source_uuid resolves to nothing in the file, and no user turn ever carries the text. Eighteen seconds later Claude answers it:

21:04:34  assistant :: "Here's what happened, concretely: - **Your message arrived…"

The translator reads user turns, so it emitted nothing for the message. Paseo shows what you typed as you send it, so nothing looks wrong at the time — the cost lands on reload, where a session's conversation is rebuilt by replaying its transcript: your line is gone and Claude's answer to it is not.

Sixteen such messages across this box's transcripts, every one attachment-only.

What changed

  • The queued_command attachment is read as the message it carries, when its commandMode is prompt. <task-notification> is scrubbed out of user text as it always was, so a report queued through the same attachment does not become something the user said.
  • It is keyed by source_uuid, the queue's own id for the item, rather than by the record it was written in: the queue is written out again under a new record for as long as the item sits in it, and the item is the same one each time. Notification records were observed repeating that way ten times in four minutes; no human prompt has been seen to, but the id is the honest key either way.
  • An agent's report queued through the same attachment — the fix: let a session let go of the agents it has finished with #21 fix — now goes through the same place, and the prompt is passed on whole rather than as a string, because 3 of the 16 are written as content blocks rather than as one.

Not covered

Only text is read out of a queued message. None of the sixteen carried an image, and a queued image would still be missing from a rebuilt conversation.

🤖 Generated with Claude Code

https://claude.ai/code/session_01BM8mp2wkVHsyeyuuHkoXaQ

A message sent while Claude is mid-turn is queued rather than taken there and
then, and the queue is the only record Claude keeps of it: the queued_command
attachment written when the message arrives is never followed by a user turn
carrying it, and the text reaches the transcript nowhere else. The translator
read user turns alone, so nothing in the conversation the adapter rebuilds
said the message was ever sent — a reloaded session shows Claude answering a
question nobody is shown asking, which on this box has happened sixteen times,
every one of them attachment-only.

The attachment is now read as the message it is. It is keyed by the id the
queue gave the item rather than by the record it was written in, because the
queue is written out again under a new record for as long as the item sits in
it, and the item is the same one each time.

The report of an agent that finished mid-turn is queued through the same
attachment and was already read from it; both now go through one place, and
the prompt is passed on whole rather than as a string, because a message with
an attachment on it is queued as blocks instead.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BM8mp2wkVHsyeyuuHkoXaQ
@sleeyax
sleeyax force-pushed the fix/claude-tty-queued-prompts branch from 86723c8 to cb31739 Compare September 9, 2026 17:59
sleeyax and others added 3 commits September 9, 2026 20:09
Claude absorbs a message queued while it was working mid-turn, at its next tool result, and writes the queued_command attachment there rather than at the end of the turn it was in.
Either way that attachment is the only record of the message.
The key is the queue's own id for the item, so a queue rewritten under a new record says nothing new; no human prompt has been observed to repeat, only a notification.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…th no queue id

A report is queued as content blocks as readily as a string, and closing the card it names is what reading it is for.
A prompt the queue gave no id of its own is keyed off the record that carries it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… prompts

The block-typed queued prompts on this box carried no attachment, so the comment named a cause the evidence does not support.
Drop the note about a queue keying an item by its own id: the README and transcript-translator.ts already state it, and the assertion says it too.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@sleeyax
sleeyax merged commit 3051211 into sleeyax:main Sep 9, 2026
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.

2 participants