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

Resolved 💬 1 comment Opened Jun 10, 2026 by aksestok 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 ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗