Skip to content

fix(codex): MCP approval mode approve, SessionStart JSON output, hook-trust guidance - #162

Merged
George-iam merged 1 commit into
mainfrom
fix/codex-trust-approval-20261102
Nov 2, 2026
Merged

George-iam merged 1 commit into
mainfrom
fix/codex-trust-approval-20261102

Conversation

@George-iam

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #161 after a live run on codex-cli 0.166.0 against this repo. Three things the docs did not make obvious:

  • MCP approvals. default_tools_approval_mode = "auto" still prompts for every axme_* call and fails outright under codex exec (MCP tool call requires approval, but approval policy is never). "approve" runs them. The writer now emits "approve" — AXME tools only read and write the project's .axme-code/.
  • SessionStart output. Our plain-text nudge starts with [, which Codex takes as the start of a JSON document, fails to parse, and reports the hook as Failed with no context delivered. The hook now emits the documented hookSpecificOutput.additionalContext envelope. Verified live: the model quoted the nudge back.
  • Hook trust. Codex runs non-managed project hooks only after the user reviews them via /hooks (trust is bound to the hook's hash; untrusted hooks are skipped silently). Setup's final message and docs/MULTI_CLIENT.md now say so.

Tests

  • npx tsc --noEmit clean, npm run build clean.
  • npm test: 650 tests, 649 pass; the one failure is the known load-sensitive audit-dedup › parallel processes (E2E), green in isolation.
  • Live codex exec --dangerously-bypass-hook-trust on this repo: SessionStart Completed and context delivered, axme_context completed, PreToolUse blocked git commit without the #!axme suffix and cat /etc/shadow (both logged as safety_block in the worklog).

🤖 Generated with Claude Code

…-trust guidance

Verified live on codex-cli 0.166: default_tools_approval_mode auto still
prompts for every axme_* call and fails under codex exec (requires approval,
but approval policy is never); approve runs them. SessionStart stdout that
starts with [ is parsed as JSON by Codex and reported Failed with no context
delivered; emit the documented hookSpecificOutput.additionalContext envelope
instead. Project hooks are skipped until trusted via /hooks (hash-bound);
setup output and docs/MULTI_CLIENT.md now say so.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@George-iam
George-iam merged commit 7ab78f2 into main Nov 2, 2026
12 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.

1 participant