Skip to content

Codex transparent runs can bypass Relay when exec has command-scoped config #950

Description

@ventali-fleet

Problem

The Codex launcher inserts Relay provider and hook overrides immediately after the host executable. When the caller launches codex exec with additional --config values in the exec command scope, Codex resolves that nested scope independently and can fall back to the default OpenAI provider. The agent run succeeds, but its provider traffic bypasses Relay.

Reproduction

Prepare a transparent Codex launch whose original argv includes codex exec --config <caller-setting>. The prepared argv currently places model_provider="nemo-relay-openai" before exec, while the caller setting remains after it. The active exec scope consequently does not retain the Relay provider override. The same problem applies to codex exec resume.

Expected behavior

Relay-generated provider and hook overrides should be inserted into the active Codex command scope: after exec, or after exec resume for resumed sessions. Caller-supplied command-scoped configuration must not cause transparent provider traffic to bypass Relay.

Proposed validation

Add launcher regressions for both exec --config ... and exec resume --config ..., asserting that Relay overrides and caller configuration occupy the same active command scope.

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