Skip to content

test: cover on_handoff, on_tool_start, on_tool_end on RunHooks#3098

Merged
seratch merged 1 commit intoopenai:mainfrom
Quratulain-bilal:test/run-hooks-tool-handoff-coverage
May 4, 2026
Merged

test: cover on_handoff, on_tool_start, on_tool_end on RunHooks#3098
seratch merged 1 commit intoopenai:mainfrom
Quratulain-bilal:test/run-hooks-tool-handoff-coverage

Conversation

@Quratulain-bilal
Copy link
Copy Markdown
Contributor

Adds test coverage for on_handoff, on_tool_start, and on_tool_end on run-level RunHooks (both Runner.run and
Runner.run_streamed). These were defined in RunHooksForTests but never asserted.

The existing test_run_hooks.py only asserted on_agent_start /
on_agent_end / on_llm_start / on_llm_end. Tool and handoff invocation
counts on run-level RunHooks were defined in RunHooksForTests but
never exercised. Add two tests that fire tool calls + a handoff
through Runner.run and Runner.run_streamed and assert the counts.
@seratch
Copy link
Copy Markdown
Member

seratch commented May 4, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@seratch seratch enabled auto-merge (squash) May 4, 2026 00:56
@seratch seratch merged commit fbc5a44 into openai:main May 4, 2026
10 checks passed
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