Repository navigation
fix(local-agent): write agent hooks where each tool reads them - #1224
Merged
Merged
Conversation
…nt#1220) The HTTP local agent joined each tool's project-scope settings path to $HOME, so Muse and Qoder CN got agent hooks in files they never read, and ZCode got a Claude-shaped hooks key its strict schema rejects, taking the whole user config with it. - Resolve the user-scope settings file, as pull does, and clear the old path on removal. - Refuse ZCode until agent hooks are written in its hooks.events format. - Trust a Codex agent hook after writing it, and fail the ack when Codex will not run it (no codex on PATH, codexTrustEnabled: false). - Register Hermes agent hooks under Hermes's own event names. - Fail the ack for an event OpenCode has no equivalent for.
…ion Muse settings (Tencent#1220) Codex keys hook trust by position, so removing or reinstalling one agent hook left every later hook in the file untrusted. Removal now re-trusts the hooks whose hash Codex trusted before the rewrite, and nothing else. A new Muse settings.json now carries schema_version: 1, which Muse requires to load it.
…trusted (Tencent#1220) Two identical hooks share a Codex hash but not an approval, so carrying trust over by hash could approve a copy the member never approved. Match each surviving entry to the one it was, in order, instead.
The PR description supplies sufficient post-build real-CLI testing evidence. The explicitly deferred provider/agent coverage is not blocking. |
|
No new findings in the specified PR diff.
Review was read-only; I did not run, build, or install anything from the PR. |
jeff-r2026
approved these changes
Oct 20, 2026
This was referenced Oct 20, 2026
SaulMoro
added a commit
that referenced
this pull request
Oct 26, 2026
…tor (#1221) The env, workflows, recall, stats, AI backend, votes judge and HTTP agent hook rows of #1221's matrix become a required `features` facet, one `SupportCell` per row: the mark and the evidence letter, as the matrix writes them. A cell a later fix changed (#1193, #1224, #1245, #1374) says so in its note and keeps teamai's-code-only evidence until it is rerun. Data only: nothing reads it but the support page.
SaulMoro
added a commit
that referenced
this pull request
Oct 26, 2026
…tor (#1221) The env, workflows, recall, stats, AI backend, votes judge and HTTP agent hook rows of #1221's matrix become a required `features` facet, one `SupportCell` per row: the mark and the evidence letter, as the matrix writes them. A cell a later fix changed (#1193, #1224, #1245, #1374) says so in its note and keeps teamai's-code-only evidence until it is rerun. Data only: nothing reads it but the support page.
SaulMoro
added a commit
that referenced
this pull request
Oct 26, 2026
…tor (#1221) The env, workflows, recall, stats, AI backend, votes judge and HTTP agent hook rows of #1221's matrix become a required `features` facet, one `SupportCell` per row: the mark and the evidence letter, as the matrix writes them. A cell a later fix changed (#1193, #1224, #1245, #1374) says so in its note and keeps teamai's-code-only evidence until it is rerun. Data only: nothing reads it but the support page.
SaulMoro
added a commit
that referenced
this pull request
Oct 26, 2026
…tor (#1221) The env, workflows, recall, stats, AI backend, votes judge and HTTP agent hook rows of #1221's matrix become a required `features` facet, one `SupportCell` per row: the mark and the evidence letter, as the matrix writes them. A cell a later fix changed (#1193, #1224, #1245, #1374) says so in its note and keeps teamai's-code-only evidence until it is rerun. Data only: nothing reads it but the support page.
SaulMoro
added a commit
that referenced
this pull request
Oct 26, 2026
…tor (#1221) The env, workflows, recall, stats, AI backend, votes judge and HTTP agent hook rows of #1221's matrix become a required `features` facet, one `SupportCell` per row: the mark and the evidence letter, as the matrix writes them. A cell a later fix changed (#1193, #1224, #1245, #1374) says so in its note and keeps teamai's-code-only evidence until it is rerun. Data only: nothing reads it but the support page.
SaulMoro
added a commit
that referenced
this pull request
Oct 26, 2026
…tor (#1221) The env, workflows, recall, stats, AI backend, votes judge and HTTP agent hook rows of #1221's matrix become a required `features` facet, one `SupportCell` per row: the mark and the evidence letter, as the matrix writes them. A cell a later fix changed (#1193, #1224, #1245, #1374) says so in its note and keeps teamai's-code-only evidence until it is rerun. Data only: nothing reads it but the support page.
SaulMoro
added a commit
that referenced
this pull request
Oct 26, 2026
…tor (#1221) The env, workflows, recall, stats, AI backend, votes judge and HTTP agent hook rows of #1221's matrix become a required `features` facet, one `SupportCell` per row: the mark and the evidence letter, as the matrix writes them. A cell a later fix changed (#1193, #1224, #1245, #1374) says so in its note and keeps teamai's-code-only evidence until it is rerun. Data only: nothing reads it but the support page.
SaulMoro
added a commit
that referenced
this pull request
Oct 26, 2026
…tor (#1221) The env, workflows, recall, stats, AI backend, votes judge and HTTP agent hook rows of #1221's matrix become a required `features` facet, one `SupportCell` per row: the mark and the evidence letter, as the matrix writes them. A cell a later fix changed (#1193, #1224, #1245, #1374) says so in its note and keeps teamai's-code-only evidence until it is rerun. Data only: nothing reads it but the support page.
SaulMoro
added a commit
that referenced
this pull request
Oct 26, 2026
…tor (#1221) The env, workflows, recall, stats, AI backend, votes judge and HTTP agent hook rows of #1221's matrix become a required `features` facet, one `SupportCell` per row: the mark and the evidence letter, as the matrix writes them. A cell a later fix changed (#1193, #1224, #1245, #1374) says so in its note and keeps teamai's-code-only evidence until it is rerun. Data only: nothing reads it but the support page.
SaulMoro
added a commit
that referenced
this pull request
Oct 26, 2026
…tor (#1221) The env, workflows, recall, stats, AI backend, votes judge and HTTP agent hook rows of #1221's matrix become a required `features` facet, one `SupportCell` per row: the mark and the evidence letter, as the matrix writes them. A cell a later fix changed (#1193, #1224, #1245, #1374) says so in its note and keeps teamai's-code-only evidence until it is rerun. Data only: nothing reads it but the support page.
SaulMoro
added a commit
that referenced
this pull request
Oct 26, 2026
…tor (#1221) The env, workflows, recall, stats, AI backend, votes judge and HTTP agent hook rows of #1221's matrix become a required `features` facet, one `SupportCell` per row: the mark and the evidence letter, as the matrix writes them. A cell a later fix changed (#1193, #1224, #1245, #1374) says so in its note and keeps teamai's-code-only evidence until it is rerun. Data only: nothing reads it but the support page.
SaulMoro
added a commit
that referenced
this pull request
Oct 27, 2026
…tor (#1221) The env, workflows, recall, stats, AI backend, votes judge and HTTP agent hook rows of #1221's matrix become a required `features` facet, one `SupportCell` per row: the mark and the evidence letter, as the matrix writes them. A cell a later fix changed (#1193, #1224, #1245, #1374) says so in its note and keeps teamai's-code-only evidence until it is rerun. Data only: nothing reads it but the support page.
jeff-r2026
pushed a commit
that referenced
this pull request
Oct 27, 2026
…tor (#1221) The env, workflows, recall, stats, AI backend, votes judge and HTTP agent hook rows of #1221's matrix become a required `features` facet, one `SupportCell` per row: the mark and the evidence letter, as the matrix writes them. A cell a later fix changed (#1193, #1224, #1245, #1374) says so in its note and keeps teamai's-code-only evidence until it is rerun. Data only: nothing reads it but the support page.
SaulMoro
added a commit
that referenced
this pull request
Oct 27, 2026
…tor (#1221) The env, workflows, recall, stats, AI backend, votes judge and HTTP agent hook rows of #1221's matrix become a required `features` facet, one `SupportCell` per row: the mark and the evidence letter, as the matrix writes them. A cell a later fix changed (#1193, #1224, #1245, #1374) says so in its note and keeps teamai's-code-only evidence until it is rerun. Data only: nothing reads it but the support page.
SaulMoro
added a commit
that referenced
this pull request
Oct 27, 2026
…tor (#1221) The env, workflows, recall, stats, AI backend, votes judge and HTTP agent hook rows of #1221's matrix become a required `features` facet, one `SupportCell` per row: the mark and the evidence letter, as the matrix writes them. A cell a later fix changed (#1193, #1224, #1245, #1374) says so in its note and keeps teamai's-code-only evidence until it is rerun. Data only: nothing reads it but the support page.
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.
Closes #1220
Summary
Codex removal maps each surviving file/event/group/handler key to its original key. Identical content in a removed group cannot approve an unapproved survivor.
Evidence
npm run build, usingsource add-httpandhook-dispatchagainst an isolated HTTP fixture. Before on main: ZCode returned"status":"success"andconfig.json changed:; Muse wrote~/.muse/hooks.json; native Codex listedstop:0:0 echo codex-agent-hook untrusted. After: ZCode returned"status":"failed"andconfig.json unchanged; Muse reported~/.config/muse/settings.json schema_version: 1and~/.muse/hooks.json absent; Codex listedstop:0:0 echo codex-agent-hook trustedafter reinstall and removal.stop:0:0 echo personalremainsmodified; bothstop:1:0 echo approved firstandstop:1:1 echo approved secondremaintrusted. The ownership manifest is empty.npx tsc --noEmit,npm run lint, andnpm run buildpass.npx vitest runpasses 11,217 tests, with 21 skipped. Six focused files pass 329 tests; an additional focused run of the local-agent and Codex trust suites passes 190 tests.Merge Danger
Door: two-way
The code can be reverted. Existing settings and ownership records stay in their current formats.
Blast Radius: hooks
Touches HTTP hook installation, replacement, and removal. Codex trust writes require exact retained identity and unchanged native content.
Pre-existing limits remain. Full uninstall later removes built-ins without preserving personal survivor trust. Legacy ZCode records cannot clean native
hooks.eventsthrough the generic remover.Optional next improvement: add a full-uninstall test with trusted built-in, recorded server hook, and personal hook; assert the personal survivor stays trusted after built-in removal.