Skip to content

Deliver Codex DINGs through app server - #236

Closed
myobie wants to merge 5 commits into
agent/native-delivery-codex-watcherfrom
agent/native-delivery-codex-delivery
Closed

Deliver Codex DINGs through app server#236
myobie wants to merge 5 commits into
agent/native-delivery-codex-watcherfrom
agent/native-delivery-codex-delivery

Conversation

@myobie

@myobie myobie commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Review order

PR #234 → PR #235 → this PR. Review the exact head; keep this draft until Nathan has reviewed it.

Summary

  • watch the real recipient inbox and submit its FIFO head through the controlled Codex app-server connection
  • start a typed turn while the bound thread is idle, or steer the exact observed active turn; never fall back from a rejected steer to a new turn
  • defer while presence is dnd, while Codex is in review or compaction, or whenever turn ownership is not exact
  • keep review and compaction typed across Codex’s real multi-turn event ordering and release them only on authoritative thread idle
  • bind stable client message IDs to runtime incarnation, thread, delivery mode, turn, and filename
  • keep this transport slice payload-neutral so the bounded renderer in feat(message): deliver bounded inbox bodies #239 owns body-envelope assertions

Safety and scope

This is task 12 only. A successful app-server JSON response suppresses another submission in the current process, but it is not a typed userMessage receipt and does not archive the inbox file. The inbox stays authoritative until the agent reads and archives it. Persistent duplicate reconciliation and a typed receipt belong to task 13.

Held or rejected delivery remains unread and retryable. A rejected exact steer has no fallback path, and no DING is typed into review, compaction, or an unowned turn.

Verification

  • cargo check --locked
  • cargo test --locked --lib --no-fail-fast (7 + 272 + 5 passed)
  • cargo test --locked --test codex_app_server --no-fail-fast (3 passed)
  • cargo clippy --locked --all-targets --no-deps (exit 0; existing unrelated warnings remain)
  • rustfmt --edition 2024 --check src/codex_app_server.rs
  • git diff --check

Integration verification

At exact review head ea1d0a3:

  • cargo test --locked subscribed_control_pump_delivers_a_typed_reference_to_the_real_fifo_head
  • rustfmt --edition 2024 --check src/codex_app_server.rs
  • git diff --check
  • hosted Nix run 31502220130 succeeded

The following provider observation was recorded on the prior behavior head. This correction changes only the test assertion boundary.

Prior live acceptance

Validated 74fe7bcc46e52b1afaf0eb582ef4ab5900382cb6 with real Codex 0.145.0, thread 019fecf8-50b5-73e0-867c-1320d09619e1, runtime incarnation c479d86755d64a63cc7ced21eba94355, and a fresh private catalog.

  • idle: 8vfxfq started task 019fecf8-958c-7f50-8b7e-4efc8238e04a; the agent read and archived the exact file
  • active: 211yke was injected into existing turn 019fecf9-240a-7763-ab18-45a3f271134b, with no new delivery turn
  • review: g37ww5 remained unread while state was held/review on turn 019fecf9-e8cc-71a0-a320-da25a43c925a, even after the review hook changed presence to available; its DING appeared only after the review task completed
  • compaction: zq0bh6 remained unread while state was held/compaction on turn 019fecfb-94c7-77c3-b52b-7aea054f69d5; its DING appeared only after context_compacted and task completion
  • all four exact files reached archive, inbox count ended at zero, the exact owned process exited 0, its owner lock was free, no private socket remained, and the private runtime was removed

myobie commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

Folded into the reviewable implementation replacement #241 at exact head d8269638bc6a82e4b2f9ce29b2e8509be5bd2337. The replacement preserves this draft’s relevant history and has exact-head hosted Nix green. Closing this superseded draft; its branch is intentionally retained.

@myobie myobie closed this Aug 11, 2026
@schickling schickling added area:ding DING delivery: inbox notice into a running agent · Set: manual area:driver Harness drivers: launch, MCP, app-server, native delivery · Set: manual harness:codex Codex-specific behavior · Set: manual origin:agent Filed or primarily produced by an AI agent · Set: manual type:feature New user-visible or system capability · Set: manual labels Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ding DING delivery: inbox notice into a running agent · Set: manual area:driver Harness drivers: launch, MCP, app-server, native delivery · Set: manual harness:codex Codex-specific behavior · Set: manual origin:agent Filed or primarily produced by an AI agent · Set: manual type:feature New user-visible or system capability · Set: manual

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants