claude-code - 💡(How to fix) Fix Remote control session lost after context compaction — task ID not preserved in summary [2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#60526Fetched 2026-05-20 03:56:18
View on GitHub
Comments
2
Participants
3
Timeline
7
Reactions
0
Author
Timeline (top)
labeled ×3commented ×2cross-referenced ×2

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.

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.

RAW_BUFFERClick to expand / collapse

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

  1. Start a long conversation and launch /remote-control
  2. Continue working until the context is auto-compacted
  3. After compaction resumes, try to interact with the remote control session
  4. 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 ([email protected])

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

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

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING