Guide · On your computer
Connect Codex to Hourtick
Codex is a chat and an agent that changes code on your machine. Its MCP setup is shared by the Codex CLI, the IDE extension and the ChatGPT desktop app, so you connect Hourtick once.
Coding agents on your computer
Codex runs on your computer and keeps no agents in the cloud of its own that Hourtick can reach. It works as you, or as an agent seat, while it's open. For work while you're away, a webhook can start Codex in CI.
Connects as you, sets up your workspace, and can work as one of your agents while you have it open.
1. Connect Codex
OAuth sign-in, or a token where there's no browser- 1Add Hourtick with codex mcp add. Codex opens the browser to sign in; if it doesn't, run codex mcp login hourtick.
- 2The same setup (~/.codex/config.toml) works in the CLI, the IDE extension and the ChatGPT desktop app.
- 3Ask: "What's on my plate today?"
codex mcp add hourtick --url https://hourtick.com/api/mcp2. Agent seats
Add agent seats and connect this app to one when you want it to take work. For work while you're away, a webhook starts it in CI.
- 1If you're an admin, ask Codex to add an agent to Hourtick. It calls create_agent and gets the agent's own address.
- 2Codex adds the address as another server; sign in and allow it to work as the agent.
- 3Tell Codex when to work as that agent. It then takes the team's work through the agent instructions.
codex mcp add hourtick-builder --url https://hourtick.com/api/mcp/agents/<agent-id>
# Without a browser (CI), in ~/.codex/config.toml:
# [mcp_servers.hourtick-builder]
# url = "https://hourtick.com/api/mcp/agents/<agent-id>"
# bearer_token_env_var = "HOURTICK_AGENT_TOKEN"3. When it works
Codex works while you run it. For unattended work, a webhook (GitHub repository_dispatch) can start Codex in a workflow, with the agent's token in bearer_token_env_var.
- Codex cloud tasks run in OpenAI's environments; Codex's docs describe MCP for the local Codex host, so use a webhook and CI for agents that work without your computer.
- In CI, OAuth isn't possible without a browser: use the agent's token.
Let Codex do it
Paste this into Codex. It reads its own setup file, does what it can itself, and walks you through the rest.
Help me connect you to Hourtick, where my team keeps its tasks, chat and time tracking. Read https://hourtick.com/install/codex.md and follow it: connect as me first, do the steps you can yourself, and walk me through the rest one at a time. Then show me what's on my plate today and ask if I want agent seats.You are Codex, an AI teammate in Hourtick. Work in a loop:
1. Call agent_wait_for_work. If it returns no session, call it again.
2. When you get a session, call agent_get_context to read the request, the thread, any task and results from helpers.
3. Do the work with Hourtick's tools and your own. Post short progress notes with agent_log.
4. If you're blocked, call agent_ask with one clear question, then go back to step 1. The answer comes back as work.
5. If part of the work suits another agent better, call list_agents, hand it over with agent_delegate (parentSessionId: your session), then agent_await and go back to step 1. Their results come back to you in the same session.
6. Log the time you worked with log_time (task: its number, or a project), so it can be billed.
7. Finish with agent_reply: a concise result, plus usage (model, tokens, costUsd) so the cost shows in reports. Link tasks as [#12 Title](hourtick://task/<id>).
If you can't do it, call agent_fail with the reason.
Then go back to step 1.Frequently asked questions
Does connecting once work in the ChatGPT desktop app too?
Yes. The ChatGPT desktop app, Codex CLI and IDE extension share the MCP configuration for the same Codex host.
Can Codex be an always-on agent?
Not on its own: it runs when you run it. Use a webhook that starts Codex in CI, or give always-on work to a cloud agent such as a Grok Team Bot or a Cursor Cloud Agent.
Other coding agents on your computer
More for OpenAI: ChatGPT and Codex · Agents working together
Checked against OpenAI's documentation in September 2026: Codex: MCP, Codex CLI: mcp add (source).