Skip to content

Keep prompts queued while Claude was working - #116

Closed
leedermix-arch wants to merge 1 commit into
simonw:mainfrom
leedermix-arch:keep-queued-prompts
Closed

leedermix-arch wants to merge 1 commit into
simonw:mainfrom
leedermix-arch:keep-queued-prompts

Conversation

@leedermix-arch

@leedermix-arch leedermix-arch commented Sep 25, 2026 •

Copy link
Copy Markdown

Fixes the issue where prompts typed while Claude is working are dropped from transcripts.

Claude Code stores those prompts as attachment lines of type queued_command (with commandMode: "prompt") instead of separate user lines, and _parse_jsonl_file skipped them. This change turns each one into a normal user entry, keeping its timestamp and its position in the turn. It keeps skipping queued commands that are not human prompts, such as task notifications (commandMode: "task-notification") or any non-human origin.

  • _queued_user_prompt() does the conversion, and _parse_jsonl_file calls it before the user/assistant filter.
  • test_jsonl_keeps_prompts_queued_while_claude_was_working was written first and failed before the change: the queued prompt was missing.
  • Full suite: 123 passed. The change is formatted with Black and touches only the two files, with no unrelated reformatting.

This fix was written with an AI coding assistant (Claude Code) and reviewed by me. The same bug was found and fixed first in my own transcript exporter, where it had been silently dropping about 7.7% of my messages.

Fixes #98

@leedermix-arch

Copy link
Copy Markdown
Author

Some context on where this came from: I ran into it while working on traceweave, which keeps a record of human direction across AI coding sessions. Prompts typed mid-turn are part of that record, so their absence from exported transcripts stood out.

@leedermix-arch

Copy link
Copy Markdown
Author

Moved to #118 (same change, opened from my main account).

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.

Missing queue-operation prompts

1 participant