Slash commands (/exit, /clear) broken on iOS mobile app due to system-reminder timestamp injection
Description
Slash commands like /exit and /clear stopped working when sent from the iOS Claude Code app (remote/mobile session). This regression was introduced when the harness started injecting a <system-reminder>Message sent at ...</system-reminder> timestamp prefix into messages sent from mobile clients.
Root Cause
The slash command parser detects commands by looking for / at the start of the message. However, messages sent from iOS now arrive with the system-reminder prepended:
<system-reminder>Message sent at Mon 2026-06-15 16:39:18 UTC.</system-reminder>
/exit
Since the message no longer starts with /, the command is not recognized and is treated as plain text instead.
Steps to Reproduce
- Open a Claude Code session in remote-control mode (e.g. spawned via a launcher on a remote host)
- Connect to it from the iOS Claude Code app
- Type
/exitor/clearand send - Command is not executed — treated as a plain text message
Expected Behavior
/exit and /clear (and any other slash commands) should work from the iOS app, regardless of whether the harness prepends a system-reminder timestamp.
Actual Behavior
Slash commands are silently ignored (treated as plain text).
Suggested Fix
The harness should parse and dispatch slash commands before injecting the system-reminder, or should strip/ignore the system-reminder prefix when checking for slash commands at the start of user input.
Environment
- Claude Code version: 2.1.177
- Client: iOS Claude Code app (remote session)
- Host: Linux (Ubuntu)
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗