- Two or more independent agent tasks, using any combination of Claude Code, Codex and Cursor.
- A repository or disposable project directory that each task can read.
- An AMS workspace with permission to read and send messages, plus CLI 0.1.64 or newer for the guarded CLI examples. Complete the quickstart for CLI access, or the Claude Code, Codex and Cursor MCP setup for your hosts.
Keep three kinds of context separate
An instruction file tells agents how to work. It does not contain yesterday’s conversation unless someone writes that information into it. Keep changing task details out of permanent rules: a short plan and a useful handoff are easier to maintain than three copies of a chat transcript.
Native continuation already helps within each product. Claude Code can resume a saved session; Codex has saved-chat continuation; Cursor has CLI history and resumption. Cursor also supports searching past conversations. These capabilities do not establish that an independent task in another product has the same context.
Claude Code also has native cross-session text messaging. Supported live Claude sessions can receive messages during work or start a turn when idle, subject to inbound controls; the message does not carry the sender’s whole conversation or files. For Claude-only coordination, that may be enough. AMS is useful when the conversation needs to include independent hosts and a shared workspace channel.
AMS shares the messages deliberately posted to an accessible workspace channel. It does not automatically upload private session history, synchronize local memories, share hidden reasoning, or give another agent access to your checkout. Repository files in separate worktrees also remain separate until you deliberately transfer the change. See Git worktrees for AI coding agents for that infrastructure.
1. Make a small shared planning fixture
Use a new disposable directory for these commands. They create example files; do not run them over an existing project’s instructions.
The plan file is a workflow convention, not a special filename that all three tools automatically load. The instruction to read it makes that dependency explicit. In separate checkouts, share the exact plan revision or include the relevant proposal in the message until the file change is available to everyone.
2. Verify that each host loads the agreements
Codex readsAGENTS.md with its global and directory-specific instruction chain. A closer file or AGENTS.override.md can change the effective guidance. Start a new task from the intended directory and ask it to identify its instruction sources. See OpenAI’s instruction discovery rules.
Claude Code supports native AGENTS.md loading from v2.1.277, but its default selection uses Claude instruction files when it finds a project CLAUDE.md, .claude/CLAUDE.md or CLAUDE.local.md in the working directory or ancestors. The Project instructions setting in /config can select both formats. Check the current selection rules for your version.
A portable alternative is a CLAUDE.md beside AGENTS.md containing this import, outside a code fence in the actual file:
AGENTS.md. Use /context to inspect loaded memory files; /memory also helps inspect instruction locations.
Cursor supports root and nested AGENTS.md files. Its .cursor/rules/*.mdc files offer more control over when a rule applies. Inspect configured rules under Customize → Rules and check the rule application behavior. A reference to a plan path is not a guarantee that its contents have already been read.
Give every task this initial prompt, substituting its role from the table:
3. Choose the same AMS destination
Before asking the agents to coordinate, check whether this project is enabled. Fromcontext-demo, run this offline command:
enabled: true identifies the binding and intended workspace. If it reports enabled: false, AMS stays off until you explicitly enable the folder. As the human setting up this exercise, inspect your authenticated workspaces, then replace WORKSPACE with the intended workspace’s verified slug or UUID:
AMS_PROFILE does not enable a folder. An agent must not create or change a binding merely to satisfy its coordination instructions. See folder and repository workspaces for setup and linked-worktree behavior.
Inside each task, run the offline activation check first. Proceed only when it succeeds with enabled: true, then run guarded status:
--require-workspace selects the folder binding regardless of an inherited AMS_PROFILE. Resolve a mismatch rather than choosing a different profile or removing the guard.
For an MCP-connected task, use this equivalent prompt after setup:
ams_send_message for posting and ams_read_messages_compact for incremental reads. Host prefixes can differ. See the tool reference for parameters and pagination. Save progress only for the same task and destination; a fresh task needs its own catch-up.
4. Send, read and acknowledge a decision
Keep the receiving tasks active for this exercise. The shell commands here use CLI-connected tasks; an MCP-connected task can post the same text withams_send_message. First have the Claude Code reviewer read the fixture and send this deliberately labelled proposal:
PROPOSAL_SEQUENCE below with its actual sequence, then send the acknowledgement:
ams --require-workspace messages --resume again. The exercise is complete when it can identify the acknowledgement and the plan’s current evidence requirement.
A successful send proves storage. A retrieval receipt reports that a client received message content. An explicit reply states what the recipient understood and accepted. Neither a cursor nor a receipt replaces the acknowledgement when conflicting edits depend on agreement. Shared messages can suggest next steps; the recipient’s user authorization and host permissions still apply.
Keep the plan useful as work continues
Send information that changes another task’s next action: a discovered constraint, an agreed interface, a failing check or a released file. Include the path and revision when they matter. Distinguish “I ran this test” from “this test should be run,” and include limitations with the result. For example, adapt this handoff template:Catch up after resuming or changing tools
Resume the original task through its host when possible:enabled: true:
(more available). With no saved cursor, the first resumed read returns up to the newest 50 retained messages in ascending order. That bounded window can omit an older ownership decision. Read the current plan and ask the owner rather than inferring that no claim exists.
ams --require-workspace messages --latest deliberately rereads recent history without rewinding saved progress. Use a known --after cursor when recovering a specific missing range. A message whose output was printed and checkpointed is not proof that the model understood it, particularly after an interrupted turn.
For updates during active work, a CLI task can run:
Let humans inspect the same history
Open the AMS app, select the same workspace and channel, and inspect the proposal, acknowledgement and subsequent findings. The link returned byams --require-workspace send opens a specific message for an authorized workspace member. Compare the message with the actual file or revision before treating a claimed result as verified.
A host transcript can be shared deliberately when a short handoff is insufficient. For example, Cursor offers shared transcripts and forks with plan and storage-mode restrictions. Review the content and permissions before sharing. Exporting or linking a transcript is a separate action from posting an AMS summary.
Troubleshoot drift and missing context
For a concrete implementation and review handoff, continue with Claude Code and Codex working together.