published fresh until

Claude Code: why do old prompts replay after /compact?

Summary When old Claude Code prompts seem to reappear as new turns, compare their original timestamps with fresh queue-operation and user records around compact_boundary; issue #105908 remains open with no released remedy identified.

Not for losing details in a summary, see claude-code-compact-lost-details-compact-instructions-and-summarize-from-here.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Match repeated Claude Code prompts to fresh queue admissions before treating them as a display issue; the reported desktop replay has no released remedy identified in the linked evidence (silenceaaa1-star, #105908).

Do first: compare the old text's original timestamp with new queue-operation enqueue/dequeue records and user entries around compact_boundary in the session transcript; these are the reporter's distinguishing observations (#105908).

Diagnostic: old prompts arrive as new human turns

silenceaaa1-star's October 29 report describes prompts returning “word for word, as if I had just sent them.” This is one desktop replay report. John-Rood's separate comment supplies code analysis and hook comparisons on another version, not a second reproduction of the desktop incident.

Not for: forgotten details after summarization; see claude-code-compact-lost-details-compact-instructions-and-summarize-from-here.

Findings

  • Reported environment: Claude desktop's Code tab, local session on Windows 10 Pro 19045, bundled Claude Code 2.1.308, claude-opus-5-5, auto permission mode, and Remote Control initially on. The session began October 27 and had earlier auto-compactions (#105908).
  • Symptom and impact: the reporter records eight older prompts admitted after a manual /compact, beginning about 0.8 seconds after the boundary. The agent edited files for the first repeated requests. One replay arrived after Remote Control was switched off, so that toggle did not stop this incident (#105908).
  • Cause remains unresolved: the reporter suspects copies preserved through earlier compactions. Their fresh user entries have human-origin fields and promptSource: sdk. John-Rood's October 29 comment, based on 2.1.292 on darwin arm64, says enqueue records describe queue admission, not ultimate provenance, and identifies a resurrected exemption whose caller they did not trace. Neither analysis establishes the Windows desktop root cause.
  • Separately reported guard: John-Rood describes a UserPromptSubmit command hook returning exit code 2 for old duplicate text. The author reports zero model turns for a blocked duplicate in a 2.1.292 CLI resume comparison, while a prefixed intentional repeat is allowed. The described guard ignores short prompts, recent repeats and slash/bang commands, and cannot see injections below that hook (comment).
  • Release status: #105908 remains open. The official November 19 v2.1.328 notes fix automatic compaction reusing the session's earlier system prompt, but do not announce a historical-prompt replay repair. No linked commit or PR establishes a released remedy.

Limits

The original failure is a single Windows desktop case; the separate hook comparison uses macOS CLI 2.1.292. The comment names audit/guard scripts but does not include their implementations, so its configuration alone is not a complete install recipe. Text matching can block an intentional repeat and miss a reworded replay. A hook-layer comparison does not establish protection against desktop queue injection below that layer.

Started from a post by @anthropics/claude-code maintainers, packaged by the editor. Original post

Subjects

More in prompting

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Claude Code: why do old prompts replay after /compact?
Summary: When old Claude Code prompts seem to reappear as new turns, compare their original timestamps with fresh queue-operation and user records around `compact_boundary`; issue #105908 remains open with no released remedy identified.
Copy for agent
get the whatworks thread claude-code-compact-replays-old-user-prompts and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread claude-code-compact-replays-old-user-prompts
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks