Blog

Hermes Agent vs Codex: Different Layers, One Setup

Hermes Agent vs Codex isn't really a head-to-head. Hermes is a self-hosted assistant you message from chat apps, and it remembers you, writes its own skills and runs jobs on a schedule. Codex is OpenAI's coding agent for your terminal, editor, the ChatGPT desktop app and the cloud. They sit at different layers, and Hermes is built to use Codex in three separate ways.

So the useful questions are which one sits in front, and how much of the other you plug in behind it.

Here's the short version:

  • Pick Hermes if you want one assistant across Telegram, Slack, email and a dozen other apps, with your choice of model provider
  • Pick Codex if your work lives in a code repository and you want OpenAI's own tool, sandbox and cloud tasks
  • Use both if you want to text a coding job from your phone and have Codex do it on your machine
  • Moving over? Hermes imports your Codex CLI instructions, memories, skills and MCP servers. Credentials never come across

Quick Comparison

Hermes AgentCodex
What it isSelf-hosted general assistant you messageCoding agent for your projects
Made byNous ResearchOpenAI
LicenseMITCLI is Apache-2.0; IDE extension and cloud are closed
Where you use itTerminal, desktop app, 20+ chat platformsCLI, IDE extension, ChatGPT desktop app, cloud, ChatGPT mobile app
ModelsMany providers, including a ChatGPT sign-in for Codex modelsOpenAI models by default; custom providers, Ollama and LM Studio in config
MemoryTwo capped files plus session searchLocal memories you switch on, plus AGENTS.md
SkillsWrites and patches its ownYou write them; same open format
SchedulingBuilt-in cron, delivered to any chatScheduled tasks in the desktop app and web, not the CLI
Default safetysmart approvals, no sandbox on the local backendOS sandbox on, workspace-write for local work
How you payFree software; you pay your model providerChatGPT plan allowance, credits or an API key

Different Layers: A Chat Assistant vs a Repo Agent

Hermes starts from a conversation. One background process, the messaging gateway, connects to the platforms you set up: Telegram, Discord, Slack, WhatsApp, Signal, SMS, email, Matrix, Microsoft Teams, Feishu/Lark, LINE, iMessage through BlueBubbles, and more. The same gateway runs your scheduled jobs. You can also use it from a terminal or the desktop app, which needs an Apple silicon Mac or Windows 11 22H2 or later. Linux runs it through the install script.

Codex starts from a codebase. You point it at a project, and it reads files, edits them and runs your tests. The Codex CLI works in your terminal and inside scripts with codex exec. The IDE extension covers VS Code and compatible editors, and Xcode and JetBrains have their own integrations. In the ChatGPT desktop app you pick Codex next to ChatGPT. Codex Cloud runs tasks in their own workspace, and they keep going while your computer sleeps.

Both reach your phone, but differently. Hermes answers in whatever chat app you already use. Codex uses the ChatGPT mobile app for iOS, where you can start tasks, approve commands on a connected Mac or Windows PC and review diffs. OpenAI says mobile availability depends on rollout and workspace settings.

TaskFirst pickWhy
"Every morning, send my calendar and inbox summary to Telegram"HermesIts cron delivers to any chat platform
"Fix the failing test and open a pull request"CodexRepo context, sandbox and diffs are its home ground
"Run this on an open-weight model first"HermesIt isn't tied to one model vendor
"Keep refactoring while my laptop is shut"CodexCloud tasks don't need your machine
"Text me when the refactor is done"BothHermes hands the job to Codex and replies in the chat

Comparing Codex with another self-hosted assistant? OpenClaw vs Codex covers that matchup.

Can Hermes Agent Use Codex?

Yes, in three ways. They work differently, so keep them apart.

1. Codex models through your ChatGPT sign-in

Hermes' providers page lists OpenAI Codex as a provider. Run hermes model, choose ChatGPT or Codex Subscription, and you sign in with ChatGPT through a device code. Hermes then uses Codex models with its own tool loop.

Hermes stores that login in its own folder. It can also pick up an existing Codex CLI login from ~/.codex/auth.json, but Hermes says you don't need the Codex CLI installed for this route.

2. The bundled codex skill

Hermes ships a codex skill, installed by default, described as "Delegate coding to OpenAI Codex CLI (features, PRs)." Here Hermes stays the brain and calls the real Codex CLI as a tool, usually with codex exec. It needs Codex installed and signed in, and a Git repository to work in.

The skill page flags one catch. When Hermes runs Codex from the gateway, for example from a Telegram chat, Codex's workspace-write sandbox can fail on Linux with user-namespace errors. The skill's fallback turns Codex's sandbox off and leans on process limits instead: a clean Git status, a set working folder, narrow prompts and a diff review. If you take that route, run Hermes in a container or on a spare machine.

3. The Codex app-server runtime

This is the deepest option, and it's opt-in. Type /model --runtime codex_app_server in a Hermes session, and the Codex app-server runtime hands each OpenAI turn to Codex itself. Codex runs the shell, applies the patches and enforces its own sandbox. Hermes becomes the shell around it, with the chat gateway, sessions, skills and its review loop.

The trade-offs are spelled out in Hermes' docs:

  • You need Codex CLI 0.130.0 or newer, plus a separate codex login. Hermes' own ChatGPT sign-in doesn't cover it
  • You get Codex's toolset and sandbox, and any Codex plugins you've installed, such as GitHub or Linear
  • You lose Hermes' memory, session_search, todo and subagent tools during those turns, plus its browser tools
  • Approvals from Codex show up as Hermes' "Dangerous Command" prompt
  • Cron jobs on this runtime are "not specifically tested," in Hermes' words

To go back, run /model --runtime auto.

Hermes also publishes a Codex comparison page. Read it as Hermes' own pitch, and check anything it says about Codex against OpenAI's docs.

Memory, Skills and Scheduling

Memory. Hermes' built-in memory is two files: MEMORY.md, capped at 2,200 characters, and USER.md, capped at 1,375. Past chats go into a searchable session store. You can read all of it in a minute.

Codex memories are off until you enable them. Then Codex turns idle past chats into local memory files under ~/.codex in the background. OpenAI calls them generated state, not something to edit by hand. It also says rules that must always apply belong in AGENTS.md.

Skills. Both use the Agent Skills format, so a skill from one is a fair starting point for the other. The difference is who writes them. Hermes creates skills after hard tasks and patches them as it goes. With Codex, you write or install skills yourself, and plugins bundle them for sharing.

Scheduling. Hermes' cron runs inside the gateway, and results go to the chat of your choice. Jobs only fire while the gateway runs. They also start outside any repo, so pass --workdir if a job needs a project's files.

Codex has scheduled tasks in the ChatGPT desktop app and on the web. For local files, OpenAI says to keep the computer on and the app running. The Codex CLI and IDE extension have no scheduling screen, so you set tasks up in the app.

Safety and Approvals

The defaults point in different directions.

Hermes checks commands before they run. Its security page lists three approval modes, and smart is the default: a second model rates each flagged command, lets low-risk ones through, blocks clearly dangerous ones and asks you about the rest. On the default local backend, commands still run on your host. Switch to a Docker, Modal, Daytona or Vercel Sandbox backend and Hermes skips those checks, because the container becomes the boundary.

Codex fences commands in. Its sandbox uses each operating system's own enforcement, such as Seatbelt on macOS. In the default workspace-write mode, Codex can edit files and run routine commands inside your project. It asks before stepping outside, and it can pass those requests to an automatic reviewer if you turn that on. Full access is something you choose on purpose.

In short, Hermes ships with a gatekeeper and Codex with a fence. If Hermes will read untrusted messages or web pages, give it a container.

Billing: What You Actually Pay For

Hermes is MIT-licensed software, so you pay whoever runs your model. That can be an API key, OpenRouter, a local server or Nous Portal, Nous Research's optional subscription. If you use the ChatGPT sign-in, Hermes says that which plans qualify and how its usage counts against your Codex limits are "not currently documented."

One more detail from Hermes' runtime docs: background jobs like title generation, compression and the self-improvement review also go through your ChatGPT sign-in by default. You can send them to a cheaper model in config.yaml.

Codex usage comes from your ChatGPT plan. OpenAI's pricing page says ChatGPT Work and Codex share one allowance across Free, Go, Plus, Pro, Business and Enterprise plans. Eligible plans can add credits or pay-as-you-go billing. Signing in with an API key bills at API rates instead. Plan access changes often, so check that page rather than an old comparison.

How to Migrate Codex to Hermes

The Hermes README covers this. On a fresh install, hermes setup looks for ~/.codex, offers to import it, installs the official agent-importers plugin and shows a preview first.

If Hermes is already set up, install the plugin once, then run the importer:

hermes plugins install agent-importers
hermes import-agent codex --dry-run
hermes import-agent codex

Hermes' import guide says what moves:

From Codex CLILands in Hermes as
Global AGENTS.mdEntries in MEMORY.md
memories/*.mdEntries in MEMORY.md
Skills with a SKILL.md~/.hermes/skills/codex-imports/
MCP servers in config.tomlmcp_servers in Hermes' config.yaml

The importer never reads ~/.codex/auth.json, and it strips secret-looking MCP headers and variables, so re-add those yourself. MEMORY.md is capped at 2,200 characters, so a long AGENTS.md won't fit as-is. Trim it before you import. If you keep using Codex, hermes import-agent --sync pulls in later changes.

There's no importer in the other direction. OpenAI's import flow brings setups in from Claude Code, Claude Cowork and Cursor, not from Hermes.

Hermes Agent vs Codex: Which Should You Choose?

You want...Pick
One assistant across many chat appsHermes Agent
The strongest sandbox by default on your laptopCodex
To swap models weekly, including local onesHermes Agent
Repo work that continues with your laptop shutCodex Cloud
A memory file you can read in fullHermes Agent
IDE, Xcode or JetBrains integrationCodex
Coding jobs started from a chat threadHermes plus the codex skill
Codex's tools and sandbox behind a chat gatewayHermes on the Codex app-server runtime

Choose Hermes Agent if you want an always-on assistant you message, and you're happy to run a gateway and look after its approvals.

Choose Codex if most of your work is code, you already have a ChatGPT plan, and you want OpenAI's sandbox, editor support and cloud tasks.

Choose both if you want to text coding jobs to your machine. Install and sign in to Codex, try the codex skill on a throwaway repo, and widen permissions only after you've watched a few runs.

Still weighing other options? Hermes Agent alternatives sorts other assistants by why people switch, and OpenCode vs Codex compares Codex with an open-source coding agent. For a full tour of Codex itself, read our OpenAI Codex guide.

Where Taku Fits

Hermes wraps Codex in a chat gateway, and the app-server runtime goes a layer deeper. Either way, the agent still sits on top of a phone or computer it doesn't control.

Taku OS is an open-source, Android-based operating system with an integrated AI agent.

Taku OS is an early-stage Research Preview.

Harnesses, models, tools, skills and connectors all plug into Taku OS the same way. Keep what works, and replace what doesn't.

Taku OS is open source. Install it, build on it, and tell us what breaks.

Taku OS, already installed.

Key Points

  • Hermes Agent is an MIT-licensed, self-hosted assistant from Nous Research that you message. Codex is OpenAI's coding agent for the terminal, editors, ChatGPT apps and the cloud
  • Hermes uses Codex three ways: Codex models through a ChatGPT sign-in, the bundled codex skill, and the opt-in Codex app-server runtime
  • Defaults differ: Hermes reviews risky commands with a second model; Codex runs local commands in an OS sandbox
  • Memory: Hermes keeps two small capped files. Codex memories are opt-in, generated and stored under ~/.codex
  • Scheduling: Hermes' cron needs the gateway running. Codex scheduled tasks live in the ChatGPT app and web
  • Migration: hermes plugins install agent-importers, then hermes import-agent codex. Credentials stay behind

FAQ

Can Hermes Agent sign in with ChatGPT?

Yes. Run hermes model and pick ChatGPT or Codex Subscription. Hermes signs in with a device code and uses Codex models. Its docs don't yet say which ChatGPT plans qualify or how the usage counts against your Codex limits.

Do I need the Codex CLI to use Codex models in Hermes?

No, not for the provider route. You need it for the bundled codex skill and for the Codex app-server runtime, which also needs its own codex login.

Is there a Hermes Agent Codex skill?

Yes. codex is a bundled skill in the autonomous-ai-agents category. It runs the Codex CLI on the same machine, inside a Git repository.

Does Hermes import my Codex API key?

No. The importer never reads ~/.codex/auth.json and strips secret-looking MCP settings. Set up providers with hermes setup or hermes model afterward.

Is Hermes Agent better than Codex for coding?

For coding in a repo, not by default. Codex brings OpenAI's sandbox, editor integrations and cloud tasks. Hermes is stronger as the assistant in front, and it can hand repo work to Codex.

Can I run Hermes and Codex on the same machine?

Yes, and many setups do. Keep separate logins, since Hermes' sign-in and codex login are stored apart. Remember that delegated jobs run with whatever access you gave each tool.