Skip to content

fix: scope MCP tools per turn and harden recovery paths#194

Merged
alexk-dev merged 4 commits intomainfrom
fix/mcp-tool-recovery
Mar 19, 2026
Merged

fix: scope MCP tools per turn and harden recovery paths#194
alexk-dev merged 4 commits intomainfrom
fix/mcp-tool-recovery

Conversation

@alexk-dev
Copy link
Owner

Summary

  • scope MCP tools to the current turn instead of mutating the global tool registry, and dedupe advertised tool definitions by name
  • preserve queued internal retry messages when newer follow-ups arrive, and make session persistence/parsing failures surface instead of failing open
  • add preflight dedup/schema sanitation for tool definitions before LLM request serialization, with regression tests for the new behavior

Validation

  • git diff --check
  • attempted targeted Maven tests, but the current workspace snapshot is missing many tracked source files outside this diff, so full compilation fails before test execution on unrelated classes (for example CommandRouter, AgentSession, ToolComponent)

@alexk-dev alexk-dev changed the title Fix MCP tool leakage and harden recovery paths fix: scope MCP tools per turn and harden recovery paths Mar 19, 2026
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
78.3% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@alexk-dev alexk-dev merged commit c90003e into main Mar 19, 2026
16 of 17 checks passed
@alexk-dev alexk-dev deleted the fix/mcp-tool-recovery branch March 19, 2026 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant