Remote control session lost after context compaction — task ID not preserved in summary
Summary
When a /remote-control session is active and the conversation undergoes context compaction, the remote control task ID is not preserved in the generated summary. After compaction, Claude can no longer reference the session, effectively dropping the RC connection silently.
Steps to reproduce
- Start a long conversation and launch
/remote-control - Continue working until the context is auto-compacted
- After compaction resumes, try to interact with the remote control session
- Claude reports no active task / cannot find the task ID
Expected behavior
Either:
- The compaction summary preserves active task IDs (task state is runtime-critical, not just conversational context), or
- Claude detects on resume that a previously active RC session existed and alerts the user
Actual behavior
Task ID is silently lost in the summary. Claude reports "No task found with ID: ..." when trying to resume. The user has no way to recover the session without manually noting the task ID before compaction.
Root cause
Context compaction summarizes conversation content but does not treat running background task IDs as state that must survive compression. This is a gap between conversational context and runtime state.
Suggested fix
The compaction pipeline should detect active tasks (background shells, remote sessions, agents) at summarization time and inject their IDs + status into the summary as structured metadata, not as prose.
Environment
- Claude Code desktop app (macOS)
- Auto context compaction triggered by long conversation
---
Reported by: Jian Li (li.jian.mac@gmail.com)
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗