refactor(agent): establish Codex-style Agents SDK runtime foundation - #39
Open
JamesLinYJ wants to merge 12 commits into
Open
refactor(agent): establish Codex-style Agents SDK runtime foundation#39JamesLinYJ wants to merge 12 commits into
JamesLinYJ wants to merge 12 commits into
Conversation
JamesLinYJ
force-pushed
the
docs/codex-runtime-refactor-plan
branch
from
August 18, 2026 03:03
c064e1b to
19ae90b
Compare
JamesLinYJ
marked this pull request as ready for review
August 18, 2026 04:04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
落地 Codex-inspired、Agents-SDK-native 的 Agent 运行时基础,而不复制 Agents SDK 已有的模型—工具—handoff 微循环。
@openai/agents至0.16.1;关键实现
SDK 防腐边界
agentsSdkStateBoundary.ts,集中处理当前活动 Runner steering 的唯一兼容接触;RunState.history获取;generatedItems和 checkpoint 内部 JSON 结构的解析;_originalInput在防腐文件之外出现,并禁止 SDK 内部布局回流。版本与恢复
0.16.1;工程标准
AGENTS.md和架构总览,明确 RunEngine 与 SDK Runner 的所有权;CI 与发布门禁
验证结果
提交前验证流水线
git diff --check通过;最终 head 的 GitHub Actions
临时兼容说明
Agents SDK 0.16.1 的公开
RunState.addInput()在当前同一模型请求的callModelInputFilter时点,无法同时满足“立即模型可见”和“写回当前可恢复 RunState”。因此_originalInput暂时只允许存在于单一防腐边界;后续 Runner segment 化后必须删除。后续范围
Domain Journal、GeoWorldState、Input Mailbox 重构、ToolPlan/Effect Committer、统一 Approval/Sandbox policy、Context rollover、Plugin/Hook 和 durable child Run 继续按 RFC 分阶段推进。