Skip to content

Codex provider: contributed env never reaches the app-server process, so CODEX_HOME and BB_CODEX_BRIDGE_APP_SERVER_COMMAND cannot be set per thread #7179

Closed

Description

@Pryapus

bb 0.48.1, provider-codex bridge (host.mjs).

bb.providers.experimental_contributeEnv("codex", ...) entries appear in provider.env-resolved and reach the thread's shell commands, but not the codex app-server process:

  • appServerLaunchEnv builds the launch env from the daemon's process.env plus only CODEX_OPENAI_BASE_URL and CODEX_POOL_AUTH_TOKEN from the thread envVars;
  • cX reads BB_CODEX_BRIDGE_APP_SERVER_COMMAND and _ARGS from that env;
  • sanitizeInheritedChildProcessEnv drops every BB_* name.

Result: a contributed CODEX_HOME changes the shell's variable but not where Codex stores rollouts. Verified: a thread whose shell printed CODEX_HOME=~/.codex-bb wrote its rollout to ~/.codex/sessions.

Use case: run bb Codex threads in a managed Codex home with their own guard hooks and model defaults, without touching the user's desktop ~/.codex that the Codex desktop app uses.

Ask: pass contributed CODEX_HOME (and ideally the app-server command) through to the app-server launch env, or add a provider setting for the Codex home and app-server command.

Activity

  1. added theissue type on Nov 6, 2026
  2. added
    providers
    provider-codex
    partial-repro
    on Nov 6, 2026
  3. bb-slop-cop commented on Nov 6, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    Classification: Bug · Priority: Medium · Effort: Medium · providers, provider-codex.

    Reproduction and root-cause report: PARTIALLY REPRODUCED, high root-cause confidence. Reproduction label: partial-repro.

    The report is committed to get-bb/reports. Its Pages address still returns 404 after a deployment failure and superseded builds; the committed HTML above includes the full tests and evidence.

    • Home selection already works on current main: Launch Codex app-server on the project's CODEX_HOME #6887 repaired CODEX_HOME forwarding on November 3, 2026. Five existing child-process tests pass.
    • Remaining finding: contributed app-server command and argument overrides are ignored because the launch-environment allowlist excludes them. Child-environment sanitization is not what prevents launcher selection.
    • Verification: repeated directly in two clean checkouts at 14b3293254; both runs pass all five home tests and fail the same two launcher-override hypothesis assertions. An additional existing focused run passes 11/11 tests. No real account or rollout was inspected.
    • No PR: the home defect is already fixed; supporting per-thread executable selection needs a launch-policy decision outside the simple-fix criteria.
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

    partial-reproprovider-codexproviders

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions