refactor(recall): remove auto-recall PostToolUse hook in favor of teamai-recall subagent - #106
Merged
Merged
Conversation
…amai-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>
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>
hsuchifeng
force-pushed
the
refactor/remove-auto-recall
branch
from
July 2, 2026 03:59
68ff78b to
4acb5ed
Compare
jeff-r2026
added a commit
to jeff-r2026/teamai-cli
that referenced
this pull request
Jul 2, 2026
The passive auto-recall PostToolUse hook was removed in Tencent#106, replaced by the proactive teamai-recall subagent + builtin-rules approach. Update the design doc to reflect this decision. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3 tasks
jeff-r2026
added a commit
that referenced
this pull request
Jul 3, 2026
The passive auto-recall PostToolUse hook was removed in #106, replaced by the proactive teamai-recall subagent + builtin-rules approach. Update the design doc to reflect this decision. Co-authored-by: Claude Opus 4.6 <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
auto-recallPostToolUse hook that silently fired on everyBash/Grep/WebSearch/WebFetchtool call to search the team knowledge base. In practice it was noisy and low-hit-rate, and is now superseded by theteamai-recallsubagent (proactive, codebase-graph aware, structured summary output) plus the manualteamai recallcommand.teamai pull/hooks injectvia the existing reconcile engine — no manual migration needed.contribute-check's Phase 2 knowledge-gap detection depended on auto-recall's quality cache (~/.teamai/sessions/<sid>-recall-cache.json). That cache is now written byteamai recallitself (extracted into a standalonesrc/recall-quality.tsmodule), so the feature keeps working with an equivalent-but-more-accurate data source — both manual recall and the subagent's underlyingteamai recallcall now populate it.TEAMAI_RECALL_DISABLED=1now gatesteamai recall's quality tracking instead of the removed hook.Test plan
npx tsc --noEmitnpm run build(tsup)npx vitest run— 1569 passed, 3 pre-existing failures inimport-repo-merge.test.tsunrelated to this change (present onmainbefore this branch)src/__tests__/recall-quality.test.tscoveringrecordRecallQuality/readRecallQualityrecall-scope-isolation.test.ts(hit + miss cases)hooks*.test.tscontribute-check-phase2.test.tspasses unchanged (cache format untouched)Made with Cursor