Agent Upstart

Cool things people are building with agents — and practical help getting the most out of them.

Playbooks · Coding tasks

Check your Codex and Claude Code config for relay tampering: base URL, sandbox, and credentials you did not set

Written November 1, 2026 · Edited November 4, 2026

For a developer who installed Codex or Claude Code from a setup command they did not get from the official docs: find out whether your prompts, files, and credentials are going to the vendor or through a relay that also switched your sandbox off. No step below prints a credential value.

What Symantec observed

On 29 October 2026, Symantec's Threat Hunter Team reported an unauthorized relay service that installs the genuine Codex and Claude Code command-line tools, then rewrites their configuration so every request routes through third-party servers instead of the vendors' own servers. The service had been active since at least early 2026 and had affected systems at about a dozen organizations, most of them in mainland China, with others in South Korea, Taiwan, and Malaysia. Symantec found no evidence that the relay operator had abused the access, and states plainly that this is not a vulnerability in Codex or Claude Code: the tools behave as designed once their configuration has been changed. Redirection was observed. Data theft was not. This page keeps that distinction throughout.

Delivery, as Symantec describes it, was a one-line command the user ran themselves, shortly after a legitimate install of the tool through npm, fetching a fileless setup script from a lookalike domain. Symantec names vibe.aiok.me as one such domain. The script then rewrote ~/.codex/config.toml for Codex, or ~/.claude/settings.json for Claude Code: it replaced the base URL with a domain the relay controls, swapped in a relay-issued credential, and set both as user-level environment variables so the change survives a reboot. For Codex it also set the sandbox mode to full access, enabled network access for the write sandbox, and disabled telemetry and error reporting. On one host, the script first logged the user out of a legitimate Anthropic session and deleted the authentication environment variables, before issuing relay-controlled credentials. Whether that logout step ran on every deployment was not established by Symantec. The relay's backend rotated across at least eight domains over the observation period, all impersonating OpenAI- or Anthropic-branded services, according to the report. The full list of domains and file hashes in the report is the reference for matching; this page does not repeat it.

This audit is different from the key-files audit. That audit covers where credential files live on your machine and who can read them. This audit covers whether the configuration itself was rewritten: a different endpoint, a different sandbox, and different credentials. A machine can pass the key-files audit, with every credential file readable only by its owner, and still send every request through a relay, because the relay's credentials are the ones in use.

Before you start

Work in your own terminal, on your own machine. Every command below names fields or environment variable names only, or prints file and field names without values. If a command would print a credential value, stop. Do not display a whole configuration file on screen, do not paste one into a chat or a ticket, and do not run the agent while you audit its configuration. A configuration file that holds a login is a secret from the moment you open it. Keep a note of what you find in your own words: which field, which file, and whether you set it. The values themselves are not needed for this audit, and writing them down creates a second copy of the secret.

Steps: Codex

  1. List the sandbox, endpoint, and network fields by name. Search the Codex configuration for the field names only, so the matching lines show the field and its value for these three settings, and nothing else from the file:
    grep -n 'sandbox_mode\|base_url\|network_access' ~/.codex/config.toml
    OpenAI's sandbox documentation names three sandbox modes: read-only, workspace-write, and danger-full-access, and describes the last as running without sandbox restrictions, removing the filesystem and network boundaries. It should be used only when you want the agent to act with full access. The documentation describes workspace-write with an on-request approval policy as the lower-risk preset for local work. If sandbox_mode reads danger-full-access and you did not set it, that is a stop signal. If network access is on for the write sandbox and you did not set it, note that too.
  2. Read the endpoint in context. A base_url in a provider definition points Codex at a particular model service. A custom provider you set up yourself will have one you recognize. A base_url naming a domain you do not recognize, or one that appeared after a setup command from outside the official docs, is a stop signal. Do not judge the endpoint by whether the tool still works: a relay is built to work, and a working agent is not evidence that the endpoint is the vendor's.
  3. Open the file as text and look at what surrounds those fields. Read ~/.codex/config.toml in a text editor, looking only for entries you do not recognize: a provider you did not add, a model you did not choose, or a server entry you did not write. If the file is long, read the sections around the fields from step 1 first. Do not copy the file anywhere.

Steps: Claude Code

  1. List the environment variable names in the settings file, without their values. Claude Code keeps gateway routing in the env block of a settings file, and Anthropic's gateway documentation says the two variables every gateway connection needs are the base URL variable and a credential variable, set either in the shell or in that block. List which of those names are present, values excluded:
    grep -o '"ANTHROPIC_BASE_URL"\|"ANTHROPIC_AUTH_TOKEN"\|"ANTHROPIC_API_KEY"' ~/.claude/settings.json
    Presence alone is not proof of tampering. A legitimate gateway run by your own organization also sets the base URL variable. The question is whether you, or your organization, set it. If the base URL name is present and neither you nor your organization set it, that is a stop signal.
  2. Read the endpoint name only, in a text editor. Open ~/.claude/settings.json yourself and look at the address in the env block. Compare it with the address your organization gave you, if you use a gateway. If you do not use a gateway and the address is anything other than the vendor's own service, that is a stop signal. Do not run Claude Code to ask it where it is pointing: the running agent is the thing under audit, and its answer passes through the very endpoint in question.
  3. Run the status check from the same shell only after the file looks right. Anthropic's gateway documentation says the /status display shows the base URL in use. Use it as a confirmation after the file audit, not as a substitute for it. If the status display shows an address you did not set, treat the configuration as tampered even if the file you read looked clean, and go to the next section.

Steps: environment variables on the machine

  1. List the names of the relay-related environment variables, without their values. Symantec's report says the relay established its endpoint and credential as user-level environment variables so the change survives a reboot, and its protection list names OPENAI_BASE_URL, CODEX_API_KEY, and ANTHROPIC_AUTH_TOKEN as variables to watch for outside an approved deployment. List variable names only:
    env | cut -d= -f1 | grep -E 'OPENAI_BASE_URL|CODEX_API_KEY|ANTHROPIC_AUTH_TOKEN|ANTHROPIC_BASE_URL|ANTHROPIC_API_KEY'
    A variable you set yourself for a gateway you use, or that your organization deployed, is expected. A variable you did not set, in a shell profile, a user environment setting, or any other place it persists across reboots, is a stop signal. Removing it from one terminal session does not remove a persisted variable: find where it is set and remove it there.
  2. Do not confuse a gateway with a relay by name alone. Both use the same fields. The difference is who set them and where they point. A gateway address from your own organization, set by your organization, is a gateway. The same field set by a setup command from a lookalike domain, pointing at a domain you do not recognize, is the relay pattern Symantec describes. When in doubt, ask the team that runs your gateway, and do not use the agent for sensitive work until you have an answer.

If you find tampering

  1. Stop using the agent for anything sensitive. Do not run it "once more" to see what happens. Every request through a relay passes through the relay's servers, and with the sandbox off, a response from the relay can run with your full privileges, as Symantec warns. The risk is potential, not observed, but the configuration that would support it is already in place.
  2. Remove the relay's configuration, not just one line. Delete the endpoint and credential entries you did not set from the configuration file, remove the persisted environment variables, and restore the sandbox mode and approval policy to the values you chose. Reinstalling the tool alone does not do this: the configuration files and persisted variables survive a reinstall. Read the files again afterward and confirm the entries are gone.
  3. Replace the credentials. Sign out and back in through the agent's own login, and revoke and reissue any API key that the relay configuration may have exposed, at the provider's own site. A credential that passed through a relay is a credential the relay held. Removing it from a file does not stop someone who already copied it.
  4. Get the tool again from the official docs only. If you need the tool back, install it by the route in the vendor's own documentation, and set up any gateway through your organization's own instructions. Do not reuse a setup command, a script, or a domain from the route that led to the tampering, even if it now looks routine.

What can go wrong

Limits

Related playbooks

Sources

Back to: Coding playbooks hub · Also: Check where your coding agents store API keys on your own machine · Check for planted instruction files before you start an agent