[BUG] IDE connection lost after /clear and /ide cannot reconnect (same as #55408, #28830)

Status Fixed / completed
Reported on v2.1.170
Maintainer reply None cached
Activity 3 comments · opened Jun 10, 2026 · closed Jun 12, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] 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.170 (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).

View original on GitHub ↗

3 Comments

aksestok · 4 months ago

Not sure which version post 2.1.170 fixed this (or if it was extension side), but this definitely works now on 2.1.175 (and the extension on the same version).

github-actions[bot] · 2 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

github-actions[bot] · 15 days ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.