Import Claude Code and Codex Settings into Hermes

hermes import-agent translates useful configuration from Claude Code or OpenAI Codex CLI into Hermes. It follows a preview-first migration model: inspect the plan, understand conflicts and unmapped items, then apply only when the destination is ready.

Preview before writing

Auto-detection checks the normal ~/.claude and ~/.codex locations. You can name the source explicitly or pass a custom source directory.

hermes import-agent claude-code --dry-run
hermes import-agent codex --dry-run

Claude Code global instructions become memory entries; Bash allow and deny rules map into Hermes command policies; MCP servers are converted into mcp_servers; and valid skills move into a namespaced import folder. Claude slash-command Markdown is reported but skipped so it can be reviewed and converted into a proper skill.

For Codex CLI, global AGENTS.md, memory files, MCP server definitions, and skills are translated. Existing Hermes values are merged rather than replaced. Conflicts are skipped unless --overwrite is explicit.

Security boundary

Credential files are never imported. Secret-looking MCP environment values and headers are stripped and listed in the report. Reconfigure provider credentials through hermes setup or the normal Hermes environment path instead of copying authentication state from another agent.

Migration checklist

  • Back up the current Hermes configuration and memories.
  • Run --dry-run against the exact source directory.
  • Review every permission mapping and unmapped rule.
  • Inspect imported MCP commands and remove stale servers.
  • Review imported skills for obsolete or conflicting instructions.
  • Apply interactively before considering --yes automation.

Pitfalls

Do not assume Claude-specific non-Bash permission rules have direct Hermes equivalents. Do not use --overwrite --yes until the preview has been archived and reviewed. A malformed source file is reported per item and does not necessarily stop other imports, so a successful command can still contain partial errors.

Verification steps

  1. Compare the applied report with the dry-run report.
  2. Run hermes config check and hermes mcp list.
  3. Confirm imported skills appear under their source namespace.
  4. Start a fresh session and verify only intended memories and policies load.
  5. Authenticate providers separately; do not expect imported credentials.

See the official Import from Other Agents guide for the current mapping table and conflict behavior.