DigestAI news desk
Agents & Tools updated 3 min read

xAI adds cross‑session memory to Grok Build coding agent

xAI announced on September 16, 2026 that its terminal‑based coding assistant, Grok Build, now supports cross‑session memory. The feature automatically records conventions, decisions, and durable project facts as markdown notes during a session and re‑loads them in later sessions, letting the agent recall prior context without user prompting. In the demo, Grok Build fixes a failing test suite by…

1 source

Key points

  • Cross‑session memory records conventions, decisions, and facts as markdown files for Grok Build
  • Memory is auto‑loaded in new sessions, improving code fixes and test runs
  • Commands /dream, /memory, and /remember let users view, merge, and add notes

The memory system stores one markdown file per topic, scoped per project with a global layer for universal preferences. Users manage notes via shell commands: /dream merges observations, /memory (or /mem) browses files, and /remember adds a note directly. The background capture runs after each turn, keeping the interactive flow uninterrupted. Grok Build, powered by Grok 4.6, is now available for free with the new memory capability, and developers can install it via a single curl command.

This upgrade aims to make the agent more useful the longer it is used, turning ad‑hoc interactions into a persistent, project‑aware coding partner.

Full story from Unite.AI · by Jonas Reeve, Cognitive AI & AGI, AI Research Agent Open source ↗

xAI Adds Cross-Session Memory to Grok Build Coding Agent

Unite.AI · 16 September 2026

xAI on September 16, 2026 announced cross-session memory for Grok Build, its terminal coding agent, a feature that records conventions, decisions, and project facts as markdown notes in the background and reads them back in later sessions. Memory is available in Grok Build now and applies to new sessions.

xAI says the agent keeps notes on the conventions, decisions, and project facts that come up while a user works, and that later sessions read those notes before touching related code. The company presents the feature as one that makes Grok Build better the more it is used.

The announcement demonstrates the behavior with a terminal session in a project called orbit. Asked to run the test suite, Grok runs cargo test, and the integration tests fail with a Postgres connection error, with 143 tests passing and five failing. The user corrects the agent, explaining that the suite must run through just test, which starts the test database first. With just test, the suite passes with 148 tests and none failing. A topic file named testing.md then records the convention, noting that the suite runs with just test because plain cargo test fails the integration tests, that just test followed by a crate name runs a single crate, and that integration tests seed from tests/fixtures/seed.sql. In a later session, when the user asks for a retry with backoff in the webhook sender, Grok edits src/webhooks.rs, recalls that the testing topic says the suite runs through just test, and verifies the change with 151 tests passing.

Background Capture and Markdown Storage

Capture runs after a turn completes. Grok reviews the finished turn in the background, records anything durable, and continues without interrupting the session. Notes are stored as markdown files, one topic per subject. Each project has its own workspace scope, while a global scope holds preferences that apply everywhere.

Two commands manage what accumulates. The /dream command merges new observations into the topic they belong to and also runs on its own periodically in the background, folding notes into topic files over time so each project ends up with a small set of organized references. The /memory command shows the files as they are on disk.

What Memory Holds and How Recall Works

According to xAI, memory holds the details most likely to matter in a later session: how the team writes and reviews code, decisions and the reasoning behind them, and durable project facts ranging from where a subsystem lives to which command runs the suite. Left out are task state, tentative conclusions, secrets, and anything the repository or its own documentation already covers. Notes are kept per project, plus a global set for preferences that apply everywhere.

Recall happens automatically. Before starting related work, Grok reads the topics that cover the area it is about to work in and applies them, including in sessions where the subject never comes up. When a conflict arises, instructions in the current conversation take precedence over anything in a note.

The Memory Browser and Command Set

The /memory command opens a read-only browser of every memory file, grouped by scope, with a preview of the selected file. xAI describes the browser as the fastest way to see what a session produced and to find the file to edit when a note is wrong. The example in the announcement lists global files named MEMORY.md and preferences.md alongside workspace files named MEMORY.md, testing.md, code-style.md, and gateway.md, with keyboard controls for navigation, search, copying a path, deletion, toggling, fullscreen, and closing. The global memory index shown in the example carries a notice that it is generated by Grok and should not be edited directly.

xAI’s documentation for the tool lists /memory, with the alias /mem, as the command to browse, view, and manage memories, and it describes /dream as running memory consolidation and /flush as flushing conversation memory to disk immediately. A separate core command, /remember followed by a note, saves a memory note directly. The documentation states that these shell-provided commands appear when cross-session memory is enabled.

Availability and Product Context

Memory is available in Grok Build now, and it applies to new sessions: users run /new or start a fresh grok session, and notes begin after the first completed turn. The announcement supplies the install command curl -fsSL https://x.ai/cli/install.sh | bash alongside a Try Free link.

The Grok Build product page describes the tool as a coding agent for complex work now powered by Grok 4.6, available to try for free, and lists Memory among its features with the description “Persist decisions and context across sessions.”

This text was published by Unite.AI and written by Jonas Reeve, Cognitive AI & AGI, AI Research Agent. It is reproduced here with attribution so you can read it in full; the rights remain with the publisher. Read it at the source ↗

Topics · follow one to build your own front page
xAIGrok BuildGrok 4.6

The headline, key points and digest above were generated by Digest AI's editorial model from the linked sources. Automated summaries can contain errors: the sources are the record. Spotted a mistake? Tell us.

Comments

via GitHub Discussions

More in Agents & Tools

All →

Related stories