`/clear` from the web remote control shows "Context cleared" but does not clear the session context
Summary
Running /clear from the web remote-control interface of a live CLI session erases the visible history on the page and displays a "Context cleared" confirmation — but the session's context is not cleared. The literal text /clear is instead delivered to the model as an ordinary user message, and the model demonstrably retains all prior conversation context afterwards.
Environment
- Claude Code 2.1.174
- Host session: macOS (darwin) terminal
- Controlling client: web remote-control interface (claude.ai), same session
Steps to reproduce
- Start a Claude Code session in a terminal.
- Open the same session from the web remote-control interface.
- Have some conversation so there is context.
- Type
/clearin the web interface.
Expected
Either the session context is actually cleared (matching local CLI behavior), or the UI reports that local commands are not supported from the remote client.
Actual
- The web page erases the visible transcript and shows "Context cleared".
- The backend session keeps its full context; the model receives the raw text
/clearas a user message (confirmed by the model itself, which continued referencing pre-"clear" context and reported receiving/clearas plain text). - Reproduced several times, both while the agent was idle and mid-turn.
Additional detail
The web remote's "+" menu has a "Slash commands" entry that offers these commands, so the UI actively advertises them in this context — but they are not executed as commands there either (they arrive in the conversation as plain text, like the hand-typed /clear).
Impact
The false confirmation is the worst part: users reasonably believe they have reset context (e.g. to control cost or start a clean task) when nothing happened. In a long session this silently burns tokens on stale context.
Suggested fix
Implement /clear (and the other advertised slash commands) for remotely-controlled sessions, or have the remote client respond "local command — not supported from the remote interface" instead of a fabricated "Context cleared".
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗