Bug description
After context compaction occurs in a long session, MCP tools (configured via
opencode.jsonc) are no longer called by the agent — even though all MCP
servers show as connected (green dot) in the MCP Servers panel.
The agent falls back to bash for operations that should use MCP tools.
If bash is restricted via permissions, it errors with "tool not available".
Steps to reproduce
- Start a session with multiple MCP servers configured in
opencode.jsonc
- Run a long session until context compaction triggers
- Ask the agent to use an MCP tool (e.g. git operations via beacon-git)
- Agent uses bash instead, or errors
Expected behaviour
Agent continues to call configured MCP tools after compaction.
Actual behaviour
Agent loses MCP tool context after compaction. Only core tools (bash, read,
glob, grep, edit, write, webfetch) remain available.
Workaround
Restart CodeNomad session — tools are available again until next compaction.
Environment
- CodeNomad version: latest
- Model: anthropic/claude-sonnet-4-6
- MCP servers: local node.js servers via mcp-wrapper script
- OS: macOS (Apple Silicon)
Bug description
After context compaction occurs in a long session, MCP tools (configured via
opencode.jsonc) are no longer called by the agent — even though all MCPservers show as connected (green dot) in the MCP Servers panel.
The agent falls back to bash for operations that should use MCP tools.
If bash is restricted via permissions, it errors with "tool not available".
Steps to reproduce
opencode.jsoncExpected behaviour
Agent continues to call configured MCP tools after compaction.
Actual behaviour
Agent loses MCP tool context after compaction. Only core tools (bash, read,
glob, grep, edit, write, webfetch) remain available.
Workaround
Restart CodeNomad session — tools are available again until next compaction.
Environment