Harness Notes

Migration

Updated 2026-10-16

On this page

Moving between harnesses: what each one can import from another, which of another harness's files it reads as-is, and what it can export.

QuestionCodex CLIClaude Codechecked at 2.1.300Cursor Agentchecked at 2026.10.12-d47ca18OpenCodechecked at 2.0.29pichecked at 1.2.0
Import setup from another harness

Yes, from Claude Code and Cursor. In a local TUI session, type /import. If both are found, choose a source, then tick what to bring over. Supported items are CLAUDE.md/.cursorrules to AGENTS.md, selected settings to config.toml, skills to .agents/skills, plugins and marketplaces, MCP servers, subagents to Codex agent TOML, hooks, slash commands converted to skills, project folders, and recent chats. Existing Codex files and entries are not overwritten.

Claude Code project memories are imported only when you turn on the under-development external_agent_memory_import feature (codex features enable external_agent_memory_import). There is no Cursor memory import.

From Cursor, only the legacy .cursorrules file becomes AGENTS.md; .cursor/rules/*.mdc are not imported.

/import can't run while a task is running. The docs say it is also unavailable in remote or daemon sessions, but that limit was lifted in 0.157.0.

Review imported hooks, MCP auth/headers and permissions afterwards; unsupported fields are dropped.

/import [codex|gemini|cursor] (or claude import <source> from the shell) brings OpenAI Codex, Google Gemini CLI or Cursor setup into Claude Code: instruction files such as AGENTS.md are appended once to the matching CLAUDE.md, and MCP servers, commands, subagents, skills and the permission mode come across. --dry-run previews and --yes skips the picker. Separately, claude mcp add-from-claude-desktop copies MCP servers from the Claude Desktop app.

Needs v2.1.213 or later (v2.1.265 for Cursor) and is turned on by a fetched feature flag, so it is unavailable on Bedrock, Google Cloud's Agent Platform, Microsoft Foundry, Claude Platform on AWS, apps gateways, or with telemetry or nonessential traffic disabled.

Hooks, plugins and other settings are not imported.

claude mcp add-from-claude-desktop works on macOS and WSL only.

Partly

There is no import command or migration wizard. Instead the CLI reads Claude Code and Codex files in place every time it starts: Claude Code hooks from .claude/settings.json, .claude/settings.local.json and ~/.claude/settings.json; Claude Code plugins; skills; subagents; commands; and CLAUDE.md. This is governed by the Include Third-Party Plugins, Skills, and Other Configs setting, which is on by default.

Claude Code settings such as permissions, model or env are not read. Configure those in ~/.cursor/cli-config.json or .cursor/cli.json.

The built-in /migrate-to-skills skill only converts Cursor's own rules and commands to skills.

Partly

Only from OpenCode V1. V2 reads V1 opencode.json(c) and .opencode/ agents, commands, skills, and MCP servers from the same locations and normalizes them in memory, migrates global tui.json into ~/.config/opencode/cli.json on first start, and you can ask OpenCode to rewrite your config into the native V2 shape. V1 plugins must be ported, and nothing is imported from other harnesses apart from the skills it reads directly.

Partly

There is no import command for another harness's setup. The MCP docs explain how to move servers by hand: copy mcpServers entries from Claude Desktop, Claude Code or Cursor into ~/.pi/agent/mcp.json or .pi/mcp.json as they are, convert Codex TOML or VS Code and OpenCode entries, then run pi mcp list to check them.

Other harnesses' files it reads directly

Partly

Mostly not. Codex reads AGENTS.md and skills in .agents/skills, a shared folder other tools also use. It does not read .claude/skills, .mcp.json or Cursor rules. To use CLAUDE.md directly, add it to project_doc_fallback_filenames in config.toml. It is then used only in directories without an AGENTS.md.

Partly

Claude Code reads AGENTS.md (and .claude/AGENTS.md) as project instructions when there is no CLAUDE.md, .claude/CLAUDE.md or CLAUDE.local.md; setting Project instructions to claude-md-and-agents-md in /config loads both. It does not read other tools' skill folders such as .agents/skills, or MCP configs such as claude_desktop_config.json. /init also reads Cursor rules (.cursor/rules/, .cursorrules) and .github/copilot-instructions.md when it drafts a CLAUDE.md.

Reading AGENTS.md directly needs v2.1.277 or later; on older versions put @AGENTS.md in your CLAUDE.md.

With CLAUDE_CODE_NEW_INIT=1, /init also reads .devin/rules/, .windsurf/rules/, .windsurfrules and .clinerules.

It reads AGENTS.md, CLAUDE.md and CLAUDE.local.md; skills in .claude/skills, .codex/skills, .agents/skills and the matching home-directory folders; and subagents in .claude/agents, .codex/agents, ~/.claude/agents and ~/.codex/agents. It also reads Claude Code hooks from .claude/settings*.json and ~/.claude/settings.json, and enabled Claude Code plugins. In CLI 2026.10.12 it also loads commands from .claude/commands and ~/.claude/commands, and installed Claude Code plugins listed in ~/.claude/plugins/installed_plugins.json, honoring enabledPlugins. Those plugins bring their skills, agents, commands, hooks and MCP servers.

Not read: ~/.claude/CLAUDE.md, .claude/rules/, GEMINI.md, project .mcp.json, ~/.claude.json MCP servers, and Codex config.toml. Add MCP servers to .cursor/mcp.json or ~/.cursor/mcp.json.

Claude Code Notification and PermissionRequest hooks are not supported.

When names clash, .cursor/ skills and subagents win over .claude/ and .codex/.

Partly

Automatic compatibility discovery covers skills: .claude/skills and .agents/skills in the project (walking up), and ~/.claude/skills and ~/.agents/skills globally. V2 does not automatically discover CLAUDE.md guidance or other harnesses' agents, commands, MCP configs, or hooks. Since 2.0.30, explicitly listing CLAUDE.md in instructions loads it as configured guidance.

For the V1 CLAUDE.md fallback, move guidance to AGENTS.md or, since 2.0.30, list it explicitly in instructions.

Since 2.0.30, instructions config entries can explicitly load CLAUDE.md or another guidance file. This is explicit configuration, not automatic discovery or transcript import.

Partly

Pi reads AGENTS.md and, in any folder without one, CLAUDE.md from the agent directory, the working folder and its parents. It also loads skills from the shared Agent Skills folders ~/.agents/skills/ and .agents/skills/. It does not read ~/.claude/CLAUDE.md, .claude/skills, .claude/commands, other harnesses' MCP configs, hooks or subagents.

You can point the skills setting or --skill <path> at another harness's skills folder yourself.

Import sessions or history

Partly

Yes, through /import. Pick recent chats from Claude Code (~/.claude/projects/...jsonl) or Cursor agent transcripts, up to 50 chats from the last 30 days. They become Codex sessions you can resume. Each one gets the source's custom or AI title when it has one, and otherwise a title from its first message.

Imported chats are text replays. Thinking is dropped, tool calls and results become short text notes, and images become placeholders. Re-running /import appends new turns to chats it has already imported.

Not supported

No. /import brings over configuration only, and there is no command to load another harness's conversations; Claude Code resumes only its own sessions (including ones moved from the cloud with --teleport).

Not supported

No. The CLI can't import Claude Code, Codex or other harnesses' sessions; --resume only opens Cursor's own chats under ~/.cursor/chats.

In CLI 2026.10.12 a hidden, undocumented -p-only flag, --conversation-history-file, takes history in Cursor's internal format, not other tools' transcripts.

Partly

V1 sessions are copied automatically: on first start the V2 server migrates the V1 session tables in the same opencode.db (and any opencode-next.db beta database) into V2 format and shows a progress overlay in the TUI. opencode session import <file|url> accepts only V2 export JSON, and nothing imports other harnesses' sessions.

Migrated V1 sessions lose their per-session permission overrides.

Not supported

No. /import <path.jsonl> copies a session file into Pi's session folder and resumes it, but it only accepts Pi's own JSONL format; a file whose first line is not a Pi session header loads as empty.

Export for use elsewhere

Partly

Codex has no export to other harnesses. You can export a chat as Markdown with /export (clipboard or file) or /export session.md. The raw session JSONL files stay under ~/.codex/sessions. Setup lives in plain files that other tools can read or that you can copy by hand: AGENTS.md, .agents/skills and ~/.codex/config.toml.

Partly

/export [filename] copies the current conversation to the clipboard or saves it as plain text, and claude -p --output-format json|stream-json or the Agent SDK's getSessionMessages() give structured data for scripts. There is no command that converts Claude Code setup or sessions into another harness's format.

Other tools can pull Claude Code setup in themselves; for example, Codex's /import reads Claude Code's settings, skills, CLAUDE.md, MCP servers, subagents and hooks.

Partly

There is no export command for setup or sessions. Each chat is mirrored as JSONL at ~/.cursor/projects/<slug>/agent-transcripts/<chatId>/<chatId>.jsonl, which you can copy yourself. Setup kept in shared formats (AGENTS.md, .agents/skills) is read by other harnesses directly. Prefixing a message with & hands the chat to a Cloud Agent, but that stays inside Cursor.

Share links are created from the Cursor editor (Teams and Enterprise plans), not the CLI.

Partly

opencode session export [id] writes a session as JSON (--sanitize redacts it) and /export in the TUI saves a transcript. These use OpenCode's own format, sharing is not available in V2 yet, and there is no exporter for another harness.

Partly

Sessions only. /export writes the current session as HTML, or as Pi JSONL when the path ends in .jsonl (active branch only); pi --export <file> [output] makes HTML from the shell, and /share uploads it as a private GitHub gist or Radius artifact. There is no export of settings, skills or MCP config for another harness.

Exports can contain prompts, tool output, file contents and credentials, so review them before sharing.

Since 1.3.0, sessionShareDestination can force gist or Radius. The default auto destination selects Radius when authenticated, otherwise a private gist; forcing radius requires its authentication and does not fall back.

Commands

From your shell

Commands you run in a terminal or script, outside a session.

TaskCodex CLIchecked at 0.162.1Claude Codechecked at 2.1.296
Set up
Import—

claude import [--dry-run] [--yes] [codex|gemini|cursor]

Import configuration from Codex, Gemini CLI or Cursor.

1 note

Starts a session that runs /import. Unavailable on Bedrock, Foundry and some other platforms.

Inside a session

Slash commands you type into an open session.

TaskCodex CLIchecked at 0.162.1Claude Codechecked at 2.1.296
Set up
Import

/import

Import setup, project files and recent chats from Claude Code or Cursor.

1 note

The source description names Claude Code only; the docs add Cursor. Covers up to 50 chats from the last 30 days.

/import [codex|gemini|cursor] [--dry-run] [--yes]

Bring instructions, MCP servers, commands, subagents and skills from another agent.

Notes and sources

Codex CLI, 10 sources
Import setup from another harness, 5
Other harnesses' files it reads directly, 2
Import sessions or history, 3
Export for use elsewhere, 2
Claude Code, 7 sources
Import setup from another harness, 5
Other harnesses' files it reads directly, 2
Import sessions or history, 2
Export for use elsewhere, 1
Cursor Agent, 7 sources
Import setup from another harness, 2
Other harnesses' files it reads directly, 5
Import sessions or history, 1
Export for use elsewhere, 2
OpenCode, 11 sources
Import setup from another harness, 1
Other harnesses' files it reads directly, 4
Import sessions or history, 3
Export for use elsewhere, 3
pi, 12 sources
Import setup from another harness, 1
Other harnesses' files it reads directly, 3
Import sessions or history, 3
Export for use elsewhere, 6