Skip to content

Pin returned MCP tool errors against max_tool_failures - #35

Merged
arjunvlama merged 1 commit into
boundflow:mainfrom
shubh2020cs157:pin-returned-mcp-tool-failures
Sep 13, 2026
Merged

arjunvlama merged 1 commit into
boundflow:mainfrom
shubh2020cs157:pin-returned-mcp-tool-failures

Conversation

@shubh2020cs157

Copy link
Copy Markdown
Contributor

Summary

  • MCP tool failures are recorded as successes #7 is already fixed in the BoundFlow wrapper (it classifies a returned Error executing tool … / status=error, counts it, and still hands the text to the model). This PR does not redo that.
  • Adds an e2e test for the half that was still unpinned: a real MCP always_fails (raise → adapter returns a string, no on_failure: fail) increments tool_failure_counts and trips max_tool_failures. The old wrapper would have let the task finish. The existing test only covers on_failure: fail.
  • Updates the note in charter/mcp/client.py and the matching comment in test_mcp_live.py so they stop saying the bug is still live.

Closes #7.

Test plan

  • pytest (unit)
  • pytest tests/e2e/test_failures.py::test_a_returned_mcp_error_trips_the_failure_breaker
  • pytest tests/e2e (full suite, twice)

The existing e2e test only covered on_failure: fail. The other half of boundflow#7 —
tool_failure_counts staying empty and the failure breaker never firing — was
unpinned, and the MCP client still described the bug as live.
@arjunvlama
arjunvlama merged commit 2e372c1 into boundflow:main Sep 13, 2026
3 checks passed
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.

MCP tool failures are recorded as successes

2 participants