[BUG] MCP tool timeouts after ~4 conversation compactions with coplay-mcp server
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?
---
Description:
I'm experiencing a reproducible issue where MCP tools (specifically get_unity_logs from coplay-mcp) begin timing out after approximately 4 conversation compactions/summarizations in a Claude
Code session.
Environment:
- MCP Server: coplay-mcp (Unity integration)
- Tool affected: mcp__coplay-mcp__get_unity_logs (possibly others)
- Platform: Windows
Steps to Reproduce:
- Start a Claude Code session with coplay-mcp connected to Unity Editor
- Use MCP tools (e.g., get_unity_logs) successfully
- Continue working until conversation compacts/summarizes (~4 times)
- Attempt to use the same MCP tool again
Expected Behavior:
MCP tools should continue working reliably regardless of conversation length or number of compactions.
Actual Behavior:
After approximately 4 conversation compactions, MCP tool calls begin timing out and fail to return results.
Workaround:
Starting a fresh Claude Code session (copying summarized context) immediately restores MCP tool functionality, confirming this is a session-level issue rather than a Unity/MCP server problem.
Analysis:
This suggests that MCP connection state or metadata accumulates across summarizations and isn't properly cleaned up. After ~4 compaction cycles, some threshold is reached that causes timeouts,
even though the conversation content itself has been compacted.
Impact:
This forces users to restart sessions every ~4 compactions to maintain MCP functionality, losing conversation continuity.
What Should Happen?
Claude should be able to communite with Unity via MCP indefinitely, this should not be dependent on conversation length.
Error Messages/Logs
Steps to Reproduce
Communicate with Unity Editor using Claude through MCP for Unity. Ask to check the logs. After a long session, this will eventualy fail and you will get these errors popping up:
● coplay-mcp - get_unity_logs (MCP)(show_errors: true, show_warnings: true, show_logs: true, skip_newest_n_logs: 0, limit: 50)
⎿ Error: Error executing tool get_unity_logs: Tool execution failed for get_unity_logs: Request get_unity_logs timed out after 60.0 seconds
● coplay-mcp - get_unity_logs (MCP)(show_errors: false, show_warnings: false, show_logs: true, skip_newest_n_logs: 0, limit: 20)
⎿ Error: Error executing tool get_unity_logs: Tool execution failed for get_unity_logs: Request get_unity_logs timed out after 60.0 seconds
● coplay-mcp - get_unity_logs (MCP)(limit: 10)
⎿ Error: Error executing tool get_unity_logs: Tool execution failed for get_unity_logs: Request get_unity_logs timed out after 60.0 second
Claude Model
Sonnet (default)
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.0.65
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗