Repository navigation
fix(codex): MCP approval mode approve, SessionStart JSON output, hook-trust guidance - #162
Merged
Merged
Conversation
…-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>
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.
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:
default_tools_approval_mode = "auto"still prompts for everyaxme_*call and fails outright undercodex 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/.[, 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 documentedhookSpecificOutput.additionalContextenvelope. Verified live: the model quoted the nudge back./hooks(trust is bound to the hook's hash; untrusted hooks are skipped silently). Setup's final message anddocs/MULTI_CLIENT.mdnow say so.Tests
npx tsc --noEmitclean,npm run buildclean.npm test: 650 tests, 649 pass; the one failure is the known load-sensitiveaudit-dedup › parallel processes (E2E), green in isolation.codex exec --dangerously-bypass-hook-truston this repo: SessionStart Completed and context delivered,axme_contextcompleted, PreToolUse blockedgit commitwithout the#!axmesuffix andcat /etc/shadow(both logged as safety_block in the worklog).🤖 Generated with Claude Code