Skip to content

Editor bridge treats expected shutdown EOF as failure or reconnect #1521

Closed

Description

@alex09x

Problem

Source-revalidated on main 3f2a835c78e9daba7baefc4c018c6fc9ca3c6e4a.

The bridge does not track forwarded shutdown/exit. After the dedicated language server exits normally, gateway closure reaches the same branch as a transport failure: exit(1), or reconnect with --reconnect. Only stdin EOF independently returns success.

Location: crates/prod-code-client/src/lsp_bridge/bridge.rs:135-161.

Reproduction boundary

Send normal shutdown then exit while keeping editor stdin open until the process terminates. If gateway closure arrives first, the bridge reports failure or starts another session. Outcome depends on closure ordering; missing shutdown state is proven from source, not a fresh editor run.

Expected correction

Track protocol shutdown/exit and terminate successfully after expected teardown, without reconnecting. Keep unexpected gateway failure and malformed shutdown behavior distinct.

Verification limits

Read-only current source inspection; affected files unchanged from the audit checkout. No new tests, build, benchmark, LSP session, server restart or platform run.

Original review findings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingclientCLI and MCP client

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions