Skip to content

Conversation

@habema
Copy link
Contributor

@habema habema commented Nov 2, 2025

Related to #1895

Adds two cancellation checkpoints to make result.cancel('after_turn') more responsive:

  1. After LLM streaming completes, before tool execution — if there are no tools/handoffs, cancel immediately instead of waiting for the tool execution path.
  2. After tool execution completes, before next step — ensures tools finish before canceling, then saves session and exits cleanly.

Removed the old checkpoints (after handoff and after turn completion) because:

  • The new post-tool-execution checkpoint covers both handoff and final output cases, since it checks before the next step decision.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@seratch seratch added enhancement New feature or request feature:core labels Nov 4, 2025
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.

2 participants