anthropics / anthropics/claude-code

[BUG] MCP connector (Linear) reported as "not connected" after /compact — requires manual disconnect/reconnect

Open
#95,351 0 comments 0 reactions 0 assignees View on GitHub
area:core area:mcp bug has repro platform:macos
Dominant language
Python
Stars
145k
Forks
23.1k
PR merge metrics
PR metrics pending

Description

## Environment

- Claude Code 2.1.263
- Claude desktop app (Code tab)
- macOS 26.5.2 (build 25F84), arm64
- MCP: Linear connector (remote connector, enabled via the Connectors UI)

## What happened

I was in a long session with the Linear MCP connector enabled and working — I had successfully read and updated Linear issues earlier in the same session.

When the context window was nearly full (~100%), I ran `/compact`. Immediately after compaction finished, I asked Claude to read a Linear issue. It failed, answering that the Linear MCP server was not connected — even though the connector was still enabled and had been working seconds earlier in the same session.

The only way to recover was to open the Connectors panel, disconnect Linear, and connect it again. After that, the Linear tools worked normally in the same session.

## Expected behavior

`/compact` should only rewrite conversation context. MCP server connections and their tool definitions should survive compaction, so tool calls issued right after a compaction keep working without any manual reconnect.

## Actual behavior

After compaction, the Linear MCP tools are treated as unavailable ("not connected") until the connector is manually disconnected and reconnected through the Connectors UI.

## Steps to reproduce

1. Open a session in the Claude desktop app with the Linear MCP connector enabled.
2. Use a Linear MCP tool successfully (e.g. read an issue) to confirm it is connected.
3. Keep working until the context window is nearly full.
4. Run `/compact`.
5. Right after compaction, ask for another Linear MCP call (e.g. read an issue).

Result: the call fails with a "MCP not connected" style message, although the connector is still enabled.

Workaround: Connectors → disconnect Linear → connect Linear again. Tools work again in the same session.

## Notes

I did not capture the exact error string at the time. Happy to reproduce and attach logs from `~/.claude/logs/` if that helps.

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the failure with the Linear connector enabled, use it successfully, fill the context, and run /compact; inspect the resulting behavior and logs in ~/.claude/logs/. Trace the connector and tool state across compaction, with completion shown when a post-compaction Linear call works without disconnecting and reconnecting.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.