Live capture from the AgentRQ app — the eraser sits beside YOLO, and appears only where there is a Claude Code terminal to act on it.
Three steps, in an order that matters — because the clear and the task do not travel together.
AgentRQ finds the workspace's running Claude Code session and writes /clear\r into its pseudo-terminal — the same path your keystrokes take. A carriage return, because that is what the Enter key produces; a newline would leave the command typed and unsent.
The clear travels down the terminal; the task travels over the MCP session. Two transports, no ordering between them — so the push waits, or the task can arrive mid-clear and be wiped by it.
The agent reads it with nothing before it. And if the clear could not be sent — no machine, daemon offline, session gone — the task is pushed anyway and the reason is logged. Work is never withheld over a convenience.
Claude Code resends the whole conversation on every turn. A task that begins on 120K tokens of the previous task re-reads those 120K tokens forty times over a forty-turn task — roughly 4.8M tokens that have nothing to do with the work in front of it. Prompt caching makes them cheaper to resend, not free, and never fewer.
That is one task, on one agent. Ten agents through ten tasks a day is where the millions come from.
An agent that still has the last task's files open does not merely pay for them — it uses them. It follows conventions from a file it read an hour ago, reruns a test suite this task never named, and answers confidently about state that no longer exists.
Starting deep in the window also reaches auto-compaction sooner, and compaction cannot tell which half of the context is stale. It summarises the current task to make room for the finished one.
A feature that only exists in the web UI is not available to the agents that create most of the tasks.
| Surface | How to ask |
|---|---|
| Task composer | The eraser icon beside YOLO |
| Workspace settings | Clear context before each task — the default for new tasks |
| MCP createTask | clearContext: true |
| WebMCP browser tool | clearContext: true |
| agentrq-ws CLI | --clear-context |
Turn it on for a workspace and every new task starts with the eraser already pressed — the right setting for a queue of unrelated maintenance jobs, or an overnight cron run nobody is watching.
What a task was created with is stored on the task, not read from the workspace when it is pushed. A task you wrote yesterday runs with the choice you made yesterday, even if somebody changed the workspace default overnight.
/clear is that agent's command. Typing it at an ACP gateway session would put six stray characters into whatever that agent was doing, so the backend checks the session kind and declines — and the browser runs the same check, which is why the eraser is absent rather than inert where it cannot work.
Not a gap in coverage: acp-gateway already opens a brand new ACP session for every task it is handed, leaving the MCP connection untouched, so a gateway agent never carries the previous task into the next one. Clear Context exists because a long-lived Claude Code TUI is the one place that does.
A session that is still starting would take the flag and drop it — the process that reads the prompt is the thing still coming up. The icon appears on exactly the condition the backend acts on, not a second opinion about it.
It empties the conversation. It does not restart the process, reload CLAUDE.md from disk, reconnect MCP servers, or forget approvals granted this session. For a genuinely fresh process, stop the session and start a new one from the machine page.
Every existing and new workspace ships with the setting off, and no task is cleared unless something asked for it. Plenty of work genuinely wants the previous context, and a feature that decided that for you would be worse than not having it.