Grain / Works with / Grain for Codex

Works with

Grain for Codex

Codex works with Grain as the coding agent you already use. Download the Mac app, run grain login and grain init, let Codex build in the connected folder, then push, checkpoint and share the output at a lasting URL.

Updated 2026-09-04Facts verified 2026-09-04By the Grain team
# Download the Mac app from rungrain.com, then:
grain login
cd path/to/project
grain init
# Ask Codex to build the artifact in this folder.
grain push
grain checkpoint -m "first Codex artifact"
grain share --public
# https://<slug>.share.rungrain.com

What the agent does, what Grain does

ResponsibilityCodexGrain
CreationReads instructions and changes the projectDoes not create code or choose a model
WorkspaceOperates in the folder you give itLinks that folder to a workspace that can remain published
PublishingCan invoke connected tools or leave commands for youPushes files, records checkpoints and creates shares
AddressCan verify the output during its workProvides the share URL for other people
Application piecesWrites the page and application behaviorCan provide Postgres, login and scheduled jobs for an app artifact
ReviewResponds to your instructionsCollects reader comments that the agent can read and act on
PortabilityWorks against files in the projectLets you fetch artifact files with grain pull

Setup

  1. Download and open the Mac app from rungrain.com. Complete the early-access and sign-in flow before connecting a project folder.
  2. Run grain login in a terminal. Then change into the folder where Codex will work. Starting from the actual project directory avoids linking a parent folder that contains unrelated files.
  3. Run grain init. The Codex integration is written to .codex/config.toml. Review that exact file if Codex does not see the server. The Claude Code and Cursor config paths are different and are not substitutes.
  4. Open Codex on the same folder. State the artifact, intended audience, required source material and acceptance checks in the prompt. Also state whether it is a static page or an app that needs Postgres, login or a scheduled job.
  5. Let Codex use the MCP connection for supported workspace actions, or run the CLI commands yourself. Grain exposes agent tools for creating, opening, pushing, pulling, checkpointing, sharing, releasing, checking out, listing, executing and upgrading workspaces.

First artifact

  1. Give Codex a usable prompt: Build a small internal rota tool for this team. Include a weekly view, an owner for each shift, a change log and a short operator note. Use Postgres for rota entries, require login, and do not add a scheduled job. The pieces are explicit, so the agent does not have to guess the product boundary.
  2. Ask Codex to inspect its output, run the relevant project checks and identify any values that should come from secrets rather than source files. Remove sample credentials and local-only paths before publishing.
  3. Run grain push when the folder contains the reviewable result. Record that state with grain checkpoint -m "first Codex artifact". A named checkpoint makes the publishing sequence legible without claiming that source control has been replaced.
  4. Choose the audience. Run grain share --public for an open link or grain share --password <pw> for a password-protected link. Use invited-person sharing for a named audience.
  5. Open the returned https://<slug>.share.rungrain.com URL as the intended reader. Verify access, core interactions and database behavior. If the artifact has a scheduled job, check its visible result instead of assuming that a local run proves the schedule.
  6. Put the URL in the ticket, pull request or team note where people already work. Their comments can become the next Codex instructions, while the workspace and address stay the same across revisions.

What you pay

You keep the OpenAI plan you already use for Codex. Grain does not sell or mark up model tokens. The Grain free tier requires no card and includes unlimited published artifacts, ten sleeping sandboxes, one always-on workspace, the Mac app, CLI and a self-hostable core. Pro costs $65 per user per month for more always-on workspaces, team seats, shared spaces and custom domains. Enterprise is offered by contact for the customer's cloud, SSO, audit and policy controls and direct support. The relevant cost question is whether you need paid workspace capabilities, not whether Grain changes the Codex bill.

Limits and known gaps

  • Grain supplies no model and no coding agent. Codex remains responsible for code changes, and you remain responsible for reviewing them.
  • Grain is not an editor. Continue using the development and review tools that fit your repository.
  • The config path is .codex/config.toml. If organization policy manages that file, review the proposed MCP entry before changing it.
  • Publishing does not turn an internal prototype into a production service with a CI pipeline. Grain points production services with those requirements to general deployment platforms. Keep repository review, tests and operational ownership in their existing systems.
  • Public, password-protected and invited-person shares have different exposure. Select the boundary deliberately and test it outside your own session.
  • The desktop experience is Mac first. Windows is on a waitlist, and the self-hostable core runs on Linux.

Frequently asked questions

Does Grain include Codex usage?

No. You bring your existing agent plan. Grain does not sell or mark up Codex tokens.

Where does Grain put the Codex MCP config?

grain init writes the Codex connection to .codex/config.toml in the project setup.

What is the shortest path from Codex to a URL?

Initialize the folder, let Codex write the artifact, then run push, checkpoint and share. The public share returns a https://<slug>.share.rungrain.com URL.

Can a Codex-built tool use Postgres and login?

Yes. Full app artifacts can have Postgres, logins and scheduled jobs. Use only the pieces the tool actually needs.

Can I export what Codex built?

Yes. Artifacts remain files, and grain pull fetches them from the workspace.

Give the next Codex result an address

Download the free Mac app, connect one project and publish a reviewable artifact.

Free forever. No card. Bring your own agent.

Sources · facts verified 2026-09-04