Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix #844: add resume helpers for MaxTurnsExceeded runs#2052

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
thomas-lab-openai wants to merge4 commits intomain
base:main
Choose a base branch
Loading
fromtlab/max-turns-final-answer

Conversation

@thomas-lab-openai
Copy link

This pull requestresolves#844:

  • add asyncresume() and syncresume_sync() helpers onMaxTurnsExceeded that replay one final turn with an optional user prompt, reusing the prior agent, context, and a copy of the originalRunConfig
  • extendRunResult andRunErrorDetails 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 forcingtool_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 aexamples/basic/max_turns_resume.py sample that demonstrates recovering after a hard turn limit

chatgpt-codex-connector[bot] reacted with thumbs up emoji
@seratch
Copy link
Member

You’ve assigned@rm-openai as a reviewer, so he may come up with other suggestions, but personally, I feel adding the methods to the exception class this way may not be a clean design. I would add some kind of helper that handles the max exceed error and resumes.

Aside from the implementation details, I’m not yet sure whether it helps when the max turns are exceeded. Even if you resume it, it might hit the max turns again.

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

Reviewers

@rm-openairm-openaiAwaiting requested review from rm-openai

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

enhancementNew feature or requestfeature:core

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Max turns exceeded

3 participants

@thomas-lab-openai@seratch

[8]ページ先頭

©2009-2025 Movatter.jp