[codex] support codex hooks injection - #103
Merged
Merged
Conversation
…ex/codex-hooks-support # Conflicts: # src/types.ts
jeff-r2026
marked this pull request as ready for review
July 2, 2026 03:01
hsuchifeng
pushed a commit
to hsuchifeng/teamai-cli
that referenced
this pull request
Jul 2, 2026
Rebase onto main picked up the new Codex hooks injection tests (Tencent#103), which still hardcoded 7 PostToolUse builtin hooks. Update the expectation to 3 to match the auto-recall removal in this branch. Co-authored-by: Cursor <cursoragent@cursor.com>
jeff-r2026
added a commit
that referenced
this pull request
Jul 2, 2026
…mai-recall subagent (#106) * refactor(recall)!: remove auto-recall PostToolUse hook in favor of teamai-recall subagent auto-recall silently fired on every Bash/Grep/WebSearch/WebFetch tool call to search team knowledge, but was noisy and low-hit-rate in practice, and its job is now done better by the teamai-recall subagent (proactive, codebase-graph aware, structured output). Installed machines self-clean the old hook entries on the next `teamai pull` / `hooks inject` via the existing reconcile engine. contribute-check's knowledge-gap detection (Phase 2) depended on auto-recall's quality cache, so `teamai recall` now records recall quality itself (moved into a standalone recall-quality.ts module) — the feature keeps working, just with a new, more accurate data source (manual recall + the recall subagent's underlying command, instead of a passive hook). Co-authored-by: Cursor <cursoragent@cursor.com> * fix(test): update Codex hooks test for reduced PostToolUse count Rebase onto main picked up the new Codex hooks injection tests (#103), which still hardcoded 7 PostToolUse builtin hooks. Update the expectation to 3 to match the auto-recall removal in this branch. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: jeffyxu <jeffyxu@tencent.com> Co-authored-by: Cursor <cursoragent@cursor.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
codex,codex-internal,tcodex) usinghooks.jsonpaths.descriptionmetadata.Why
Codex now supports lifecycle hooks via
hooks.json/[hooks]config, butteamai-clistill skipped Codex-family tools because their defaulttoolPathshad no settings path. README claimed support, but implementation only synced skills/rules/agents.Test Report
Passing checks run locally:
npx vitest run src/__tests__/hooks.test.ts src/__tests__/hooks-reconcile-scope.test.ts src/__tests__/tclaude-tcodex.test.ts src/__tests__/types.test.ts— 75 tests passednpm run typecheck— passednpm run build— passednpm run test:e2e -- src/__tests__/hooks-team-e2e.test.ts— 5 tests passedcodex-cli 0.142.5: generated.codex/hooks.jsonvia builtteamai hooks inject, verifiedStopcontained both built-in and team hook entries, then parsed withCODEX_HOME=<temp>/.codex codex debug prompt-input ...— exit 0, no stderrFull-suite status:
npm testcurrently fails in unrelated suites: 5auto-recall.test.tsassertions where hook output isnull, plus 1http-repo-integration.test.tstimeout. These failures reproduced when rerunning those files directly and are outside the Codex hook changes.