[BUG] Slash commands fall through as prompts in externally-triggered remote execution (web) sessions
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Related to #29156
Environment: Claude Code on the web — a remote execution container session started via an external trigger/automation (not a local claude CLI session, and not a standard claude remote-control session).
Reproduced on all three clients: web browser, desktop app, and mobile app — identical.
Symptom: Every slash command (/compact, /context, /clear, …) is not intercepted by the client. It is passed through verbatim as a normal chat message to the model — the assistant receives a user message whose content is literally /context, /compact, etc. No command UI or execution happens.
Impact: Because /compact and /context never reach the harness, there is no way to compact or inspect context in these sessions. Once context fills up, the only workaround is starting a brand-new session — painful for long working sessions.
Possibly same root cause as #29156, but the session type here is an externally-triggered remote execution container, which remote-control.md § Limitations doesn’t seem to cover — that section says /compact//context “work from mobile and web,” yet in this session type they fall through to the model.
Request: Either enable slash-command bridging for externally-triggered remote execution sessions, or document the limitation so users know context can only be managed by starting a new session.
What Should Happen?
Slash commands (/compact, /context, /clear, etc.) typed into the chat input should be intercepted and executed by Claude Code — e.g. /context shows context usage, /compact compacts the conversation. They should NOT be forwarded to the model as plain chat text.
Error Messages/Logs
None — there is no error message. The command silently falls through and is treated as chat input (the assistant replies as if the literal text “/context” had been typed). The absence of any feedback is itself part of the problem.
Steps to Reproduce
- Open a Claude Code session on the web — specifically an externally-triggered remote execution container session (not a local claude CLI session, and not a standard claude remote-control session).
- In the chat input, type any slash command, e.g. /context or /compact, and send.
- Observe: the command is not intercepted. The assistant receives a normal user message whose content is literally /context / /compact — no command UI or execution happens.
- Result: /compact and /context never reach the harness, so there’s no way to compact or inspect context. Once context fills up, the only workaround is starting a brand-new session.
Reproduced identically on web browser, desktop app, and mobile app.
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
1.260604.0 (27047400567)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
This reproduces identically across all three clients — desktop app, iPhone app, and web interface. None of them can execute slash commands; in every case the command is sent to the model as plain text instead of being intercepted and run.
<img width="590" height="1278" alt="Image" src="https://github.com/user-attachments/assets/6117c0e2-ea69-4580-bf73-3ceb17891d3d" />
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗