Repository navigation
Provision managed Codex accounts with enabled Orca hooks - #23292
Closed
iampaycheck wants to merge 1 commit into
Closed
iampaycheck wants to merge 1 commit into
iampaycheck wants to merge 1 commit into
Conversation
Closed
6 of 9 tasks
brennanb2025
added a commit
that referenced
this pull request
Sep 29, 2026
Fixes the Orca part of #23289. A Codex worker could sit forever at Codex's hooks screen: Orca's own hook entry had the right trusted_hash but `enabled = false`, so the SessionStart event Orca waits for never fired. Orca only ever granted the hash and never re-checked `enabled` (the ledger fast path compared hashes only, the text fallback kept an existing `enabled = false`, and the SSH installer passed no value), so a stale `enabled = false` at the position Orca's entry occupies stuck. Now every launch prep that installs Orca's hook re-derives it: the Codex app-server grant writes `{ trusted_hash, enabled = true }` for Orca's exact managed keys and verify fails if one is still disabled; the ledger fast path misses when the entry is disabled; the local, WSL and SSH fallbacks write `enabled = true` for Orca's entries. Project and user hooks are never touched, so their review stays the user's decision. Orca's own settings stay the only off switch: all of these writes run only on the install path, which launch prep, session resume, startup and the SSH/WSL installs take only when status hooks are on for Codex (#23667's per-agent check). With Codex turned off, launch prep takes the refresh-user-hooks path, which never writes Orca's hook state, so a disabled entry stays off; turning Codex back on re-enables it on the next launch. Supersedes #23292, which enabled the hook once at account creation with nothing to re-derive it later.
Contributor
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.
Fixes #23289.
Orca now installs its user-scope managed hook when a Codex managed account is created, before the account is persisted. It enables only the exact installed Orca command and positional trust keys after the existing hash grant, then rereads the trust state; native homes also pass the existing full hook-status check. Missing or incomplete trust fails account creation visibly. Project hooks retain their review state.
The helper is idempotent. Focused tests cover exact-command rejection, preserving a disabled project hook, native account creation, and account import (22 tests passing). Formatting and changed-file lint pass. A full node typecheck exceeded Node’s default 4 GB heap; an 8 GB rerun was stopped after 11 minutes without a diagnostic. This is a draft pending upstream review; no live host configuration was changed.