/clear is a no-op in Claude Agents backgrounded ("remote control") sessions — context not wiped

Resolved 💬 2 comments Opened Jun 13, 2026 by forfrossen Closed Jun 13, 2026

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

  1. Start a Claude Agents backgrounded / remote-control session.
  2. Have a multi-turn exchange.
  3. Type /clear at the prompt.
  4. 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

  • /clear in 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 /clear user command is the only documented mechanism. A no-op /clear in 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

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗