Skip to content

Forward daemon-related CBM environment variables in generated Codex configuration #1664

Description

@anton-matosov

Context

Follow-up to #1562

Version 0.10.3 fixed forwarding CBM_CACHE_DIR to the Codex MCP subprocess. However, other CBM environment variables may also affect the daemon started or used by that subprocess. Codex sanitizes the subprocess environment unless variables are explicitly included in env_vars.

Proposed change

Include all supported daemon-relevant CBM variables in the generated Codex MCP configuration:

[mcp_servers.codebase-memory-mcp]
env_vars = [
  "CBM_ALLOWED_ROOT",
  "CBM_CACHE_DIR",
  "CBM_DIAGNOSTICS",
  "CBM_LOG_LEVEL",
  "CBM_WORKERS",
  "CBM_MEM_BUDGET_MB",
  "CBM_DUMP_VERIFY_MIN_RATIO",
]

As with CBM_CACHE_DIR, these names can be listed unconditionally: Codex forwards each variable only when it is present in the parent environment.

Before implementation, confirm that this is the complete set of supported environment variables that must reach the daemon.

Acceptance criteria

  • Generated Codex configuration forwards every supported daemon-relevant CBM environment variable.
  • Existing unrelated env_vars entries are preserved.
  • Repeated installation remains idempotent and does not duplicate entries.
  • Installer-generated Codex agent profiles use the same forwarding behavior where applicable.
  • Regression tests cover generation, preservation of existing entries, and repeated installation.
  • Documentation identifies which CBM variables are forwarded to Codex subprocesses.

Metadata

Metadata

Assignees

No one assigned

    Labels

    editor/integrationEditor compatibility and CLI integration

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions