Add Claude Agent SDK migration cookbook#2671
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b5d9a020d5
ℹ️ 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".
| } | ||
|
|
||
|
|
||
| first = await Runner.run(agent, "Add one checked bag to booking AS-301.") |
There was a problem hiding this comment.
Attach approval tool to agent before resuming run
The approval example defines add_checked_bag with needs_approval=True but then runs Runner.run(agent, ...) without showing agent.tools updated to include that tool. If the earlier agent is reused, the tool is unavailable, so no interruption is raised and the documented approval lifecycle cannot be exercised.
| first = await Runner.run(agent, "Add one checked bag to booking AS-301.") | |
| # `agent` should include `add_checked_bag` in its `tools` list. | |
| first = await Runner.run(agent, "Add one checked bag to booking AS-301.") |
Useful? React with 👍 / 👎.
Guide for migrating from the Claude Agent SDK to the OpenAI Agents SDK.