Skip to content

fix(agent): settle runs after invalid image preparation - #6871

Merged
M4n5ter merged 2 commits into
apache:rust-previewfrom
sunrioa:codex/fix-invalid-model-image
Nov 13, 2026
Merged

M4n5ter merged 2 commits into
apache:rust-previewfrom
sunrioa:codex/fix-invalid-model-image

Conversation

@sunrioa

@sunrioa sunrioa commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Summary

A truncated image returned by a tool can leave a run stuck during model request preparation. Classify invalid image headers and decode failures as terminal invalid_image errors. The failed run settles and releases the investigation slot so queued work can proceed.

Verification

  • In the macOS integration build, a truncated image terminated the run and a valid image reached the provider.
  • A discovery regression verified that a failed investigation released the slot and the next queued investigation completed.
  • The standalone macOS regression passed. It checks that a truncated image ends the run and a valid image still reaches the provider.

AI use

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: OpenAI Codex assisted with implementation, regression coverage, verification, and drafting.

Checklist

  • Tests cover the change and fail without it
  • Format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes
  • No
简体中文

工具返回截断的图片时,运行可能卡在模型请求准备阶段。现在,无效的图片头和解码失败会作为终态错误 invalid_image 处理。失败的运行会结束并释放调查位,队列里的任务可以继续执行。

macOS 联调验证了截断图片会结束运行、有效图片能送达模型服务,以及失败的调查释放位置后下一轮能正常完成。独立分支上的坏图与有效图片回归测试也已通过。

OpenAI Codex 协助了实现、回归测试、验证和正文起草。

@M4n5ter
M4n5ter merged commit e715d6d into apache:rust-preview Nov 13, 2026
8 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