/clear is a no-op in Claude Agents backgrounded ("remote control") sessions — context not wiped
What happened
In a Claude Agents backgrounded / remote-control session, typing /clear at the prompt does not clear the assistant's session context. The conversation history continues to flow into the next assistant turn unchanged, and any text the assistant emits after /clear references the prior turns — proving the context wasn't actually reset.
Expected
/clear wipes the session context the same way it does in an interactive foreground session — the next assistant turn starts with no memory of prior messages in this session.
Actual
/clear is acknowledged at the input layer (the user-facing prompt goes through) but has no effect on the assistant's context window. The next user message arrives with full prior history still present.
Repro
- Start a Claude Agents backgrounded / remote-control session.
- Have a multi-turn exchange.
- Type
/clearat the prompt. - Send a follow-up message and observe that the assistant references earlier turns it should no longer have access to (e.g. by name, decision, or by trying to continue prior work).
Notes
/clearin an interactive foreground session works as expected; the regression appears specific to the backgrounded session mode.- The assistant has no programmatic surface to clear its own context — the
/clearuser command is the only documented mechanism. A no-op/clearin backgrounded mode leaves the user with no way to reset a long-running session short of killing and re-spawning it (which drops scheduled wake-ups, in-flight subagent jobs, etc.). - Workaround for a planned reset: end the backgrounded session and spawn a fresh one. Not viable mid-flow.
Environment
- Claude Code (Claude Agents backgrounded / remote-control mode)
- Linux
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗