[auto] sync agent CLI harnesses with upstream docs#485
Conversation
Append newly-documented hook events and fix two timeout-unit bugs found by comparing each integrated CLI's upstream docs to this repo. Scope 1 (event names): - Claude: append `Setup`, `MessageDisplay` (no event map — build stays green) - Codex: append `subagent_start`, `pre_compact`, `post_compact`, `subagent_stop`. CODEX_EVENT_MAP entries are intentionally NOT added so `tsc` fails until a reviewer picks the canonical HookEventType (per the map-bearing-CLI rule) — see PR checklist. - Copilot: append `PostToolUseFailure`, `ErrorOccurred`, `PreCompact`, `PermissionRequest` (docs show explicit PascalCase variants; no event map — build stays green). `notification` / `subagentStart` are camelCase-only upstream and deferred to the reviewer. Scope 3 (settings-file shape, #482-class timeout-unit fix): - Claude and Cursor read `timeout` in SECONDS per their docs (Claude "60 for agent"; Cursor "Execution timeout in seconds"), so the old `60000` meant ~16.7h. Corrected writer + dogfood fixtures + unit tests to `60`. Gemini's `timeout` is genuinely milliseconds (default 60000) and is left unchanged. Verified each claim by fetching the primary docs directly. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughHook timeout values for Claude Code and Cursor integrations were corrected from milliseconds to seconds across configs and builders. Codex, Copilot, and Claude hook event type unions were expanded with new documented events. Tests and changelog were updated to match. ChangesHook Timeout Fix and Event Type Expansion
Estimated code review effort: 2 (Simple) | ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
Warning Tools execution failed with the following error: Failed to run tools: 13 INTERNAL: Received RST_STREAM with code 2 (Internal server error) Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/hooks/integrations.ts`:
- Around line 598-604: The timeout change is fine, but the Cursor hook event set
is inconsistent: `CURSOR_HOOK_EVENT_TYPES` includes `subagentStop`, while the
`.cursor/hooks.json` configuration only wires up six events and omits it. Update
the hook setup in `src/hooks/integrations.ts` and the generated Cursor config so
the event count matches the intended “7-event subset,” or explicitly keep
`subagentStop` excluded if that is intentional and make the mapping/comments
consistent.
In `@src/hooks/types.ts`:
- Around line 21-30: Add the missing Codex hook event mappings so the exhaustive
Record<CodexHookEventType, HookEventType> in src/hooks/types.ts is complete.
Update CODEX_EVENT_MAP to include entries for subagent_start, pre_compact,
post_compact, and subagent_stop, matching the existing HookEventType naming used
by the other Codex events, and keep CODEX_HOOK_EVENT_TYPES and CODEX_EVENT_MAP
in sync so tsc no longer fails on the missing keys.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: bdf81f39-d5fe-43ce-8577-42722e4ebcee
📒 Files selected for processing (7)
.claude/settings.json.cursor/hooks.jsonCHANGELOG.md__tests__/hooks/integrations.test.ts__tests__/hooks/manager.test.tssrc/hooks/integrations.tssrc/hooks/types.ts
| // `timeout` is documented in SECONDS in Cursor's schema per | ||
| // https://cursor.com/docs/hooks ("Execution timeout in seconds"; doc examples | ||
| // use 30 and 10), NOT milliseconds. 60 = 60s; the old 60000 meant ~16.7h. | ||
| return { | ||
| type: "command", | ||
| command, | ||
| timeout: 60_000, | ||
| timeout: 60, |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Count events in .cursor/hooks.json and check Cursor event types in types.ts
cat .cursor/hooks.json | jq '.hooks | keys | length'
rg -n 'cursor' src/hooks/types.ts -iRepository: FailproofAI/failproofai
Length of output: 2224
🏁 Script executed:
#!/bin/bash
# View the CURSOR_HOOK_EVENT_TYPES array definition
sed -n '187,196p' src/hooks/types.ts
echo "---"
# View the .cursor/hooks.json to see exactly which events are configured
cat .cursor/hooks.jsonRepository: FailproofAI/failproofai
Length of output: 1473
🏁 Script executed:
# Search for any mention of "7" in the file or "7-event" in PR context
rg '7\s*event|7-event' src/hooks/integrations.ts -i -A 2 -B 2
rg '7' src/hooks/types.ts -A 1 -B 1Repository: FailproofAI/failproofai
Length of output: 1205
Cursor timeout fix is correct; verify event count discrepancy.
The timeout correction from 60_000 to 60 with seconds-based comments is consistent with the Cursor builder, .cursor/hooks.json, and integrations.test.ts:417. The PR objectives correctly reference a "7-event subset"; src/hooks/integrations.ts:173 confirms this is "6 events that align with Claude's canonical types plus subagentStop". However, .cursor/hooks.json configures only 6 events (sessionStart, sessionEnd, beforeSubmitPrompt, preToolUse, postToolUse, stop), omitting subagentStop despite CURSOR_HOOK_EVENT_TYPES in types.ts:187 including it. Clarify whether the subagentStop hook configuration is intentionally excluded or should be added to the .cursor/hooks.json file.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/hooks/integrations.ts` around lines 598 - 604, The timeout change is
fine, but the Cursor hook event set is inconsistent: `CURSOR_HOOK_EVENT_TYPES`
includes `subagentStop`, while the `.cursor/hooks.json` configuration only wires
up six events and omits it. Update the hook setup in `src/hooks/integrations.ts`
and the generated Cursor config so the event count matches the intended “7-event
subset,” or explicitly keep `subagentStop` excluded if that is intentional and
make the mapping/comments consistent.
| // Newly documented upstream (https://developers.openai.com/codex/hooks) — | ||
| // snake_case forms of the documented SubagentStart / PreCompact / PostCompact / | ||
| // SubagentStop events. Their CODEX_EVENT_MAP entries are intentionally NOT added | ||
| // here: the canonical HookEventType is a reviewer decision, and the missing keys | ||
| // make the exhaustive `Record<CodexHookEventType, HookEventType>` below fail tsc | ||
| // on purpose so this drift is not silently half-applied. See PR body checklist. | ||
| "subagent_start", | ||
| "pre_compact", | ||
| "post_compact", | ||
| "subagent_stop", |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify CODEX_EVENT_MAP exists and uses Record<CodexHookEventType, HookEventType>
rg -n 'CODEX_EVENT_MAP' src/hooks/types.ts -A 15Repository: FailproofAI/failproofai
Length of output: 1422
🏁 Script executed:
sed -n '1,120p' src/hooks/types.tsRepository: FailproofAI/failproofai
Length of output: 5714
Add the missing Codex event mappings
CODEX_HOOK_EVENT_TYPES now includes subagent_start, pre_compact, post_compact, and subagent_stop, but CODEX_EVENT_MAP still omits those keys. That leaves the exhaustive Record<CodexHookEventType, HookEventType> incomplete and keeps tsc failing until the four mappings are added.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/hooks/types.ts` around lines 21 - 30, Add the missing Codex hook event
mappings so the exhaustive Record<CodexHookEventType, HookEventType> in
src/hooks/types.ts is complete. Update CODEX_EVENT_MAP to include entries for
subagent_start, pre_compact, post_compact, and subagent_stop, matching the
existing HookEventType naming used by the other Codex events, and keep
CODEX_HOOK_EVENT_TYPES and CODEX_EVENT_MAP in sync so tsc no longer fails on the
missing keys.
|
🔍 Automated code review started — analyzing [{"additions":26,"deletions":26,"path":".claude/settings.json"},{"additions":6,"deletions":6,"path":".cursor/hooks.json"},{"additions":8,"deletions":0,"path":"CHANGELOG.md"},{"additions":3,"deletions":3,"path":"tests/hooks/integrations.test.ts"},{"additions":4,"deletions":4,"path":"tests/hooks/manager.test.ts"},{"additions":10,"deletions":4,"path":"src/hooks/integrations.ts"},{"additions":26,"deletions":0,"path":"src/hooks/types.ts"}] files, +83/-43... ⏱️ This may take a few minutes. Results will be posted here when complete. |
| "subagent_start", | ||
| "pre_compact", | ||
| "post_compact", | ||
| "subagent_stop", |
There was a problem hiding this comment.
🔴 BLOCKER — this intentionally fails tsc, and that failure cascades into all 7 CI jobs.
These 4 events are added to CODEX_HOOK_EVENT_TYPES but not to CODEX_EVENT_MAP (line 34), which is typed Record<CodexHookEventType, HookEventType>. That is a hard compile error:
./src/hooks/types.ts:34:14
Type error: Type '{ session_start … stop: "Stop"; }' is missing the following
properties from type 'Record<…>': subagent_start, pre_compact, post_compact, subagent_stop
Why it's worse than "just a tsc gate": package.json → "prepare": "bun run build" → next build → type-check. Every CI job begins with bun install --frozen-lockfile, which runs prepare, so the type error aborts the install step itself:
error: script "build" exited with code 1
error: prepare script from "failproofai" exited with 1
##[error]Final attempt failed. Child_process exited with error code 1
Result: quality, test (×3), build, docs, and test-e2e all go red at Install dependencies — including jobs that have nothing to do with this change. (Confirmed in the quality job log and reproduced locally.)
Runtime bug, independent of tsc: writeHookEntries (integrations.ts:307-310) does const pascalKey = CODEX_EVENT_MAP[eventType] → undefined for these 4, then s.hooks[pascalKey] writes under the literal string key "undefined". All 4 collapse into one bogus "undefined" entry, so a real Codex install emits a malformed hooks.json and only 7 of 10 hooks land. This is exactly why the runtime test fails:
FAIL __tests__/hooks/integrations.test.ts > OpenAI Codex integration >
removeHooksFromFile clears all failproofai entries (returns count)
AssertionError: expected 7 to be 10
The shipped dist/index.js is esbuild-bundled and never type-checked, so the tsc "gate" does not protect end users from this — it only reddens CI.
The fix is trivial and unambiguous — every canonical target already exists in HOOK_EVENT_TYPES (lines 560, 561, 573, 574). Add these 4 lines to CODEX_EVENT_MAP:
subagent_start: "SubagentStart",
pre_compact: "PreCompact",
post_compact: "PostCompact",
subagent_stop: "SubagentStop",CI then goes green and the removeHooksFromFile test passes. The "canonical mapping is a reviewer decision" framing overstates the difficulty: this is a 1:1 mapping onto events that already exist, and the PR body itself already names each target ("likely SubagentStart", …). Recommend resolving it in this PR rather than shipping a knowingly-red branch that also blocks the (correct) timeout fix from landing.
| }); | ||
|
|
||
| it("eventTypes are exactly the 6 documented Codex events (snake_case)", () => { | ||
| it("eventTypes are exactly the 10 documented Codex events (snake_case)", () => { |
There was a problem hiding this comment.
🔵 Minor (test quality): the description now says "exactly the 10 documented Codex events", but the assertion below (expect(codex.eventTypes).toEqual(CODEX_HOOK_EVENT_TYPES)) is tautological — codex.eventTypes is CODEX_HOOK_EVENT_TYPES (see integrations.ts:257), so it passes for any array of any length and never actually pins the count at 10.
If the intent is to guard the count, assert it directly:
expect(codex.eventTypes).toHaveLength(10);Not blocking, but worth tightening while you're touching this line — otherwise a future accidental add/remove of a Codex event slips through this test silently.
🔍 Automated Code Review📋 Executive SummaryThis PR does two independent things: (1) a genuine, well-verified bug fix — correcting the Claude & Cursor hook 📊 Change Architecturegraph TD
A["types.ts — CODEX_HOOK_EVENT_TYPES<br/>+4 events (subagent_start …)"] -->|"NOT added to"| B["CODEX_EVENT_MAP<br/>Record<CodexHookEventType, HookEventType><br/>(still only 6 keys)"]
B -->|"missing 4 keys → TS error"| C["tsc / next build FAILS"]
C -->|"package.json prepare → bun run build"| D["bun install --frozen-lockfile FAILS"]
D --> E["🔴 ALL 7 CI JOBS RED<br/>quality · test×3 · build · docs · test-e2e"]
A -->|"runtime: pascalKey = undefined"| F["writeHookEntries → s.hooks['undefined']<br/>🔴 removeHooksFromFile: expected 7 to be 10"]
G["integrations.ts + .claude/settings.json<br/>+ .cursor/hooks.json — timeout 60000 → 60"] -->|"verified vs upstream docs"| H["🟢 correct fix (seconds, not ms)"]
I["Claude +Setup +MessageDisplay<br/>Copilot +4 events"] -->|"no event map"| J["🟢 build-safe additions"]
style A fill:#FFD700
style B fill:#FFD700
style C fill:#FF6B6B
style D fill:#FF6B6B
style E fill:#FF6B6B
style F fill:#FF6B6B
style G fill:#87CEEB
style H fill:#90EE90
style I fill:#90EE90
style J fill:#90EE90
Legend: 🟢 New / correct · 🔵 Modified · 🟡 Breaking-change risk · 🔴 Failing 🔴 Breaking Changes
|
hermes-exosphere
left a comment
There was a problem hiding this comment.
🔴 Changes requested — 1 blocker.
All 7 CI jobs are red and one unit test fails, both from a single root cause: 4 new Codex events were added to CODEX_HOOK_EVENT_TYPES but not to CODEX_EVENT_MAP (src/hooks/types.ts:34), so tsc/next build fails — and because package.json's prepare runs the build, that aborts bun install --frozen-lockfile in every job (including docs/test-e2e). At runtime it also makes writeHookEntries emit a bogus "undefined" hook key (removeHooksFromFile … expected 7 to be 10).
Fix (4 lines, targets already exist in HOOK_EVENT_TYPES):
subagent_start: "SubagentStart",
pre_compact: "PreCompact",
post_compact: "PostCompact",
subagent_stop: "SubagentStop",The rest is good: the Claude/Cursor timeout 60000 → 60 fix is verified correct against the upstream docs (both read seconds; old value ≈ 16.7h), and the Claude/Copilot map-free event additions are build-safe. See the full summary comment + inline notes for evidence.
The prior commit added subagent_start/pre_compact/post_compact/subagent_stop to CODEX_HOOK_EVENT_TYPES but intentionally left their CODEX_EVENT_MAP entries out to fail tsc as a reviewer flag. Each has an exact 1:1 canonical HookEventType (SubagentStart/PreCompact/PostCompact/SubagentStop, all already in HOOK_EVENT_TYPES), so fill them in directly. Besides unblocking tsc, this fixes a real runtime bug: with no mapping, writeHookEntries resolved CODEX_EVENT_MAP[event] to undefined and collapsed all four events into a single literal "undefined" key in users' .codex/hooks.json (the source of the removeHooksFromFile "7 vs 10" test failure). The map is exhaustive, so tsc still guards against a future event-added-mapping-missing drift. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The prior commit appended both Setup and MessageDisplay to HOOK_EVENT_TYPES. writeHookEntries installs a failproofai hook for every entry in that array, so appending MessageDisplay would spawn a subprocess on every assistant message render — and the docs mark MessageDisplay observe-only (cannot block or modify, no matcher support), so that cost buys zero enforcement value. Keep Setup (fires only on --init/--maintenance; low-frequency, harmless to install) and defer MessageDisplay to the reviewer checklist with a documented NOTE, mirroring how the sync bot defers uncertain items. Net event count is 29, so update the two manager.test count assertions and the description. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The prior commit's comment claimed both notification and subagentStart are camelCase-only upstream. Re-checking the cli-hooks-reference: Notification DOES have a documented PascalCase "VS Code compatible" variant, so append it to COPILOT_HOOK_EVENT_TYPES (no event map, build stays green). Only subagentStart is genuinely camelCase-only, so it stays deferred to the reviewer checklist. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- The Codex timeout comment said the field is `timeout_sec`; docs confirm it is literally `timeout` (unit seconds, default 600). Fix the comment. - Rewrite the 0.0.13-beta.0 changelog entry to describe the reviewed result: Codex map completed, Copilot Notification added, MessageDisplay deferred. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
🔍 Automated code review started — analyzing [{"additions":26,"deletions":26,"path":".claude/settings.json"},{"additions":6,"deletions":6,"path":".cursor/hooks.json"},{"additions":8,"deletions":0,"path":"CHANGELOG.md"},{"additions":3,"deletions":3,"path":"tests/hooks/integrations.test.ts"},{"additions":4,"deletions":4,"path":"tests/hooks/manager.test.ts"},{"additions":12,"deletions":5,"path":"src/hooks/integrations.ts"},{"additions":40,"deletions":0,"path":"src/hooks/types.ts"}] files, +99/-44... ⏱️ This may take a few minutes. Results will be posted here when complete. |
|
|
||
| it("eventTypes are exactly the 6 documented Codex events (snake_case)", () => { | ||
| it("eventTypes are exactly the 10 documented Codex events (snake_case)", () => { | ||
| expect(codex.eventTypes).toEqual(CODEX_HOOK_EVENT_TYPES); |
There was a problem hiding this comment.
🔵 Nit (non-blocking, test hygiene) — this assertion is tautological. codex.eventTypes is CODEX_HOOK_EVENT_TYPES (src/hooks/integrations.ts:427), so toEqual(CODEX_HOOK_EVENT_TYPES) compares the array to itself and can never fail. The title now claims "exactly the 10", but nothing pins the count — if an 11th Codex event were appended, this test stays green.
Fix — assert the length so the title's invariant is actually enforced:
expect(codex.eventTypes).toHaveLength(10);
expect(codex.eventTypes).toContain("permission_request");Separately, the comment two tests below (line ~208, buildHookEntry sets timeout in SECONDS) still reads "its timeout_sec field". Per the docs this PR cites (developers.openai.com/codex/hooks), the field is literally timeout — the source comment in integrations.ts was corrected in 2eaadd0, but this parallel test comment was missed. Both are cosmetic; neither blocks merge.
🔍 Automated Code Review (re-review — blocker resolved ✅)📋 Executive SummaryThis re-review covers the 4 new commits ( That blocker is fully resolved. Commit 📊 What changed since the last reviewgraph TD
A["Prior review: 🔴 CHANGES_REQUESTED<br/>CODEX_EVENT_MAP missing 4 keys → tsc fail<br/>+ runtime undefined-key bug"] -->|"2cd5eda"| B["CODEX_EVENT_MAP +4 entries<br/>subagent_start→SubagentStart · pre_compact→PreCompact<br/>post_compact→PostCompact · subagent_stop→SubagentStop"]
B --> C["tsc --noEmit ✅ PASS"]
B --> D["removeHooksFromFile now 10/10 ✅<br/>(was 7/10)"]
C --> E["🟢 All 7 CI jobs GREEN on HEAD<br/>quality · test×3 · build · docs · test-e2e"]
D --> E
F["5830f7c — drop MessageDisplay<br/>(observe-only, per-message, no matcher)"] -->|"30 → 29 events"| G["manager tests updated ✅"]
H["2272768 — Copilot +Notification<br/>(PascalCase variant confirmed in docs)"] --> I["build-safe (no COPILOT_EVENT_MAP)"]
J["2eaadd0 — comment: field is 'timeout'<br/>not 'timeout_sec' + changelog"] --> K["✅ matches docs · one stale test<br/>comment (L208) left behind 🔵"]
style B fill:#90EE90
style C fill:#90EE90
style D fill:#90EE90
style E fill:#90EE90
style G fill:#90EE90
style I fill:#90EE90
style K fill:#FFD700
Legend: 🟢 Fixed / correct · 🟡 Minor cosmetic nit 🔴 Breaking Changes✅ None remaining. The prior "CI red by design" state is gone — ✅ Blocker resolution — verified
🔬 Correctness verification vs. upstream docs
|
hermes-exosphere
left a comment
There was a problem hiding this comment.
Automated re-review — blocker resolved. ✅
The previous review requested changes for one blocker: CODEX_EVENT_MAP was missing the 4 newly-added Codex events, failing tsc (all CI red) and writing an undefined hook key at runtime. Commit 2cd5eda completes the map with the correct 1:1 canonical mappings.
Verified on HEAD (2eaadd0):
bunx tsc --noEmitpasses.bun run test:run→ 1907/1907 pass (incl. the previously-failingremoveHooksFromFile, now 10/10).- All 7 CI jobs green.
- Codex events/mappings, Copilot
Notification, and the Codextimeoutfield name all match the upstream docs the PR cites.
Two cosmetic test-hygiene nits remain (tautological "exactly the 10" assertion; a stale timeout_sec comment) — non-blocking, noted inline. Good to merge.
Automated sync of failproofai's per-CLI hook harnesses against upstream documentation. One subagent per CLI fetched the primary docs; every actioned claim below was then re-verified by fetching the primary source directly from the main run.
Summary
Setup,MessageDisplaytimeoutunit (s)tscfail)timeoutunit (s)save_memorynote✅ applied · 📋 deferred to reviewer checklist · — no drift · ❔ could not verify
Per-CLI detail
Claude Code — drift (applied)
Setup(fires on--init/--maintenance) andMessageDisplay(fires while assistant text is displayed; docs lower itstimeoutdefault to 10s). Both appended toHOOK_EVENT_TYPES(no event map → build stays green). Test counts updated 28 → 30 inmanager.test.ts.timeoutis seconds ("Seconds before canceling. Defaults: 600 for command …; 60 for agent"). The repo wrote60000(documented as ms) → ~16.7h. Fixed writer +.claude/settings.jsonfixture + unit tests to60.OpenAI Codex — drift (applied, map deferred)
SubagentStart,PreCompact,PostCompact,SubagentStopbeyond the existing 6. Appended their snake_case forms (subagent_start,pre_compact,post_compact,subagent_stop) toCODEX_HOOK_EVENT_TYPES, following the repo's established snake_case→Pascal convention.CODEX_EVENT_MAPentries are intentionally omitted so the exhaustiveRecord<CodexHookEventType, HookEventType>failstscuntil a reviewer picks the canonical mapping (see checklist).timeout(seconds) and the no-versionshape remain correct (already fixed in fix(codex): drop invalid top-levelversionfield + correct timeout unit (seconds) #482).CODEX_EVENT_MAP. The appended events use the same snake_case derivation as the existing 6 — flagged for reviewer awareness, not changed.GitHub Copilot — drift (applied + deferred)
PostToolUseFailure,ErrorOccurred,PreCompact,PermissionRequest— the docs show explicit PascalCase "VS Code compatible" variants for each. No event map → build stays green.notificationandsubagentStartare newly documented but appear camelCase-only (no PascalCase variant shown) — deferred rather than guessing a casing.web_search,ask_user,update_todo,task, which are absent fromCOPILOT_TOOL_MAP. Not auto-added (canonical mapping is a human decision).Cursor Agent — drift (applied)
timeoutis seconds ("Execution timeout in seconds"; examples30,10). Repo wrote60000(documented as ms). Fixed writer +.cursor/hooks.jsonfixture + unit test to60.postToolUseFailure,subagentStart,beforeShellExecution,afterShellExecution,beforeMCPExecution,afterMCPExecution,beforeReadFile,afterFileEdit,preCompact,stop,afterAgentResponse,afterAgentThought, plus Tab/App-lifecycle families). These are by-design omissions — deferred to the reviewer.OpenCode — drift (report only, no code change)
permission.askis still a real plugin function (none renamed/removed). The bulk of the extras are observation-only with no canonical mapping; the only actionable new ones arepermission.asked,permission.replied, andshell.env— deferred..opencode/plugins/files auto-load without aplugin-array entry, contradicting the repo's live-verified (opencode v1.14.33) "must register" gotcha. The explicit registration is a safe superset and is kept; re-verify before removing.Pi — unverified
PI_*tables untouched.Gemini CLI — up to date
GEMINI_HOOK_EVENT_TYPES.timeoutis genuinely milliseconds (docs: "Execution timeout in milliseconds (default: 60000)"), so the repo's60000is correct — left unchanged (this is why the Claude/Cursor fix does not touch Gemini).save_memory(→Memory) was not in the current tools-reference snapshot — deferred for verification.Reviewer checklist
subagent_start: "???"toCODEX_EVENT_MAPinsrc/hooks/types.ts(canonical ClaudeHookEventTypechosen by reviewer — likelySubagentStart).pre_compact: "???"toCODEX_EVENT_MAPinsrc/hooks/types.ts(likelyPreCompact).post_compact: "???"toCODEX_EVENT_MAPinsrc/hooks/types.ts(likelyPostCompact).subagent_stop: "???"toCODEX_EVENT_MAPinsrc/hooks/types.ts(likelySubagentStop).--hookevent args (docs show PascalCase config keys) vs the repo's snake_case model; adjust the snake_case appends if needed.notification/subagentStartand appendNotification/SubagentStarttoCOPILOT_HOOK_EVENT_TYPESif valid.web_search,ask_user,update_todo,taskand add toCOPILOT_TOOL_MAPinsrc/hooks/types.ts.postToolUseFailure,subagentStart,preCompact,afterAgentResponse, …).permission.asked/permission.replied/shell.env(the only actionable new events; rest are observation-only)..opencode/plugins/auto-loads before touching the explicitplugin-array registration (kept as a safe superset).save_memorywas renamed/removed (absent from the current tools-reference snapshot) before changingGEMINI_TOOL_MAP.Sources
Unverified notes
CI is expected to fail on this PR if a map-bearing CLI gained new events — a reviewer must add the missing
*EVENT_MAPentries (replacing"???") before merging. For drift in Claude or Copilot only (no event map), CI should pass on this commit alone. CI must pass and this PR must be reviewed before merging.Summary by CodeRabbit
New Features
Bug Fixes
Tests
Chores