Repository navigation
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
- Open a thread that has at least one finished turn.
- Fork it, for example with Fork from this response. Don't send anything in the fork yet.
- In the fork, send
/clearor pick it from the slash menu. The composer shows "Your next message starts a fresh session". - Type a prompt and send it.
Expected behavior
The prompt starts a fresh provider session in the fork, as /clear does in any other thread. The fork's earlier messages stay visible, and the agent doesn't see them.
Actual behavior
The send fails with "A fresh session can't start while a fork or merge is still being applied." The prompt goes back into the composer and /clear stays armed, so every retry fails the same way until the notice is dismissed.
Impact
Minor bug or occasional failure
Version or commit
T3 Code (Beta) desktop 0.1.10. The code path is unchanged on main @ 055b449.
Environment
macOS 27.2.1 (Apple Silicon), desktop app with its local server, Claude Code 2.1.311, claudeAgent provider.
Logs or stack traces
# server.trace.ndjson: the fork's thread.fork succeeds, then each send after /clear is refused (4 attempts)
orchestrationV2.dispatch.threadFork Success command_type=thread.fork
ws.rpc.orchestration.dispatchCommand Failure command_type=message.dispatch
OrchestrationV2DispatchCommandError: A fresh session can't start while a fork or merge is still being applied.Diagnosis
/cleararms a fresh session in the client, and the next send carriesfreshContext: true.- A fork's context transfer stays
pendinguntil the fork's first run applies it, as a native fork or a portable handoff. Orchestrator.tsrefuses afreshContextsend while a fork or merge-back transfer is pending. That refusal came with fresh sends in feat(server): sends can start a fresh provider session #30323. A fork that hasn't run yet always has a pending transfer, so the send is refused every time, not only during a short "still being applied" window. A fork whose first run failed before the fork resolved keeps its pending transfer too.- Web offers
/clearonce a thread shows messages, and a fork shows its inherited messages, so web offers/clearin exactly the state the server refuses. Mobile offers it once a thread has a run, so it gets there after a failed first run. MCPt3_thread_sendwithfreshContextreaches the same refusal. - Two other cases hit the same check, and there the refusal looks right. A scheduled task in fresh-session mode starts a side conversation (
isScheduledFreshRun), so dropping the fork's context would leave the user's first message in the fork without it. A pending merge-back, from Merge back on a fork or Bring back on a side chat, belongs to the next ordinary message, and an ordinary send still works. Its message could say that instead of "still being applied", but that's a separate fix. - A fix that starts the fresh session should also mark the fork transfer superseded, or the next ordinary send would bring the parent's context back. One rare case would remain: a fresh send queued behind the fork's first run, when that run fails before the fork resolves.
Screenshots, recordings, or supporting files
Demo data in dark mode. After /clear and a send in a fork that hasn't run yet, the send is refused, the prompt is back in the composer, and /clear is still armed.
Workaround
Dismiss the notice with Keep the current session and send normally, then use /clear after the fork's first turn. Or start a new thread instead of forking.
Related
- feat(server): sends can start a fresh provider session #30323 added fresh-context sends and this refusal. feat: /clear starts a fresh session in the same thread #30325 made
/cleararm one. - [Bug]: Sending /clear on a stale Claude thread compacts the old context first, then clears #31092 (
/clearon a stale thread compacting first, with PR fix(web): send /clear without compacting a stale thread first #31100), Idle compaction compacts a Claude thread after /clear, using the pre-clear context size and cache expiry #30097 (idle compaction after/clear) and Context window meter keeps pre-/clear token count in Claude threads #29951 (context meter after/clear) are other/clearbugs. None of them covers forks or a refused send.
Investigated and filed with Claude Opus 5.5 in Claude Code, running in T3 Code.

Activity