Skip to content

fix(mcp): apply CLI execution limits to MCP-created interpreters#1041

Merged
chaliy merged 1 commit intomainfrom
fix/issue-981-mcp-limits
Apr 3, 2026
Merged

fix(mcp): apply CLI execution limits to MCP-created interpreters#1041
chaliy merged 1 commit intomainfrom
fix/issue-981-mcp-limits

Conversation

@chaliy
Copy link
Copy Markdown
Contributor

@chaliy chaliy commented Apr 3, 2026

Summary

  • MCP tools/call handler now uses a Bash factory function that applies CLI config (limits, feature flags) instead of Bash::new() with defaults
  • max_commands, max_loop_iterations, timeout, and all other CLI flags are enforced per MCP call
  • Added test verifying MCP-created interpreters respect --max-commands

Closes #981

McpServer now accepts a factory function for creating Bash instances,
ensuring CLI flags like --max-commands are applied to every MCP
tools/call invocation instead of using unconstrained Bash::new().

Closes #981
@chaliy chaliy merged commit 502c380 into main Apr 3, 2026
11 checks passed
@chaliy chaliy deleted the fix/issue-981-mcp-limits branch April 3, 2026 22:30
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 server ignores CLI execution limits, creates unconstrained interpreters

1 participant