fix(codex): reconcile cold connections without resuming queued goals

This commit is contained in:
2026-10-20 18:33:20 +01:00
parent b3bcfa3826
commit d564765ca5
14 changed files with 355 additions and 34 deletions
+8
View File
@@ -58,3 +58,11 @@ endpoint, process control, resumed turn or experimental flag is invented.
Output reads are bounded and verify thread ownership. The installed Codex
version exposes no API for controlling an agent-owned terminal through the
separate, client-owned `command/exec` process IDs; those IDs are never conflated.
A fresh Codex connection can accept a turn without subscribing to its native
thread notifications. The adapter therefore reconciles the latest turn through
the read-only paged API and emits an authoritative-history resync when it changes.
It does not call `thread/resume` on open/model selection, so merely watching a
chat cannot awaken a queued goal. Native turn IDs protect the queue/UI from stale
completion events. A real, isolated tool-free turn passed after replacing the
owning connection; no command, permission grant or global setting was involved.
+5
View File
@@ -331,6 +331,11 @@ returns the corresponding action/content; other Codex questions accept answers
only. Permission frames may provide `always_label: "Allow for session"` to avoid
misrepresenting a session-scoped grant as a permanent policy change.
Chat streams may send `chat_event.kind="resync"` to request an authoritative
history refresh without inventing text deltas or ending a queued prompt. Native
step markers may include `step.turn_id`; a terminal marker for an older turn
must not clear a newer turn's Stop control or release its queue slot.
The brokered OpenCode chat exposes the operator's own sessions, separate from the
sessions pipeline runs create. The protocol types are: