claude-code - 💡(How to fix) Fix [BUG] IDE connection lost after /clear and /ide cannot reconnect (same as #55408, #28830)

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…

Error Message

Error Messages/Logs

No error surfaced in the CLI; the IDE connection silently stops working after /clear.

Code Example

No error surfaced in the CLI; the IDE connection silently stops working after `/clear`.
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

When connected to the IDE and I run /clear, the IDE connection drops and is not re-established. Running /ide afterward reports that the connection already exists, but it no longer works — I have to manually disconnect and then reconnect to restore IDE features. This is disruptive when relying on IDE diagnostics/type safety.

This appears to be a recurrence of the previously reported #55408 ("IDE disconnection not recovering after session clear") and #28830 ("IDE connection lost after /clear command without reconnection option"), both of which were closed as stale/not planned without a fix. It still reproduces on the latest version.

What Should Happen?

After /clear, the IDE connection should be preserved (or transparently re-established). At minimum, running /ide should detect the dead connection and actually reconnect, rather than reporting it as already connected.

Error Messages/Logs

No error surfaced in the CLI; the IDE connection silently stops working after `/clear`.

Steps to Reproduce

  1. Launch Claude Code in an external terminal and connect to the IDE with /ide.
  2. Run /clear.
  3. Observe that the IDE connection is gone.
  4. Run /ide — it reports the connection already exists, but IDE features do not work.
  5. Must manually disconnect and reconnect to restore functionality.

Claude Model

Opus

Is this a regression?

No, this never worked

Last Working Version

I'm not sure if this ever has worked

Claude Code Version

2.1.165 (Claude Code)

Platform

Anthropic API

Operating System

Other Linux

Terminal/Shell

VS Code integrated terminal

Additional Information

The bug manifests in any terminal and any shell (tested VS Code and Alacritty, and bash and zsh).

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