[BUG] Remote Control: one /compact shows twice in the phone app (typed prompt and command-name record both rendered)
What's Wrong?
A single manual /compact in a Remote Control session appears twice in the Claude phone app, as two user messages. The session transcript explains why: one /compact produces two user records around the compaction boundary.
- Before the boundary: the typed prompt
/compactas a user message. - After the boundary: a second user record containing
<command-name>/compact</command-name>. - Both carry the same timestamp (same second), and there is exactly one compaction record (
trigger: manual, roughly 203k tokens before and 24k after).
Nothing runs twice (one compaction, one summary); the duplicate is only in what the app renders, because it shows both records as user bubbles.
What Should Happen?
One /compact shows as one message in Remote Control clients (the app should skip the command-marker record, or the record should be flagged as non-displayable).
Steps to Reproduce
- Run an interactive session with Remote Control on, with a long conversation.
- Type
/compact(terminal or app). - Open the session in the Claude phone app: the compact command appears twice.
- Inspect the session's JSONL transcript: two user records for it, one on each side of the compact boundary.
Is this a regression?
Unknown.
Claude Code Version
2.1.293 (the version installed when it was seen; not tested on 2.1.294)
Platform / Operating System
Anthropic API; Linux (Bazzite); Claude app on a phone
Additional Information
Cosmetic only. It looks like the same command being recorded once as the typed prompt and once as the local-command marker, with the marker not marked as meta/hidden for Remote Control clients.
---
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
🤖 Generated with Claude Code