Skip to content

[Bug]: Codex text-generation helpers identify as codex_exec, not T3 Code #38461

Closed

Description

@wangbinyq

What happens

T3 Code's Codex app-server turns identify as T3 Code, but its Codex text-generation helpers (codex exec for thread titles, branch names, commit messages, PR content and review guides) send Codex's default identity instead: originator: codex_exec and User-Agent: codex_exec/....

Gateways and usage tools that attribute requests by User-Agent therefore count these helper calls as a separate client.

Why

CodexProvider.codexAppServerEnvironment sets CODEX_INTERNAL_ORIGINATOR_OVERRIDE: CODEX_CLIENT_NAME for app-server turns. CodexTextGeneration.ts builds its own env without it:

https://github.com/pingdotgg/t3code/blob/main/apps/server/src/textGeneration/CodexTextGeneration.ts#L288

const env = {
  ...effectiveEnvironment,
  ...(effectiveConfig.homePath ? { CODEX_HOME: ... } : {}),
};

Steps to reproduce

  1. Pick a Codex provider instance as the text-generation model (or the source-control writer model).
  2. Create a thread, or generate a commit message / branch name.
  3. Inspect the request headers at the provider or gateway: the helper call sends originator: codex_exec.

Expected

All Codex processes T3 starts, including the codex exec helpers, should identify as T3 Code.

Fix

Add CODEX_INTERNAL_ORIGINATOR_OVERRIDE: CODEX_CLIENT_NAME to that env, or reuse codexAppServerEnvironment.

Environment

T3 Code 0.1.9, Codex CLI 0.170.0, Linux. A plain codex exec --ephemeral ... request sends originator: codex_exec and user-agent: codex_exec/0.170.0 (CachyOS Linux Rolling Release; x86_64) dumb (codex_exec; 0.170.0).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions