How do I let the Codex CLI write its conclusion back to Tares?
Tares lets the Codex CLI write its conclusion back when you connect Codex to the Tares MCP endpoint with a project key and it calls the record_finding tool. The finding lands on the entity’s timeline under the key’s name. The next agent that reads that entity, whether a Tares agent or another outside agent, starts from it.
How it works
A project key is the credential for an agent that should work inside one project. It reads that project and records findings in it, and any other call answers 403. You name the key after the agent, for example codex, and every finding Codex records carries that name.
With a project key the project is implied, so the tools need no project argument. When Codex reaches a conclusion it calls record_finding with three pieces:
- entity: what the finding is about, such as
api-server. - finding: the conclusion, written as markdown.
- verdict: one lowercase word, such as
rca.
You can also add a headline and a next_step. Before it writes, Codex can call list_findings and project_timeline to see what Tares agents and other outside agents already concluded, so it builds on that instead of repeating it.
The same flow works for any MCP client. Only the connect command differs, as described in Connecting agents (MCP).
Set it up
You need a running Tares instance with a project that has sources, started with auth so keys are checked. This is the same flow as in Connect an outside agent to a project, with Codex as the client. If you have no project yet, the AI SRE demo gives you one.
-
Run the MCP server. Locally it serves
http://127.0.0.1:8788/mcp. On a server or Tares Cloud instance it is already running.tares mcp -
Open the project, go to Settings → Keys and choose New key. Name it
codex. Copy the secret now, because it is shown once. -
Give Codex the key through an environment variable, then register the Tares endpoint. Keep
--urlbefore the URL, because a bare URL registers a stdio server. Replace the endpoint with your own if Tares runs on a server or in Tares Cloud.export TARES_API_KEY=<project-key> codex mcp add tares --url http://localhost:8788/mcp \ --bearer-token-env-var TARES_API_KEY -
Check the connection by asking Codex:
Use tares: which project can you work in?
It calls
list_projectsand names the one project the key belongs to. -
Ask for something the project is about, and tell Codex to record its conclusion:
Use tares: what happened to api-server in the last 30 minutes? Check the project’s skills first, and record what you conclude.
Codex reads the timeline and then calls
record_findingforapi-server.
On an open instance there are no keys. Skip step 2, leave out the key, and name the project in your prompts instead.
What you get
- The conclusion shows as a card under What the agents found on the project’s Overview, under the key’s name.
- In the Activity view of Advanced setup it is a thread of its own, marked as recorded from outside Tares.
- It sits on the entity’s timeline in Explore, so the next Tares agent that reads
api-serverstarts from Codex’s conclusion. list_findingsreturns it next to the findings of Tares agents and other outside agents, newest first.- You stay in control of access. Revoke the key under Settings → Keys and Codex is cut off, and its subscriptions go with it.
When something else fits
- If an agent should run on its own instead of when you ask, such as a service with a webhook, use
join_projectso every trigger firing in the project is sent to its URL. - If you only want to ask questions without wiring up an external client, the in-app Ask chat in the console reads the same data.
- For Cursor, Claude Code or your own agent, the steps are the same and only the connect command changes, so see Connecting agents (MCP).