Skip to content

fix(orgtrack): verify Codex hooks on session start#405

Merged
Harry19081 merged 1 commit into
yorgai:developfrom
VantaNode:codex/codex-hook-trust-refresh
Jul 17, 2026
Merged

fix(orgtrack): verify Codex hooks on session start#405
Harry19081 merged 1 commit into
yorgai:developfrom
VantaNode:codex/codex-hook-trust-refresh

Conversation

@VantaNode

Copy link
Copy Markdown
Contributor

Summary

  • install SessionStart as a required Codex provenance hook, even when live status is disabled, so a trusted hook set verifies as soon as the Codex session starts
  • rename the ambiguous awaiting_approval state to awaiting_verification and keep the 2-second receipt polling while that state is visible
  • remove the fixed three-hook assumption and provide complete localized verification copy across all 13 supported locales
  • exercise the real app-binary SessionStart receipt path in the rendered WebDriver flow

Why

Codex trusts the exact hook definition, but ORG2 deliberately requires proof that the installed definition actually executed. Previously, the first guaranteed verification callbacks were PostToolUse or subagent lifecycle events, so choosing Trust all and continue could leave the UI showing “Needs approval” until the next tool call. SessionStart closes that gap without recording any fake file interaction.

Codex hook lifecycle reference: https://learn.chatgpt.com/docs/hooks

Verification

  • cargo test --manifest-path src-tauri/Cargo.toml -p agent_cli session_provenance --lib — 33 passed
  • pnpm typecheck
  • targeted ESLint — passed
  • session-provenance RPC schema tests — 7 passed
  • full agentOrgs.sessionProvenance i18n completeness check — 13 locales passed
  • isolated rendered WebDriver scenario centralizes hook capture settings in Launchpad Runtime — 1 passed; opens the native Codex trust prompt and verifies SessionStart receipt → active UI
  • pre-commit agent_cli clippy — passed

Pre-commit hook ran. Total eslint: 0, total circular: 2
@Harry19081
Harry19081 merged commit 835c592 into yorgai:develop Jul 17, 2026
2 checks passed
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.

2 participants