# turno 0.8.0 (/releases/cli/0-8-0)

Agents now get their gateway token from turno mcp headers, which checks that the process on the gateway port is your mcpd before it prints anything.

Released 2026-12-03.

Agents now get their gateway token from **[`turno mcp headers`](/docs/concepts/gateway#every-agent-config-points-at-one-place)**, which **[checks that the process on the gateway port is your mcpd](/docs/security#the-gateway)** before it prints anything. The token is no longer in the Claude Code and Codex configs, and the launchers of Copilot CLI and Cursor CLI run the same check.

## Upgrade [#upgrade]

<Upgrade>
**Run `turno mcp sync` once** after updating, so existing agent configs move to the new entries. `turno upgrade --finish` offers it.

**Codex needs 0.148.0 or newer**: it reads `http_headers_helper` from that version on. An older Codex gets no token for its gateway servers, which fail, and `turno doctor` warns about it.

**Copilot CLI and Cursor CLI launchers written by an earlier turno**: run `turno profile repair <p>`.
</Upgrade>

## Highlights [#highlights]

<Highlight area="Gateway" title="Agents get the token after a check" href="/docs/concepts/gateway#every-agent-config-points-at-one-place" more="The gateway">
`turno mcp headers <profile>` checks that the process on the gateway port is your mcpd (it runs as your user and answers the `/hello` challenge) before it prints anything.

```sh
turno mcp sync
# see why the check fails
turno mcp headers <profile>
```

- **Claude Code and Codex**: `turno mcp sync` writes their entries with `headersHelper` and `http_headers_helper`, both pointing at a `turno-mcp-headers` script in turno's bin folder. The token is no longer in `.claude.json` or the Codex config, and these agents run the check before each connection. `turno upgrade --finish` keeps the script pointing at the turno you have after a Node version switch.
- **Copilot CLI and Cursor CLI**: their launchers run the same check when they start and export `TURNO_MCPD_TOKEN` only when it passes. When it does not, they say why once.
- **A service that is starting**: when mcpd's service is installed but not listening, the check waits up to 2.5 seconds for it.
- **When the check fails**: the agent gets no token. Claude Code, Copilot CLI and Cursor CLI may still connect without it, so a process that is not mcpd can answer as the gateway's servers; `turno doctor` and the status line show it. Codex does not connect and shows only "MCP HTTP headers helper exited with status 5": run `turno mcp headers <profile>` to see why.
</Highlight>

## More [#more]

- **The status line**: it uses the same check, so a process on the port that is not your mcpd shows as `mcpd port taken`, and an mcpd that cannot prove it holds the token as `mcpd outdated`.
- **Configs with entries from an earlier turno**: `turno doctor` warns about them, and `turno upgrade --finish` offers `turno mcp sync` to move them to the new entries.

## Fixes [#fixes]

- **A process that never answers the hello**: `turno mcp headers` gives up after 5 seconds on a process that takes the gateway port and never answers the hello, so it answers with the reason well before the 10 seconds agents give a headers helper run out.
- **The script before the configs**: `turno mcp sync` writes the `turno-mcp-headers` script before it changes any agent config, also when open sessions make it skip every profile. A file of that name that turno did not write stops the sync before a config points at it, and `turno mcp sync --dry-run` reports it too.
- **`turno doctor` and the script**: it fails when synced configs run a `turno-mcp-headers` that is missing or that turno did not write.
- **`turno doctor --security` and the bin folder**: it fails when others or another group can write turno's bin folder or that script, and warns when only a Linux user private group (named after you, with no other member) can. `--fix` removes their write access and keeps them readable, for a folder in your home that you own.
- **The bin folder's mode**: turno creates its bin folder as 0755 whatever the umask.
- **`turno mcp logout --help`**: it explains what logout does. It asks a running mcpd first, which lets a refresh in flight finish, stops using the login and revokes tokens it holds that the secret store does not have, then revokes and removes the stored login (`--no-revoke` revokes nothing). It also lists why mcpd may not be told: not running, no answer within 15 s, not reachable, or the process on its port did not prove it is your mcpd. The command itself is unchanged.

## Changed behavior [#changed-behavior]

- **Agent configs at the next sync**: `turno mcp sync` rewrites the gateway entries of Claude Code and Codex to point at `turno-mcp-headers`, and the token is no longer in their config files. Until then, Codex launchers keep exporting the token, after the same check, for configs that still read it from the environment, and a profile with open sessions that sync skips keeps its token file.
- **Codex older than 0.148.0**: its gateway servers get no token and fail.
- **No token when the check fails**: an agent gets its gateway token only when the check passes.

## Links [#links]

- Full changelog: [turno-cli](https://github.com/wimo-dev/turno/blob/turno-cli%400.8.0/packages/turno/CHANGELOG.md).
- [Every agent config points at one place](/docs/concepts/gateway#every-agent-config-points-at-one-place) and [the gateway](/docs/security#the-gateway) in Security and privacy.
- [The same servers for every agent](/docs/guides/claude-code-and-codex#the-same-servers-for-every-agent) with Claude Code and Codex.
- [`turno mcp sync`](/docs/reference/cli/mcp#turno-mcp-sync), [`turno mcp logout`](/docs/reference/cli/mcp#turno-mcp-logout) and [`turno doctor`](/docs/reference/cli/doctor).
- What `turno doctor` says: [Synced configs have gateway entries from an earlier turno](/docs/troubleshooting/configs-outdated-entries), [Synced configs run a turno-mcp-headers that does not exist](/docs/troubleshooting/headers-script-missing), [Synced configs run a turno-mcp-headers that turno did not write](/docs/troubleshooting/headers-script-not-turno), [Other users can change turno's launchers](/docs/troubleshooting/bin-writable), [Another process holds the gateway's port](/docs/troubleshooting/port-in-use) and [An agent is too old for the gateway entries](/docs/troubleshooting/agent-too-old-for-gateway).