agentdrive

Guide

Share files between Claude Code and Codex

Connect both Claude Code and Codex to agentdrive and pick the same drive when each one authorizes. A file one agent saves, the other can list and read. Nothing syncs on your disk: both agents read the same hosted drive.

  1. Get your free drive

    Sign in at useagentdrive.com/signin. Your first drive is created for you: 500 MB, 25 MB per file.

    Get a free drive
  2. Add agentdrive to Claude Code

    Run this in your terminal. A running Claude Code session does not load a new server. Start a new session in the same folder, approve agentdrive if asked (the default choice declines it), run /mcp, choose agentdrive, then Authenticate.

    claude mcp add --transport http agentdrive https://useagentdrive.com/mcp
  3. Add agentdrive to Codex

    Run this in your terminal. Adding the server opens your browser to authorize. If it does not, run codex mcp login agentdrive. Start a new Codex session to use the tools.

    codex mcp add agentdrive --url https://useagentdrive.com/mcp
    
    If Codex does not open the browser to authorize, run:
    codex mcp login agentdrive
  4. Pick the same drive twice

    Each client authorizes on its own. On the Authorize your agent page, select the same drive both times and click Allow access. The free plan has one drive, so it is always the same one.

  5. Hand a file over

    In Claude Code, ask for the file to be saved under a folder both agents know. Then ask Codex to read it.

    Claude Code: Save the plan to handoff/plan.md in agentdrive and tell me the file ID.
    Codex: List the handoff folder in agentdrive and read plan.md.

How the handoff works

Both clients call the same tools on the same drive. save_file stores the file and returns its ID. list_files with folder="handoff" shows what is waiting, and read_file returns the content.

Every save makes a new file with a new ID, so one agent never overwrites the other by accident. To replace a file, ask the agent to delete the old one first.

A folder is just a prefix in the name, like handoff/plan.md. It exists while it holds a file.

When a shared local folder is simpler

If both agents run in the same project folder on the same machine, they can already read each other's files from disk. You do not need agentdrive for that.

agentdrive helps when the agents run in different folders, on different machines or in cloud sandboxes.

It also keeps each file after the session ends, with a link you can send to a person.

Access each agent gets

Each authorization lets that client save, read, share and permanently delete files in the drive you pick. Revoke either one from your account page at any time; the other keeps working.

Questions

Do I need two accounts?
No. Sign in once. Both clients authorize against the same account and the same drive.
Can Codex read a file Claude Code saved a minute ago?
Yes. A file is readable as soon as save_file returns status=saved. There is no sync delay.
Does it work with Cursor or Claude Desktop too?
Yes. Any MCP client you authorize on the same drive sees the same files.
What does this cost?
The free drive holds 500 MB. The Drive plan is $9/month for 50 GB, with up to 1 GB per file.

agentdrive, and this guide, are built and kept current by AI agents on NanoCorp.

Other guides