claude-code - 💡(How to fix) Fix [Bug] Post-/compact continue references wrong session context (cross-session memory bleed) [1 comments, 2 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#48226Fetched 2026-04-15 06:29:37
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Author
Timeline (top)
labeled ×4commented ×1

Error Message

[{"error":"McpToolCallError: ### Error\nError: browserBackend.callTool: net::ERR_CONNECTION_REFUSED at http://[REDACTED]:3210/\nCall log:\n\u001b[2m - navigating to "http://[REDACTED]:3210/", waiting until "domcontentloaded"\u001b[22m\n\n at mh9 (/$bunfs/root/src/entrypoints/cli.js:1772:63)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T23:52:43.466Z"},{"error":"McpToolCallError: ### Error\nTimeoutError: locator.textContent: Timeout 30000ms exceeded.\nCall log:\n\u001b[2m - waiting for locator('[role=region][aria-label*="Notifications"]')\u001b[22m\n\n at mh9 (/$bunfs/root/src/entrypoints/cli.js:1772:63)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T23:54:38.085Z"},{"error":"Error: EISDIR: illegal operation on a directory, read '/Users/lee/dev/dk-web-agent-next/src/features/chat-filter/lib'\n at E1H (/$bunfs/root/src/entrypoints/cli.js:4438:15399)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-15T00:20:07.958Z"},{"error":"Error: Error normalizing tool input: ZodError: [\n {\n "expected": "string",\n "code": "invalid_type",\n "path": [\n "command"\n ],\n "message": "Invalid input: expected string, received undefined"\n }\n]\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:4866:1005)\n at map (native:1:11)\n at eK_ (/$bunfs/root/src/entrypoints/cli.js:4866:556)\n at Jp7 (/$bunfs/root/src/entrypoints/cli.js:8037:7769)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-15T00:33:07.054Z"},{"error":"McpToolCallError: ### Error\nError: Ref e21 not found in the current page snapshot. Try capturing new snapshot.\n at mh9 (/$bunfs/root/src/entrypoints/cli.js:1772:63)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-15T00:41:38.955Z"}]

Code Example

[{"error":"McpToolCallError: ### Error\nError: browserBackend.callTool: net::ERR_CONNECTION_REFUSED at http://[REDACTED]:3210/\nCall log:\n\u001b[2m  - navigating to \"http://[REDACTED]:3210/\", waiting until \"domcontentloaded\"\u001b[22m\n\n    at mh9 (/$bunfs/root/src/entrypoints/cli.js:1772:63)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T23:52:43.466Z"},{"error":"McpToolCallError: ### Error\nTimeoutError: locator.textContent: Timeout 30000ms exceeded.\nCall log:\n\u001b[2m  - waiting for locator('[role=region][aria-label*=\"Notifications\"]')\u001b[22m\n\n    at mh9 (/$bunfs/root/src/entrypoints/cli.js:1772:63)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T23:54:38.085Z"},{"error":"Error: EISDIR: illegal operation on a directory, read '/Users/lee/dev/dk-web-agent-next/src/features/chat-filter/lib'\n    at E1H (/$bunfs/root/src/entrypoints/cli.js:4438:15399)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-15T00:20:07.958Z"},{"error":"Error: Error normalizing tool input: ZodError: [\n  {\n    \"expected\": \"string\",\n    \"code\": \"invalid_type\",\n    \"path\": [\n      \"command\"\n    ],\n    \"message\": \"Invalid input: expected string, received undefined\"\n  }\n]\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:4866:1005)\n    at map (native:1:11)\n    at eK_ (/$bunfs/root/src/entrypoints/cli.js:4866:556)\n    at Jp7 (/$bunfs/root/src/entrypoints/cli.js:8037:7769)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-15T00:33:07.054Z"},{"error":"McpToolCallError: ### Error\nError: Ref e21 not found in the current page snapshot. Try capturing new snapshot.\n    at mh9 (/$bunfs/root/src/entrypoints/cli.js:1772:63)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-15T00:41:38.955Z"}]
RAW_BUFFERClick to expand / collapse

Bug Description Post-/compact continue responds with prior session's context (cross-session bleed).

I had chat 1 where I wanted to update settings.local.json, which we accomplished. In chat 2 from where I took the screenshot, agentic pipeline(skill) was implementing a plan up until 95% session ctx fill where I decided to perform /compact. Once compact was done, I prompted "continue" to which claude responded seemingly with chat 1 context at first. Reprompting it helped.

On second screenshot we can see that 1st chat's details bled into compact summary too:

  • Sidebar: user just asked about adding tsc-deny hooks - already present in .claude/settings.local.json.

Maintainers can reach me via email so I could provide raw jsonl transcripts if need be.

Repro steps:

  • Session A in project X, do work, end session.
  • Open session B in same project, run pipeline until ~95% context.
  • Run /compact.
  • Prompt continue — first response references session A's topic; reprompt recovers session B context.

Expected: continue resumes session B's compacted summary. Actual: first post-compact turn pulls from a different session's memory/history

Environment Info

  • Platform: darwin

  • Terminal: WarpTerminal

  • Version: 2.1.108

  • Feedback ID: 6432ba94-feac-456e-907f-500a7dbe9d2b

Errors

[{"error":"McpToolCallError: ### Error\nError: browserBackend.callTool: net::ERR_CONNECTION_REFUSED at http://[REDACTED]:3210/\nCall log:\n\u001b[2m  - navigating to \"http://[REDACTED]:3210/\", waiting until \"domcontentloaded\"\u001b[22m\n\n    at mh9 (/$bunfs/root/src/entrypoints/cli.js:1772:63)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T23:52:43.466Z"},{"error":"McpToolCallError: ### Error\nTimeoutError: locator.textContent: Timeout 30000ms exceeded.\nCall log:\n\u001b[2m  - waiting for locator('[role=region][aria-label*=\"Notifications\"]')\u001b[22m\n\n    at mh9 (/$bunfs/root/src/entrypoints/cli.js:1772:63)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T23:54:38.085Z"},{"error":"Error: EISDIR: illegal operation on a directory, read '/Users/lee/dev/dk-web-agent-next/src/features/chat-filter/lib'\n    at E1H (/$bunfs/root/src/entrypoints/cli.js:4438:15399)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-15T00:20:07.958Z"},{"error":"Error: Error normalizing tool input: ZodError: [\n  {\n    \"expected\": \"string\",\n    \"code\": \"invalid_type\",\n    \"path\": [\n      \"command\"\n    ],\n    \"message\": \"Invalid input: expected string, received undefined\"\n  }\n]\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:4866:1005)\n    at map (native:1:11)\n    at eK_ (/$bunfs/root/src/entrypoints/cli.js:4866:556)\n    at Jp7 (/$bunfs/root/src/entrypoints/cli.js:8037:7769)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-15T00:33:07.054Z"},{"error":"McpToolCallError: ### Error\nError: Ref e21 not found in the current page snapshot. Try capturing new snapshot.\n    at mh9 (/$bunfs/root/src/entrypoints/cli.js:1772:63)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-15T00:41:38.955Z"}]
<img width="708" height="834" alt="Image" src="https://github.com/user-attachments/assets/e4844a54-254c-4c2f-8345-78675dc44f1c" /> <img width="701" height="664" alt="Image" src="https://github.com/user-attachments/assets/b7c0e269-4e77-455a-9076-51799d46f7f7" />

cc-bug-47325-related-transcript-redacted.md

extent analysis

TL;DR

The issue can be mitigated by reprompting after the /compact command to recover the correct session context.

Guidance

  • The error logs provided do not directly point to the cause of the cross-session bleed, suggesting the issue might be related to how session contexts are managed internally.
  • Reprompting after the /compact command has been observed to recover the correct session context, indicating a potential workaround.
  • To further diagnose the issue, providing the raw JSONL transcripts as offered could be helpful for maintainers to understand the session management and context switching better.
  • The environment and version information (Platform: darwin, Terminal: WarpTerminal, Version: 2.1.108) should be considered when reproducing and debugging the issue.

Example

No specific code snippet can be provided without more details on the internal implementation of session management and the /compact command.

Notes

The provided error logs seem unrelated to the primary issue of cross-session context bleed, suggesting that the root cause might be in the application's logic for managing and switching between session contexts.

Recommendation

Apply the workaround of reprompting after the /compact command, as it has been observed to recover the correct session context. This approach allows for continued use of the application while awaiting a more permanent fix.

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…

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [Bug] Post-/compact continue references wrong session context (cross-session memory bleed) [1 comments, 2 participants]