Skip to navigation

From an idea to a pull request

OpenClaw plans a feature from your phone, and Codex builds it from the same brain.

An idea often comes up away from your desk, and by the time you sit down to build it, the details are gone. In this example a developer texts an idea to OpenClaw from their phone. OpenClaw checks the team’s brain, finds that a similar approach was tried and rolled back, and suggests a better one. Once the developer agrees, it saves the plan to the brain and opens a GitHub issue. Later, at the desk, Codex reads the same plan from the brain, builds the feature and opens a pull request.

The agent replies, brain pages, issue and pull request are from a real run, condensed for length. The phone scenes replay that OpenClaw session inside a phone frame. The project, Pulse, is a small notes app made for this example, and the team history in its brain is made up.

What happens

StepWhereWhat the agent does with the brain
1. The ideaPhone chat with OpenClawSearches the “Pulse team” brain before answering (workspace_search_pages, workspace_get_page)
2. The memoryOpenClaw’s replyFinds that a localStorage cache was tried in March and rolled back: it blocked the main thread and ran out of space
3. The planOpenClawSuggests IndexedDB instead. After the developer agrees, saves the plan as a new page (captures_capture) and opens a GitHub issue
4. The buildCodex at the deskReads the issue, then the plan and the March lesson from the brain (workspace_search_pages, workspace_get_page), and builds the feature without localStorage
5. The resultGitHubCodex runs the tests and opens a pull request that links the issue

The plan page connects to the March page in the brain, so whoever picks it up next sees both the decision and the reason for it.

Set it up

Both agents connect to the same brain over MCP, with the same API key and subject ID.

1

Connect OpenClaw

Run the OpenClaw command from MCP with API key in a terminal. The setup video walks through it.

2

Connect Codex

Add the Codex entry from the same page to ~/.codex/config.toml.

3

Tell each agent to use the brain

Agents call the brain more reliably when their instructions say when to. In this example, OpenClaw’s workspace and the repository each have an AGENTS.md with rules like these:

## Living Brain
- Before you answer a question about this project, search the "Pulse team" brain.
- Prefer what the brain says over your own guesses, and say which page it came from.
- When we agree on a plan, save it to the brain: what we decided, why, and what we ruled out.

Why the brain matters here

Each agent works without the other’s history. OpenClaw never saw the repository, and Codex never saw the phone chat. The brain is what they share:

Without a shared brainWith one
OpenClaw agrees to the first approach suggestedOpenClaw remembers the approach the team already rolled back
The plan lives in a chat on your phoneThe plan is a page any agent or teammate can read
Codex starts from the issue text aloneCodex reads the plan and the reasons behind it

Ideas to take further

  • Capture what shipped when the pull request merges, so the next plan starts from what was built.
  • Add more agents. Any MCP client can read and write the same brain, including Claude Code and Cursor.
  • Use Coding agent memory for the details of sharing a project’s decisions between coding sessions.

When to use something else

If one agent does the whole job in one session, it can keep the plan in its own context. A shared brain helps when the work moves between agents, devices or people, and each one needs the decisions made before it.

How to build with Living Brain covers the write and read paths these agents use.