fix: Update max_turns config (#12604)

Pass max_turns in the run config than during the initialization.

---------

Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>
This commit is contained in:
Pranav
2025-10-06 22:51:18 -07:00
committed by GitHub
parent 3a71829b46
commit 829142c808
3 changed files with 3 additions and 3 deletions

View File

@@ -23,7 +23,7 @@ class Captain::Assistant::AgentRunnerService
message_to_process = extract_last_user_message(message_history)
runner = Agents::Runner.with_agents(*agents)
runner = add_callbacks_to_runner(runner) if @callbacks.any?
result = runner.run(message_to_process, context: context)
result = runner.run(message_to_process, context: context, max_turns: 100)
process_agent_result(result)
rescue StandardError => e