Record Grok Build sessions, and search them when past work comes up.

The glen plugin records every Grok Build turn into your organization's shared memory, next to sessions from Claude Code, Codex and the rest of the team. Recall runs through glen search, and a rules file tells the agent to search when you reference past team work.

What you need

  • A Glen account. Sign in at app.tryglen.com, or use Start free at the top of this page to create one. Search, skills and artifacts all work on the Free plan.
  • xAI's Grok Build CLI (grok), and Node.js for the glen CLI.

Install Glen for Grok Build

  1. 01
    Install the glen CLI and sign in. Your active organization is saved locally; switch with glen org switch.
    bash
    npm install -g @tryglen/cli
    glen login
  2. 02
    Install the plugin. This adds the marketplace, installs the plugin with --trust, which Grok requires before it runs a plugin's hooks and skills, and writes ~/.grok/rules/glen.md. glen install also adds a login-shell check to your shell profile, git hooks when you run it inside a repository and, on macOS, a menu bar indicator showing your recording mode.
    bash
    glen install --agent grok
  3. 03
    Start a new Grok session: Grok loads plugins and rules when a session starts. If turns aren't recorded, check that the plugin is trusted with grok plugin list, then run glen doctor.

How it works

SessionStart

Starts glen doctor --auto in the background and remembers the session for this folder. Grok ignores this hook's output, so nothing is added to the context here.

UserPromptSubmit

Records your prompt with its workspace context before the turn runs. Grok ignores this hook's output too.

Stop

Records the finished turn: your prompt and the agent's reply.

PostToolUse (shell)

After a git commit, links the commit to the session.

Recall is on demand

The agent runs glen search in the shell and treats the output as team memory. A plugin can't ship Grok rules, so glen install writes the rules file that prompts the search, and glen doctor --auto keeps it current.

Also using the Claude Code plugin?

Grok runs the hooks of installed Claude Code plugins, so glen's hooks fire twice for every event. Glen records each turn once, labelled grok.

Try asking

  • Search glen: why did we drop the old job queue?
  • What did the team decide about API versioning? Check glen first.
  • Use our add-feature-flag skill for this change.

Tools

The Grok Build plugin reaches Glen through the glen CLI and its hooks, not through MCP tools. The same server also runs a remote MCP endpoint for chat clients and any other MCP client; the MCP server reference covers it.

What Glen sends and stores

  • The prompt you send and the agent's final reply for each turn.
  • Workspace context: repository name, branch, commit and remote URL.
  • The agent name (grok) and a session id, so turns from one session stay together.
  • Content-free error codes about the glen CLI itself (command, flag names, versions). Turn them off with glen telemetry disable.

Everything goes to your organization in Glen and nowhere else. Retention, deletion and the services Glen uses are in the privacy policy and the list of sub-processors.

Turning it off

Go off the record

glen incognito keeps recall working and writes nothing to team memory. Admin analytics still count your prompts, as numbers only.

Turn Glen off

glen off recalls nothing and records nothing. glen on turns it back on. Both apply on every machine and agent.

Forget something

Ask the agent to forget a wrong or outdated memory (the forget skill), or remove it from Memories in the dashboard.

Remove it

glen uninstall removes the plugin, its hooks and the rest of glen's local setup.

Privacy and support

What Glen stores, how long it keeps it and how to have it deleted are covered in the Glen privacy policy. For anything the policy doesn't answer, write to support@tryglen.com. Stuck on setup? The support page says what to include.