Skip to content

feat(runtime): add auto-stop for max iterations in non-interactive mode#2208

Open
tdabasinskas wants to merge 2 commits intodocker:mainfrom
cogvel:fix/auto-stop-max-iterations
Open

feat(runtime): add auto-stop for max iterations in non-interactive mode#2208
tdabasinskas wants to merge 2 commits intodocker:mainfrom
cogvel:fix/auto-stop-max-iterations

Conversation

@tdabasinskas
Copy link
Copy Markdown
Contributor

When max iterations are reached in non-interactive mode (e.g., MCP server), the runtime now automatically stops execution instead of blocking indefinitely waiting for user input. This prevents the system from hanging when ToolsApproved is true and provides a clear assistant message explaining why execution was stopped.

When max iterations are reached in non-interactive mode (e.g., MCP server), the runtime now automatically stops execution instead of blocking indefinitely waiting for user input. This prevents the system from hanging when `ToolsApproved` is true and provides a clear assistant message explaining why execution was stopped.
@tdabasinskas tdabasinskas requested a review from a team as a code owner March 21, 2026 17:52
@derekmisler
Copy link
Copy Markdown
Contributor

/review

Copy link
Copy Markdown

@docker-agent docker-agent bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assessment: 🔴 CRITICAL

Found 1 critical issue in the changed code that needs attention.

…s approval

- Add `NonInteractive` field to Session struct to explicitly mark sessions running without user interaction
- Update runtime loop to use `NonInteractive` instead of `ToolsApproved` for auto-stopping logic
- Set non-interactive mode in A2A adapter, evaluation framework, and MCP server
- This separates the concept of approved tools from non-interactive execution context
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.

2 participants