Repository navigation
Description
Summary
With Atomic 0.20.0 and the atomic-grok integration (758c750), every hook call from a real Grok Build 1.0.60 session fails to parse its input, so no turn is recorded and nothing is attested. Hooks I drove by hand with my own JSON payloads worked, so the parser seems to disagree with what Grok actually sends.
Environment
- Atomic 0.20.0 (
atomic-aarch64-apple-darwin.tar.gzfrom the v0.20.0 release) - atomic-grok at 758c750e84f4ad8ea2b02886789fda26fe846e37, atomic-skills at 7030496b784347d27bab8ea0d8f50236c03e0f78, both installed with
atomic agent enable --agent grok --from <checkout> --from-skills <checkout> - Grok Build 1.0.60 (stable)
- macOS 26.6.2, arm64
Steps to reproduce
- Create a Git repo with a couple of commits and run
atomic git import. atomic identity new <name> --set-default, then theatomic agent enablecommand above.- Make the hooks visible to Grok in the repo (
.grok/hooks/atomic.json, copied from the installed file);grok inspectlists 6 hooks. - Run
grok --always-approve --max-turns 4 -p "Append one line saying hello to a.txt, then stop."withatomiconPATH.
Expected
The turn is recorded as an Atomic change on a draft view, and atomic agent attest -s reports it as AI-authored (xAI / Grok Build).
Actual
Grok edits the file and fires all six hooks. atomic agent status reports failing: post-tool, pre-tool, session-end, session-start, stop, user-prompt-submit. The log has, for each event:
Internal error: Failed to parse hook input for grok stop: Failed to parse hook input for grok (turn_end): duplicate field `hook_event_name`
exit_code=128
atomic agent attest -s stays at AI-authored: 0%.
Calling atomic agent hooks grok <event> by hand with a minimal payload such as {"session_id":"s1","cwd":"...","prompt":"..."} works: the turn is recorded and attest reports 100% AI-authored.
I did not capture Grok's raw payload, so I can't say which of its fields is duplicated. Happy to capture it if useful.
Related observations (same test, lower priority)
- Import cost on a larger history.
atomic git importof a 1,114-commit repo ran at about 1.8 s/commit and was still slowing at roughly 300 commits (about 190 s per 100 commits)..atomicwas already 445 MB against a 227 MB.git. I stopped it at 15 minutes, and afterwards the repo would not open:repository operation is still completing; retry with a writable repository open. A 35-commit repo imported in 27 s, with.atomicat 113 MB against 7.6 MB for.git. - Interrupted import leaves the repo unusable. After the kill above,
atomic logfails with the "still completing" error. It would help to have a documented recovery (atomic doctor?) or a resumable import. - Delegation scope not enforced locally. An agent identity created with
atomic identity agent create grok-lane --views "agent-*" --localcould stillatomic recordontomain. Maybe scope is only enforced on push; if so, a note in the docs would help. - Tag import.
v1.0.0-beta.1was refused withpeels to commit ..., which has no verified Git state binding; refusing to import an unbound tag. It's unclear from the message how to fix that.
Activity
vinceblock99 commentedon Nov 13, 2026
Thanks for the detailed report, @mrhinkle. The hook failure is fixed in #337, now merged to
dev. It is not in a release yet: 0.22.1 still has the bug, so the fix will be in the next release after it.What was wrong. Grok sends most top-level fields twice in each hook payload, once under its own camelCase key and once under Claude's snake_case key (
sessionIdandsession_id,hookEventNameandhook_event_name, and so on). Our parser accepted either spelling but rejected a payload that carried both, so every hook from a real session failed. Your hand-written payloads worked because they used only one spelling. No need to capture the raw payload any more.How it was checked. I followed your steps (Git repo,
atomic git import,atomic agent enable --agent grok --from … --from-skills …with the sameatomic-grokandatomic-skillsrevisions, then agrok -psession that edits a file) with Grok Build 1.0.60 and 1.0.77:atomic agent statusatomic agent attest -sAI-authored: 0%AI-authored: 100%(xAI / Grok Build)One thing you may hit next. In a Git-imported repo, an identity created without an email (
atomic identity new <name> --set-default, as in your step 2) makesatomic recordend with:The change is still recorded, but the command exits with an error, and the Grok
stophook then shows as failing. This is a separate bug in 0.22.1, not specific to Grok. Until it is fixed, create the identity with an email:atomic identity new <name> -e you@example.com --set-default.The four related observations in this issue (import cost, interrupted import, delegation scope, tag import) are not covered by #337, so I'm leaving the issue open for them.