Skip to content

Conversation

@codefromthecrypt
Copy link
Collaborator

Summary

Fixed two issues with test_max_turns_limit that caused it to run extremely slowly:

  1. max_turns: None defaults to 1000 turns - restored to Some(1)
  2. Test checked for ToolConfirmationRequest but agent sends ActionRequired with ToolConfirmation data

Type of Change

  • Bug fix
  • Tests

AI Assistance

  • This PR was created or reviewed with AI assistance

Testing

cargo test -p goose --test agent test_max_turns_limit

Test now completes in ~0.5s instead of running 1000 turns.

Related Issues

Relates to #5548

1. max_turns: None defaults to 1000 turns - restore Some(1)
2. Checked for ToolConfirmationRequest but agent sends ActionRequired

Signed-off-by: Adrian Cole <adrian@tetrate.io>
Copilot AI review requested due to automatic review settings December 21, 2025 08:33
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes slow test execution in test_max_turns_limit by correcting two issues: restoring the max_turns limit from None (which defaults to 1000 iterations) to Some(1), and updating the message type pattern matching to use ActionRequired with ToolConfirmation data instead of the deprecated ToolConfirmationRequest type.

  • Restored max_turns: Some(1) to prevent 1000-iteration default
  • Updated message pattern matching to use current ActionRequired API

@codefromthecrypt codefromthecrypt merged commit 02a3a1e into block:main Dec 22, 2025
23 checks passed
cronus42 pushed a commit to cronus42/goose that referenced this pull request Dec 22, 2025
wpfleger96 added a commit that referenced this pull request Dec 23, 2025
* main: (155 commits)
  remove Tool Selection Strategy preview (#6250)
  fix(cli): correct bash syntax in terminal integration functions (#6181)
  fix : opening a session to view it modifies session history order in desktop (#6156)
  test: fix recipe and audio tests to avoid side effects (#6231)
  chore: Update gemini versions in test_providers.sh (#6246)
  feat: option to stream json - jsonl really (#6228)
  feat: add mcp app renderer (#6095)
  docs: update skills extension to support .agents/skills directories (#6199)
  Add YouTube short to Chrome DevTools MCP tutorial (#6244)
  docs: Caveats for privacy information in logs documentation (#6218)
  move goose issue solver to opus (#6233)
  feat: improved UX for tool calls via execute_code (#6205)
  Blog: Code Mode Doesn't Replace MCP (#6227)
  fix: prevent keychain requests during cargo test (#6219)
  test: fix test_max_turns_limit slow execution and wrong message type (#6221)
  Skills vs MCP blog (#6220)
  Add blog post: Does Your AI Agent Need a Plan? (#6209)
  fix(ui): enable MCP UI to send a prompt message when an element is clicked (#6207)
  docs: param option for recipe deeplink/open (#6206)
  docs: edit in place or fork session (#6203)
  ...
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