Skip to content

Grok Integration

Grok has no working plugin or extension install path. Live headless sessions do not compose plugin hooks, so the installer-owned global hook is the only supported attach. Do not look for grok plugin install.

Recall supports Grok Build CLI through three separate surfaces:

  • MCP provides the nine query and write tools when recall-memory is configured in Grok.
  • The canonical do-recall-* Agent Skills provide the shared workflows.
  • An installer-owned global lifecycle hook captures Grok transcripts automatically.

Automatic capture does not imply automatic memory injection. Grok capture is supported, but session-start injection is not.

Install lifecycle capture

Install Recall normally while grok is on PATH:

./packaging/install.sh

The installer copies the canonical hook to:

~/.agents/Recall/grok/hooks/RecallLifecycle.json

It then creates a managed per-file symlink at:

~/.grok/hooks/RecallLifecycle.json

Set GROK_HOME to move the Grok configuration root. Deselect Grok in the interactive installer when it should remain untouched.

The global hook is intentional. Grok 1.0.4 discovers plugin hook metadata, but live headless sessions do not compose those plugin hooks. The supported user-level global hook runs in both inspected and headless configurations.

Automatic capture

The hook observes Stop, PreCompact, PostCompact, and SessionEnd.

For each event, hooks/grok/capture.ts reads the hook session id, runs grok export <session-id>, and sends that text to recall capture (turn_end, or session_end on SessionEnd). Core ranks and stores. Guide: Capture adapter.

Capture does not depend on the optional RecallBatchExtract cron job. Subagent payloads are skipped by default. Set RECALL_INCLUDE_SUBAGENTS=1 to opt in.

Automatic injection is not supported

Grok’s passive SessionStart hook output is ignored. Recall therefore does not register a Grok SessionStart hook and does not claim automatic L0/L1 injection.

Use MCP search and recall tools during a Grok session. A wrapper that passes generated rules or a model instruction that asks Grok to call MCP would be opt-in behavior, not automatic injection.

Ownership and cleanup

update.sh refreshes the managed hook when Grok is detected. uninstall.sh removes only the symlink owned by Recall. A foreign file at the same path is preserved, and an install-time collision is backed up first. This follows the surgical ownership requirement tracked in #236 without adding TOML mutation to the atomic-write debt in #124.

Use ./packaging/uninstall.sh --skip-grok to leave the lifecycle hook installed.

Development verification

bun run test:e2e:grok-lifecycle

The test uses the current Grok CLI, an isolated GROK_HOME, a mock model endpoint, and a disposable RECALL_DB_PATH. It verifies real hook composition, automatic rows, deduplication, managed cleanup, and that the production database was not changed.

Type to search…

↑↓ navigate↵ selectEsc close