feat(harness): add Grok Build CLI as the 7th harness#197
Conversation
Wire Grok Build (grok agent) into Honeycomb as a hook-protocol harness alongside claude-code, codex, cursor, hermes, pi, and openclaw. Grok shares the Claude/Codex lifecycle hook shape, so the adapter reuses the shared runHookBinary driver and only supplies its own shim. - src/hooks/grok/shim.ts: maps PascalCase + snake_case native events, intercepts run_terminal_command/Bash for VFS recall, brief user-visible login line, workspaceRoot cwd derivation. - harnesses/grok/: thin-client bundle entry (esbuild target added). - src/connectors/grok.ts: writes ~/.grok/hooks/honeycomb.json, preserving foreign hooks; detects install via ~/.grok. - references/grok/hooks-schema.ts: executable zod schema for the hook file. - Register grok across the canonical set: harness-registry (now seven), harness-detect markers, summary host CLI (grok agent stdio), asset-sync skill/agent dirs, dashboard dot palette, connector registry. - Tests: grok shim + connector suites; update harness-identity, harness-api, harness-detect, capture-handler to the canonical seven.
…omments The Grok harness made the canonical set seven, but user-facing copy, dashboard tests, and inline comments still said six. Update the README badge and supported-harnesses table, AGENTS.md, the knowledge docs, and the six->seven prose throughout the dashboard registry/detect/api modules. Fix the harness-installed-wiring and harnesses-page suites to expect seven (adding the Grok marker and fixture), and revert incidental package-lock churn so the diff stays scoped to the harness change.
|
I have read the CLA Document and I hereby sign the CLA |
|
All contributors have signed the CLA ✍️ ✅ |
📝 WalkthroughWalkthroughAdds Grok Build CLI as a canonical seventh harness. A new hook shim normalizes Grok lifecycle payloads, a new connector installs hooks into ChangesGrok Harness Integration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
| name: "grok", | ||
| // src/connectors/grok.ts: configPath = ~/.grok/hooks/honeycomb.json; pluginRoot = ~/.grok/plugins/honeycomb. | ||
| paths: (h) => [ | ||
| join(h, ".grok", "hooks", "honeycomb.json"), |
There was a problem hiding this comment.
Potential file inclusion attack via reading file - high severity
If an attacker can control the input leading into the ReadFile function, they might be able to read sensitive files and launch further attacks with that information.
Show fix
Remediation: Ignore this issue only after you've verified or sanitized the input going into this function. This issue is only relevant in the backend, not in the frontend!
Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info
| // src/connectors/grok.ts: configPath = ~/.grok/hooks/honeycomb.json; pluginRoot = ~/.grok/plugins/honeycomb. | ||
| paths: (h) => [ | ||
| join(h, ".grok", "hooks", "honeycomb.json"), | ||
| join(h, ".grok", "plugins", "honeycomb"), |
There was a problem hiding this comment.
Potential file inclusion attack via reading file - medium severity
If an attacker can control the input leading into the ReadFile function, they might be able to read sensitive files and launch further attacks with that information.
Show fix
Remediation: Ignore this issue only after you've verified or sanitized the input going into this function. This issue is only relevant in the backend, not in the frontend!
Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (2)
src/hooks/binary.ts (1)
139-139: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winKeep
workspaceRootaliasing in the Grok shim
src/hooks/binary.tsnow acceptsworkspaceRootfor every hook-based harness, which makesgrokDeriveMetaredundant for that field. Move this alias lookup back intosrc/hooks/grok/shim.tsunless another harness will emitworkspaceRoot.🤖 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/binary.ts` at line 139, Move the workspace root alias handling back out of the shared hook parsing in binary.ts and into grok/shim.ts, since only the Grok shim should translate workspaceRoot for now. Update the binary hook’s cwd parsing to use the canonical field names only, and keep the alias lookup in grokDeriveMeta or the Grok shim path so other harnesses do not silently accept workspaceRoot.references/grok/hooks-schema.ts (1)
22-43: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueUse
z.looseObjecthere instead of.passthrough()Zod 4 deprecates
.passthrough()in favor of the top-levelz.looseObject(...)constructor. This is a straightforward migration for these schemas.♻️ Suggested migration to
z.looseObject-export const grokHookHandler = z - .object({ - type: z.string().min(1), - command: z.string().min(1), - timeout: z.number().optional(), - }) - .passthrough(); +export const grokHookHandler = z.looseObject({ + type: z.string().min(1), + command: z.string().min(1), + timeout: z.number().optional(), +}); -export const grokMatcherBlock = z - .object({ - matcher: z.string().optional(), - hooks: z.array(grokHookHandler), - }) - .passthrough(); +export const grokMatcherBlock = z.looseObject({ + matcher: z.string().optional(), + hooks: z.array(grokHookHandler), +}); export const grokHooksMap = z.record(z.string(), z.array(grokMatcherBlock)); -export const grokHooksFile = z - .object({ - hooks: grokHooksMap.optional(), - }) - .passthrough(); +export const grokHooksFile = z.looseObject({ + hooks: grokHooksMap.optional(), +});🤖 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 `@references/grok/hooks-schema.ts` around lines 22 - 43, Replace the deprecated .passthrough() usage in grokHookHandler, grokMatcherBlock, and grokHooksFile with z.looseObject(...) while keeping the same field definitions and optionality. Use the existing schema symbols (grokHookHandler, grokMatcherBlock, grokHooksFile) to migrate each object schema to the Zod 4 loose object constructor, and leave grokHooksMap unchanged since it is a record schema.
🤖 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 `@library/knowledge/private/integrations/harness-integration.md`:
- Line 20: The harness support matrix is missing Grok, which makes the document
inconsistent with the updated prose. Update the support table in the same
document to add Grok alongside the other harnesses, and make sure the entries
stay aligned with the existing support/surface information shown by the matrix
and the surrounding section.
In `@library/knowledge/private/integrations/hook-lifecycle.md`:
- Line 5: The hook event coverage matrix is missing the Grok harness column,
which makes the seven-harness intro inconsistent with the table. Update the
matrix in hook-lifecycle.md so it includes Grok alongside the existing
harnesses, and make sure the hook rows still describe the same events/behaviors
across all seven harnesses. Verify the surrounding text stays aligned with the
updated table and that any references to the harness count match the expanded
matrix.
In `@README.md`:
- Around line 196-202: The README now lists seven coding harnesses in the table,
but the earlier ASCII harness diagram still shows only six, so the two sections
conflict. Update the existing diagram in README to include the missing harness
so it matches the seven-harness table, using the same harness names already
shown in the table and diagram.
---
Nitpick comments:
In `@references/grok/hooks-schema.ts`:
- Around line 22-43: Replace the deprecated .passthrough() usage in
grokHookHandler, grokMatcherBlock, and grokHooksFile with z.looseObject(...)
while keeping the same field definitions and optionality. Use the existing
schema symbols (grokHookHandler, grokMatcherBlock, grokHooksFile) to migrate
each object schema to the Zod 4 loose object constructor, and leave grokHooksMap
unchanged since it is a record schema.
In `@src/hooks/binary.ts`:
- Line 139: Move the workspace root alias handling back out of the shared hook
parsing in binary.ts and into grok/shim.ts, since only the Grok shim should
translate workspaceRoot for now. Update the binary hook’s cwd parsing to use the
canonical field names only, and keep the alias lookup in grokDeriveMeta or the
Grok shim path so other harnesses do not silently accept workspaceRoot.
🪄 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 Plus
Run ID: b936060f-4f18-4ea1-a55a-83e4b43323b4
📒 Files selected for processing (34)
AGENTS.mdREADME.mdassets/readme.mdesbuild.config.mjsharnesses/grok/src/index.tslibrary/knowledge/private/architecture/cli-dispatcher.mdlibrary/knowledge/private/integrations/harness-integration.mdlibrary/knowledge/private/integrations/hook-lifecycle.mdlibrary/knowledge/private/overview.mdpackage.jsonreferences/grok/hooks-schema.tssrc/cli/connector-runner.tssrc/commands/dispatch.tssrc/connectors/grok.tssrc/connectors/index.tssrc/daemon-client/assets/install.tssrc/daemon/runtime/assemble.tssrc/daemon/runtime/dashboard/harness-api.tssrc/daemon/runtime/dashboard/harness-detect.tssrc/daemon/runtime/dashboard/harness-registry.tssrc/daemon/runtime/summaries/job.tssrc/dashboard/web/pages/harnesses.tsxsrc/dashboard/web/panels.tsxsrc/hooks/binary.tssrc/hooks/grok/shim.tssrc/hooks/index.tstests/connectors/grok.test.tstests/daemon/runtime/capture/capture-handler.test.tstests/daemon/runtime/dashboard/harness-api.test.tstests/daemon/runtime/dashboard/harness-detect.test.tstests/daemon/runtime/dashboard/harness-installed-wiring.test.tstests/dashboard/web/harnesses-page.test.tsxtests/hooks/grok/shim.test.tstests/hooks/harness-identity-stamp.test.ts
| Honeycomb does not try to be another agent shell. It runs underneath the harnesses people already use and gives them one shared memory layer. The challenge is that every harness exposes a different extension surface, and they share almost nothing at the integration layer. The answer is to write the memory logic once in the daemon and wrap it per harness with a thin shim. Adding a harness means writing a shim and a connector subclass, not a memory engine. | ||
|
|
||
| Honeycomb wires six harnesses: **Claude Code, Codex, Cursor, Hermes, pi, and OpenClaw**. Each reaches the daemon through the same three surfaces, and the daemon, which is the only process that touches DeepLake, does the real work behind every one of them. | ||
| Honeycomb wires seven harnesses: **Claude Code, Codex, Cursor, Grok, Hermes, pi, and OpenClaw**. Each reaches the daemon through the same three surfaces, and the daemon, which is the only process that touches DeepLake, does the real work behind every one of them. |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Add Grok to the support matrix.
The prose now says seven harnesses, but the matrix below still only lists six and omits Grok. That leaves the doc internally inconsistent until the table is updated too.
Suggested fix
| Claude Code | ... |
| Codex | ... |
| Cursor | ... |
+| Grok | ... |
| Hermes | ... |
| pi | ... |
| OpenClaw | ... |🤖 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 `@library/knowledge/private/integrations/harness-integration.md` at line 20,
The harness support matrix is missing Grok, which makes the document
inconsistent with the updated prose. Update the support table in the same
document to add Grok alongside the other harnesses, and make sure the entries
stay aligned with the existing support/surface information shown by the matrix
and the surrounding section.
| > Category: Integrations | Version: 1.0 | Date: June 2026 | Status: Active | ||
|
|
||
| Which hook events fire on each of the six harnesses, what each hook does, and how the shared session-start seam now auto-pulls both team skills and portable assets, every hook a thin client that hands capture, recall, and pipeline work to the Honeycomb daemon. | ||
| Which hook events fire on each of the seven harnesses, what each hook does, and how the shared session-start seam now auto-pulls both team skills and portable assets, every hook a thin client that hands capture, recall, and pipeline work to the Honeycomb daemon. |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Add the Grok column to the hook matrix.
The intro now says seven harnesses, but the event-coverage table below still has only six harness columns and no Grok entry. The doc will read inconsistently until that matrix is extended.
🤖 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 `@library/knowledge/private/integrations/hook-lifecycle.md` at line 5, The hook
event coverage matrix is missing the Grok harness column, which makes the
seven-harness intro inconsistent with the table. Update the matrix in
hook-lifecycle.md so it includes Grok alongside the existing harnesses, and make
sure the hook rows still describe the same events/behaviors across all seven
harnesses. Verify the surrounding text stays aligned with the updated table and
that any references to the harness count match the expanded matrix.
| Honeycomb ships thin clients for seven coding harnesses, all wired simultaneously, all reading and writing the same shared memory: | ||
|
|
||
| | | | | | ||
| |---|---|---| | ||
| | **Claude Code** | **Cursor** | **Codex** | | ||
| | **Hermes** | **pi** | **OpenClaw** | | ||
| | **Grok** | **Hermes** | **pi** | | ||
| | **OpenClaw** | | | |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Update the earlier harness diagram too.
The new seven-harness table is still contradicted by the ASCII diagram above, which only shows six harnesses. Readers will see both counts in the same README until the diagram is updated as well.
Suggested fix
- Claude Code Cursor Codex Hermes pi OpenClaw
+ Claude Code Cursor Codex Grok Hermes pi OpenClaw🤖 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 `@README.md` around lines 196 - 202, The README now lists seven coding
harnesses in the table, but the earlier ASCII harness diagram still shows only
six, so the two sections conflict. Update the existing diagram in README to
include the missing harness so it matches the seven-harness table, using the
same harness names already shown in the table and diagram.
What this does
Adds Grok Build CLI (
grok agent) as a first-class Honeycomb harness, bringing the canonical set to seven (alongside claude-code, codex, cursor, hermes, pi, openclaw). Grok users now get the same automatic capture, recall, dashboard telemetry, and skill propagation as every other harness, instead of being limited to manual CLI/MCP usage.Grok shares the Claude/Codex lifecycle hook shape, so the adapter reuses the shared
runHookBinarydriver and only supplies its own shim and connector — no new memory logic.What's wired:
src/hooks/grok/shim.ts— normalizes Grok's native payloads (PascalCase + snake_case event names), interceptsrun_terminal_command/Bashfor VFS recall, renders a brief user-visible login line, and derives cwd fromworkspaceRoot.harnesses/grok/— thin-client bundle entry (esbuild target added).src/connectors/grok.ts— install-time connector that writes~/.grok/hooks/honeycomb.json, preserves foreign Grok hooks, and detects install via~/.grok.references/grok/hooks-schema.ts— executable zod oracle for the Grok hook-file contract.grok agent stdio), asset-sync skill/agent dirs, dashboard dot palette + capability descriptor, connector registry.Related issue
Closes #196
How it was tested
npm run ci(typecheck + jscpd duplication + vitest + audit:sql) green locally.tests/hooks/grok/shim.test.ts,tests/connectors/grok.test.ts.harness-identity-stamp,harness-api,harness-detect,harness-installed-wiring,harnesses-page,capture-handler.honeycomb setupwired Grok; the dashboard Harnesses page showed grok installed with a growing turn count;POST /api/hooks/capturereturned 201 from a real Grok turn.Checklist
Made with Cursor
Summary by CodeRabbit
New Features
Bug Fixes