Skip to content

Deliver Codex lifecycle notifications from detached Windows hooks - #7

Open
joeywangzr wants to merge 1 commit into
mainfrom
jopee/windows-codex-hook-console
Open

joeywangzr wants to merge 1 commit into
mainfrom
jopee/windows-codex-hook-console

Conversation

@joeywangzr

@joeywangzr joeywangzr commented Oct 8, 2026 •

Copy link
Copy Markdown

Codex launches Windows hooks without the original console. The notifier can exit successfully without delivering SessionStart or Stop, leaving Warp without a native session ID or completion signal. This change reconnects the hook to the closest live Codex ancestor's console while keeping hook control streams captured.

Review guide

Start with plugins/warp/scripts/console-writer.cs. Focus on ancestor identity/liveness checks, handle lifetime, and standard-stream restoration. The delivery fixture checks received OSC payloads, not just successful Win32 API returns.

What changed

  • Add a bounded console reattachment path. It rejects stale or unrelated ancestors and never emits notification bytes on hook stdout. Delivery failures produce a payload-free stderr diagnostic without failing the hook.
  • Add isolated Windows ConPTY integration coverage and wire it into CI.
  • Synchronize the notification plugin manifests and version announcements to 0.4.3. The orchestration plugin remains 0.4.1.

This avoids a new IPC endpoint or an upstream Codex binary fork. Publish this plugin before shipping the companion Warp minimum-version update: warpdotdev/warp#16368.

Validation

A Windows validation agent ran all six delivery tests on both system ConPTY and Warp's bundled ConPTY from v0.2026.10.08.08.30.dev_00; both suites passed. Coverage includes detached/direct/cmd launches, spaces, Unicode, concurrent notifications, captured control streams, unrelated ancestors, and an exited closest Codex ancestor with an older live coordinator. The production writer/common files were checksum-matched to the local candidate, and the fixture's executable AST matched.

Locally, bash tests/test-hooks.sh passed 65 checks. PowerShell parsing, C# compilation, and whitespace checks passed. The existing POSIX notification suite timed out on this Mac, including on the unmodified baseline; it is not claimed passing.

CI passed both plugin test jobs. Windows CI executed the final PowerShell helper and all six delivery tests against this committed 0.4.3 candidate; it reported "PowerShell hook tests passed" and six passing tests. Linux CI also passed. Real staging E2E follow-ups remain pending after publication.

CHANGELOG-BUG-FIX: Fixed delivery of Codex lifecycle notifications from detached Windows hooks.

Conversation: https://staging.warp.dev/conversation/f70d81ec-85a4-4322-abaf-a1fb9713ce7e
Plan: https://staging.warp.dev/drive/notebook/sjtUyYQASbuCQEbfYS6AFA

Co-Authored-By: Warp agent@warp.dev

Recover the live Codex ancestor console while keeping hook control streams captured. Add isolated ConPTY delivery coverage and publish the candidate as plugin 0.4.3.

Co-Authored-By: Warp <agent@warp.dev>
@joeywangzr
joeywangzr marked this pull request as ready for review October 8, 2026 21:08
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.

1 participant