Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Realtime: with async_tool_calls=True, an interruption mid-tool is answered with no pending marker for the call, and the model claims the action already happened

未关闭
#5,416 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
44/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
python

调研方向

Start by reading the RealtimeSession async tool call and interruption handling paths; the issue names no source files or tests. Reproduce with the linked stopbench realtime_run.py command using --async-tools true and inspect how an in-flight call is represented in conversation context. Done means the model can identify a still-running call without claiming its result, with tests covering interruption during execution.

由索引模型根据 Issue 内容生成。

描述

Versions
  • openai-agents 0.24.0, RealtimeSession
  • gpt-realtime-2.1, text output
Summary

When the user interrupts while a function tool is running, the stop is answered before the tool has a result, and the model has nothing in its conversation saying the call is still pending. It then guesses, and its guess can be wrong.

Setup: a refund tool with a 400 ms backend commit. The stop is session.interrupt() then session.send_message("Wait, stop. Don't do the refund."). A local ledger records whether the refund committed.

  • interrupt() cancelled nothing in this text session. Every response in all 40 runs ended completed, and the tool always ran to completion.
  • With async_tool_calls=True (the default), the stop gets its own response right away while the call has no output yet. In 15 of 15 stop runs the first reply said the refund was "already" in progress, sent or submitted before the model had a result.
  • When the stop came before the tool's HTTP request was sent, the reply ("I can't stop it at this point because the refund request has already been submitted.") was false when it was said. The ledger received the request 202 to 207 ms later.
  • With async_tool_calls=False, the stop waits for the tool, and the model answers from the real result. But the user hears nothing until the tool returns (6.2 to 6.5 s with a 6 s backend).
Expected

With async_tool_calls=True, a call that's still running should show in the model's context as pending (e.g. a placeholder function output, or a note that a tool call is in progress), so the model can say "it's still processing" and not guess. A way to cancel the running tool task on interrupt() would also help tools that can still be stopped.

Repro

https://github.com/chrislazar25/stopbench

.venv-realtime/bin/python realtime_run.py --async-tools true --runs 5 --moments before_send in_flight --out runs/mine/realtime.jsonl

Data: runs/realtime-gpt-realtime-2.1.jsonl (e.g. refund 5c7a420531e0, before send: "I can't stop it at this point—the refund request has already been sent and is still processing."). README section "Results: OpenAI Agents SDK 0.24.0 realtime".

主要语言
Python
星标
30.4k
派生
4.9k
平均合并
14 小时 33 分钟
30 天内合并 PR
142

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

openai/openai-agents-python 的其他 Issue

查看 openai/openai-agents-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。