Share context between Claude Code, Codex and Gemini
Chris Rupp
Keep stable project rules in one reviewed source, then make each tool’s entry point explicit. Begin with native instruction files; a shared queue is useful only if you also need task coordination and handoffs.
Official documentation checked October 23, 2026. File discovery changes over time, so check the installed version and active configuration before deleting an existing entry point.
What each native file does
| Tool | Native guidance |
|---|---|
| Claude Code | CLAUDE.md supplies persistent instructions. Current versions also support AGENTS.md, subject to the Project instructions setting and availability limits. The default uses it when no CLAUDE.md or CLAUDE.local.md exists in the working directory or above. See Anthropic’s memory documentation. |
| Codex | Codex reads AGENTS.md before work, layering global and project guidance. Its discovery rules include overrides and configurable fallback names. See OpenAI’s official guide. |
| Gemini CLI | GEMINI.md is the default context filename. It supports @file.md imports and configurable context filenames. See Google’s context guide. |
Claude’s native AGENTS.md support is unavailable before v2.1.277 and when its built-in plugin is disabled; see Anthropic’s availability limits. Auto memory is machine-local and shared by a repository’s worktrees; it is separate from authored instructions. See the memory storage documentation.
A small native setup
For a project with no existing instruction scheme, use AGENTS.md as the shared source. Put only durable project rules there: architecture boundaries, supported runtime, verification commands and relevant reference paths. The file is Codex’s documented project entry point.
Add a small CLAUDE.md wrapper using Anthropic’s documented import pattern. This also supports sessions where native AGENTS.md loading is unavailable:
@AGENTS.md
Add a GEMINI.md wrapper using Gemini CLI’s documented import syntax:
@./AGENTS.md
Append tool-specific guidance only when needed. Do not duplicate the common rules below the import. Before changing an established project, inspect its current configuration and preserve deliberate differences.
Keep rules, decisions and handoffs in sync
Use a simple ownership convention:
- Update the shared rules in one place and review that change alongside the code it affects.
- Keep detailed architecture notes in named reference files. In the task prompt, explicitly require the worker to read the relevant reference before editing.
- Record a handoff with the decision, implementation commit, completed checks, unresolved issues and next action. Give one writer responsibility for reconciling competing notes.
- After changing entry points, verify what actually loaded. Claude documents
/contextfor instruction-file inspection in its memory troubleshooting guide; OpenAI provides instruction-discovery verification examples; Gemini provides/memory showand/memory reload.
Treat these files as reviewed project input. Keep credentials out, resolve contradictory instructions, and archive stale plans. A worker should report missing references instead of inventing the decisions they supposedly contain.
Orbit’s shared layer: ORBIT.md and context files
In Orbit, the shared layer is sometimes called “orbit.md”; the generated file is ORBIT.md. Orbit’s rule-file reconciliation reference documents context/rules.md as the common source embedded in ORBIT.md, AGENTS.md and CLAUDE.md. Its conventions section also describes rules feeding GEMINI.md generation. Keep durable custom rules in the source and use the documented regeneration workflow.
This is an Orbit-managed scheme. Native discovery depends on each tool’s documented filenames and configuration: see Claude Code, Codex and Gemini CLI. Do not assume that naming a file ORBIT.md alone makes every CLI load it.
Orbit’s Context & Handoffs adds project files under context/, global context and structured session summaries under context/handoffs/. The context-files glossary explains those layers. The context-injection glossary specifically describes live Orbit state supplied to Apollo; it should not be read as a promise that every CLI receives every file.
Use the native wrappers for a small shared repository. Add Orbit’s context and handoff workflow when you need a durable place to carry decisions between planning and execution. For parallel implementation, pair shared rules with separate worktrees and explicit task ownership.