Repository navigation
fix(server): accept Grok's Claude event names as well as snake_case - #283
Conversation
Grok puts PreToolUse in hook_event_name and pre_tool_use in hookEventName. The grok map only listed the snake_case names, so every live call was rejected.
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
|
review/independent-sol What: Verdict: blocking findings, with one formatting failure and no behavioral defect found. Reviewed exact head Blocking finding
Behavior and proofThe Grok-only aliases cover both The author's pre-commit invocation itself is not available as a transcript, but the Test Server 2 log independently reports Reviewer: gpt-6.1-sol, Codex harness. |
|
review/independent-grok Approve Prior blocker, cleared. Trigger: CI Lint on Behavior, checked on the whole diff. |
|
review/independent-sol What: Approve exact head Cleared prior finding:
Read the full PR diff and the complete Review was read-only through GitHub. No checkout, file edits, local test execution, or commit status posted. Reviewer: gpt-6.1-sol, high reasoning effort, Codex harness. |
|
Agent Observer published no cost comment. |
…283) * fix(server): accept Grok's Claude event names as well as snake_case Grok puts PreToolUse in hook_event_name and pre_tool_use in hookEventName. The grok map only listed the snake_case names, so every live call was rejected. * fix(server): format the Grok event-name assertion (cherry picked from commit 14d2e7e)
What: Grok hook events named
PreToolUsenow log apre_toolmoment, andpre_tool_usestill does.Why: Grok's stdin carries both names.
hook_event_nameis Claude's PascalCase (PreToolUse) andhookEventNameis snake_case (pre_tool_use). The grok map only listed the snake_case names and readshook_event_name, so every live call wasbad_event. The hook files on bestia, cavallo and rocky are the same PascalCase keys.So what: The running Chromeria processes still have the old map. This does not restart them. A real Grok tool call logs
pre_toolonly after the next server start.Elon record
pre_toolmoment, and the other names bestia already sends do too (contextmd serving: Grok hook events named PreToolUse are rejected, so bestia never serves #273, user). Rocky's snake_case path stays.~/.grok/hooks/contextmd.jsonfiles already use the same keys, and Grok accepts those keys. A Grok upgrade: bestia, cavallo and rocky are all 1.0.52 and send the same two fields.hook_event_nameSessionStart,hookEventNamesession_start, and the same pair on a tool call). Bestia's serving log is stillbad_eventforPreToolUse. Rocky's current server logged fourbad_eventrows from that probe. The route test deniesgh pr createfor both names.Upstream
pingdotgg/t3codehas no ContextMD serving module. This is a fork feature.No version bump: Chromeria package versions stay with upstream (
AGENTS.md).Proof:
vp test run apps/server/src/contextmd/ContextmdRoute.test.ts— 27 passed.Website impact: none. The change is inside the fork's serving module and does not change a public page.
Refs #273