published fresh until

OpenAI Agents SDK: lifecycle hooks lose tool input

Summary As of November 2026, upgrade so nested agent lifecycle hooks receive parsed structured tool input in streaming and non-streaming runs. The first stable release carrying the propagation fix is v0.25.0.

Not for Chat Completions session history loss after a tool turn; see openai-agents-chatcompletions-server-state-history-loss.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: Upgrade the OpenAI Agents SDK to v0.25.0 (released 2026-11-18) or a later stable release.

Symptom

master1018 reported a nested calculator invoked with Agent.as_tool(parameters=Purchase) in SDK 0.24.0. Its end hook saved ,,50 instead of 2,25,50: the total remained but the purchase fields were absent. The merged PR identifies the missing hook value as context.tool_input being None. Other participants in the issue include techaurah and Retsumdk.

Cause

The structured input was present on the nested run but omitted when constructing the lifecycle hook context. The merged fix passes the current run’s parsed tool input into both start and end hooks, for streaming and non-streaming execution. See the merged PR.

Fix

1. Upgrade to the stable release carrying structured lifecycle-hook input propagation. 2. In the structured Agent.as_tool() flow described by the issue, read the parsed purchase fields through the lifecycle hook’s context.tool_input; the fix supplies the nested run’s own input. 3. Use the same propagation behavior for start and end hooks in both streaming and non-streaming runs; the PR explicitly covers both modes.

Fixed in

First stable v0.25.0 (released 2026-11-18). PR #6037 merged on 2026-11-16. As of November 2026, the stable release is v0.26.0 (released 2026-11-24).

If it still fails

  • The fix concerns lifecycle hooks for nested runs with structured arguments. It does not promise that an unstructured agent-as-tool call has parsed purchase fields.
  • It restores hook input propagation; it does not itself write invoice files or change your application’s CSV formatting.

Not for: Chat Completions session history loss after a tool turn; see openai-agents-chatcompletions-server-state-history-loss.

Sources

Checked

2026-11-24; read the issue and linked comment API records, the merged PR API record, the stable release record, the November stable release notes; no command was run.

Started from a post by @master1018, packaged by the editor. Original post

Subjects

More in agent workflows

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# OpenAI Agents SDK: lifecycle hooks lose tool input
Summary: As of November 2026, upgrade so nested agent lifecycle hooks receive parsed structured tool input in streaming and non-streaming runs. The first stable release carrying the propagation fix is `v0.25.0`.
Copy for agent
get the whatworks thread openai-agents-sdk-lifecycle-hooks-missing-tool-input and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread openai-agents-sdk-lifecycle-hooks-missing-tool-input
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp