Repository navigation
Conversation
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.
Replaces #598 after withdrawing the earlier submission and refreshing against current main.
Problem and behavior
ACP clients cannot manage Codex's persistent message queue. Queue add and cold
resume can start generation without
session/prompt, so forwarding writes aloneleaves output, approvals and cancellation without an owner.
This adds the negotiated
_session/queueextension withlist/add/update/delete/reorder/start. Native Codex retains persistence, ordering and
scheduling. The adapter subscribes before dispatch, gives autonomous turns their own
event/permission lifetime, preserves pending entries on interruption, routes child
interactions to their originating turn, and replays history before buffered live output.
Each action requires a nonmutating probe of the running native server; native validation
errors stay parameter errors, and ambiguous writes are never retried automatically.
The change is based on current main at
202e66e(2.2.2), with no rewind featuredependency. It preserves upstream sessionIndex, custom instructions, session title
selection and app-server recovery. Queue actions re-probe after crashes; stale loaded
sessions require explicit load to reconcile, and lazy prompt recovery does not
auto-dispatch persisted input. Direct index mutations share queue/cancellation locks.
Provider waits stay at the upstream request boundaries so close and local settings
can settle an in-flight prompt or resume. Sixteen new regressions cover these interactions.
Queue timeout recovery includes owned provider cleanup. POSIX process helpers also
support compiled Bun entrypoints. Protocol, examples and limits are documented in
docs/native-queue-controls.md.Validation
reproduces the identical five subscription-notification failures. No full Windows
green result is claimed.
fixture: 10/10 on both Windows and Ubuntu, including invalid reorder/start and
cross-session rejections, idle add, automatic successors, cancellation, explicit
non-head start, durable cold edits and reload. Native child shutdown is verified.
recorded by the native harness. The 37 Linux skips include opt-in account/model E2E
tests; no real account/model or global installation was used.
Limits
Add on an idle loaded thread can generate immediately; start can drain subsequent
items. Cancellation racing completion is not atomic whole-queue pause. External native
writers are outside the adapter reservation, and native admission/removal are separate,
so exactly-once execution is not promised. The loopback provider and denying HTTP
proxy are environment isolation, not an OS firewall. Cross-compilation does not prove
runtime behavior on every target. These are local results; hosted CI remains separate.
中文说明
新增 Codex 原生持久队列的查询、新增、编辑、删除、重排和指定条目启动,继续由原生
负责存储与调度。add 和冷恢复可能自动生成,因此适配器在派发前接管事件、审批和取消,
独立管理自动轮次及子代理归属;历史回放后再发布缓冲的实时事件。逐项探测运行中的
原生能力,参数错误保持参数错误,结果不明确的写入不自动重试。
直接基于当前主线
202e66e(2.2.2),不依赖 rewind 功能。保留上游 sessionIndex、custom instructions、标题选择、空会话 resume 和完整 app-server 恢复语义。崩溃后重探测
能力,旧本地会话显式 load 对账;普通请求的自动恢复不会隐式派发非空队列。索引直接
重命名/归档/取消归档与队列写入及取消互斥;保留原有索引写入顺序。provider 等待放在
对应请求边界,允许 close 和本地设置结束正在等待的 prompt/resume。新增16项交互回归。
验证:Ubuntu 全套1638通过/37跳过;Windows定向170通过/3平台跳过;两平台真实原生
各10/10;六发行目标编译和六项 POSIX 编译产物测试通过。Windows恢复/索引套件114通过、
5失败,未改动当前主线复现完全相同的5项订阅通知失败;未声称 Windows全套通过。
测试使用隔离目录与本地假模型,没有真实账号/模型调用或全局安装。取消不是全队列原子
暂停,不承诺外部写入隔离或 exactly-once;宿主 UI 接入及托管 CI 状态不在本地验证结论内。