Skip to content

Conversation

@thomas-lab-openai
Copy link

This pull request resolves #844:

  • add async resume() and sync resume_sync() helpers on MaxTurnsExceeded that replay one final turn with an optional user prompt, reusing the prior agent, context, and a copy of the original RunConfig
  • extend RunResult and RunErrorDetails to retain the effective RunConfig, so guardrail/tool settings, tracing metadata, and other knobs survive into a resume attempt
  • ensure resume turns disable further tool calls by forcing tool_choice="none" while still respecting any other model settings (e.g., temperature) that the caller supplied
  • cover the new helpers with unit tests for async/sync flows, verify model-settings preservation, and document the flow via a examples/basic/max_turns_resume.py sample that demonstrates recovering after a hard turn limit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request feature:core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Max turns exceeded

3 participants