Preflight Checklist
What's Wrong?
When running ENABLE_EXPERIMENTAL_MCP_CLI=true env var and using mcp-cli, exiting a session and resuming the session later causes mcp-cli to use a stale session ID, causing the mcp tool calls to fail.
What Should Happen?
mcp-cli should work after closing a session and re-launching it through /resume.
Error Messages/Logs
Error: Exit code 1
Warning: MCP endpoint file not found at /tmp/claude/claude-code-mcp-cli/1544c6ea-e68d-4cc2-b7b4-285e9d3d8123.endpoint (session:
1544c6ea-e68d-4cc2-b7b4-285e9d3d8123). Falling back to state file.
Error: MCP state file not found at /tmp/claude/claude-code-mcp-cli/1544c6ea-e68d-4cc2-b7b4-285e9d3d8123.json (session:
1544c6ea-e68d-4cc2-b7b4-285e9d3d8123). Is Claude Code running?
Steps to Reproduce
- Start a session with ENABLE_EXPERIMENTAL_MCP_CLI=true env var
- Do some work that invokes mcp-cli in bash tool
- End the session with ctrl+c twice
- reopen CC with same ENABLE_EXPERIMENTAL_MCP_CLI=true env var
- Use /resume and reopen session
- try and do more work that invokes mcp-cli
- mcp-cli will fail
Claude Model
None
Is this a regression?
I don't know
Last Working Version
No response
Claude Code Version
2.0.69
Platform
Other
Operating System
macOS
Terminal/Shell
Other
Additional Information
No response
Preflight Checklist
What's Wrong?
When running ENABLE_EXPERIMENTAL_MCP_CLI=true env var and using mcp-cli, exiting a session and resuming the session later causes mcp-cli to use a stale session ID, causing the mcp tool calls to fail.
What Should Happen?
mcp-cli should work after closing a session and re-launching it through /resume.
Error Messages/Logs
Error: Exit code 1 Warning: MCP endpoint file not found at /tmp/claude/claude-code-mcp-cli/1544c6ea-e68d-4cc2-b7b4-285e9d3d8123.endpoint (session: 1544c6ea-e68d-4cc2-b7b4-285e9d3d8123). Falling back to state file. Error: MCP state file not found at /tmp/claude/claude-code-mcp-cli/1544c6ea-e68d-4cc2-b7b4-285e9d3d8123.json (session: 1544c6ea-e68d-4cc2-b7b4-285e9d3d8123). Is Claude Code running?Steps to Reproduce
Claude Model
None
Is this a regression?
I don't know
Last Working Version
No response
Claude Code Version
2.0.69
Platform
Other
Operating System
macOS
Terminal/Shell
Other
Additional Information
No response