Skip to content

Missing queue-operation prompts #98

Description

@simonw

If you prompt Claude Code while it is working your prompts go into a queue - these are in the session JSONL but are not yet shown in the transcript.

Example:

rg queue-operation --no-filename | grep enqueue

Output:

{"type":"queue-operation","operation":"enqueue","timestamp":"2026-04-23T04:59:40.480Z","sessionId":"f7a06da6-5fcf-4b6e-85e7-552ffd8cc8ee","content":"When you implement this use playwright and red/green TDD, plan that too"}
{"type":"queue-operation","operation":"enqueue","timestamp":"2026-04-23T05:03:18.122Z","sessionId":"f7a06da6-5fcf-4b6e-85e7-552ffd8cc8ee","content":"let's use PDF.js's own renderer"}
{"type":"queue-operation","operation":"enqueue","timestamp":"2026-04-23T05:04:01.451Z","sessionId":"f7a06da6-5fcf-4b6e-85e7-552ffd8cc8ee","content":"The final UI should include both the text and the pretty-printed JSON output, both of those in textareas and both with copy-to-clipboard buttons - it should also be mobile friendly"}
....

One of those lines:

{"type":"queue-operation","operation":"enqueue","timestamp":"2026-04-23T04:59:40.480Z","sessionId":"f7a06da6-5fcf-4b6e-85e7-552ffd8cc8ee","content":"When you implement this use playwright and red/green TDD, plan that too"}

Activity

  1. leedermix-arch commented on Sep 25, 2026

    @leedermix-arch

    #118 fixes this by reading a different record from #112.

    When a queued prompt is taken in mid-turn, Claude Code writes an attachment entry with attachment.type: "queued_command", commandMode: "prompt" and the prompt text. That is the delivery record, so each prompt produces one entry, and background <task-notification> items (commandMode: "task-notification") can be told apart from human prompts.

    I checked it against three real sessions, matching whole prompts exactly:

    • 63 human prompts were enqueued.
    • Without the change, 26 of them are missing from the transcript.
    • With Keep prompts queued while Claude was working #118, 2 are missing. One was delivered with more text than was queued. The other has no delivery record.
    • No prompt appears twice.

    Correction: an earlier version of this comment said 10 of 62 were missing. That count matched text fragments and undercounted.

    The checker, which prints counts only, is here with a synthetic example: https://github.com/glaydsonboa/traceweave/tree/main/contributions/claude-code-transcripts/queued-prompts

    I found this while working on traceweave, which keeps a record of human direction across AI coding sessions.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions