`trunk` not recognized as a default git branch with /review

Open 💬 1 comment Opened Jun 8, 2026 by snoozy

What version of Codex CLI is running?

0.137.0

What subscription do you have?

Pro 20x

Which model were you using?

gpt-5.5

What platform is your computer?

macOS Darwin 25.5.0 arm64 arm

What terminal emulator and version are you using (if applicable)?

Ghostty

Codex doctor report

{
  "schemaVersion": 1,
  "generatedAt": "1780940812s since unix epoch",
  "overallStatus": "fail",
  "codexVersion": "0.137.0",
  "checks": {
    "app_server.status": {
      "id": "app_server.status",
      "category": "app-server",
      "status": "ok",
      "summary": "background server is not running",
      "details": {
        "control socket": "/Users/dli/.codex/app-server-control/app-server-control.sock",
        "daemon state dir": "/Users/dli/.codex/app-server-daemon",
        "mode": "ephemeral",
        "pid file": "/Users/dli/.codex/app-server-daemon/app-server.pid (missing)",
        "settings": "/Users/dli/.codex/app-server-daemon/settings.json (missing)",
        "status": "not running",
        "update-loop pid file": "/Users/dli/.codex/app-server-daemon/app-server-updater.pid (missing)"
      },
      "remediation": null,
      "durationMs": 0
    },
    "auth.credentials": {
      "id": "auth.credentials",
      "category": "auth",
      "status": "ok",
      "summary": "auth is configured",
      "details": {
        "auth env vars present": "OPENAI_API_KEY",
        "auth file": "/Users/dli/.codex/auth.json",
        "auth storage mode": "File",
        "stored API key": "false",
        "stored ChatGPT tokens": "true",
        "stored agent identity": "false",
        "stored auth mode": "chatgpt"
      },
      "remediation": null,
      "durationMs": 0
    },
    "config.load": {
      "id": "config.load",
      "category": "config",
      "status": "ok",
      "summary": "config loaded",
      "details": {
        "CODEX_HOME": "/Users/dli/.codex",
        "config.toml": "/Users/dli/.codex/config.toml",
        "config.toml parse": "ok",
        "cwd": "/Users/dli/asim3",
        "enabled feature flags": "shell_tool, unified_exec, shell_snapshot, terminal_resize_reflow, sqlite, hooks, enable_request_compression, multi_agent, apps, tool_suggest, plugins, in_app_browser, browser_use, browser_use_external, computer_use, plugin_sharing, image_generation, skill_mcp_dependency_install, mentions_v2, steer, guardian_approval, goals, collaboration_modes, tool_call_mcp_elicitation, personality, fast_mode, tui_app_server, responses_websockets_v2, workspace_dependencies",
        "feature flag overrides": "mentions_v2=true, responses_websockets_v2=true",
        "feature flags enabled": "29",
        "log dir": "/Users/dli/.codex/log",
        "mcp servers": "1",
        "model": "gpt-5.5",
        "model provider": "openai",
        "sqlite home": "/Users/dli/.codex"
      },
      "remediation": null,
      "durationMs": 0
    },
    "git.environment": {
      "id": "git.environment",
      "category": "git",
      "status": "ok",
      "summary": "git version 2.50.1 (Apple Git-155)",
      "details": {
        ".git entry": "directory",
        "PATH git #1": "/usr/bin/git",
        "PATH git entries": "1",
        "git branch": "dli/roll-out-use-themes",
        "git build options": "git version 2.50.1 (Apple Git-155); cpu: arm64; no commit associated with this build; sizeof-long: 8; sizeof-size_t: 8; shell-path: /bin/sh; feature: fsmonitor--daemon; libcurl: 8.7.1; zlib: 1.2.12; SHA-1: SHA1_DC; SHA-256: SHA256_BLK",
        "git exec path": "/Applications/Xcode.app/Contents/Developer/usr/libexec/git-core",
        "git version": "git version 2.50.1 (Apple Git-155)",
        "repo detected": "true",
        "repo root": "/Users/dli/asim3",
        "selected git": "/usr/bin/git"
      },
      "remediation": null,
      "durationMs": 26
    },
    "installation": {
      "id": "installation",
      "category": "install",
      "status": "fail",
      "summary": "npm install -g @openai/codex would update a different install",
      "details": {
        "PATH codex #1": "/Users/dli/Library/pnpm/bin/codex",
        "current executable": "/Users/dli/Library/pnpm/store/v11/links/@openai/codex/0.137.0-darwin-arm64/eb4fa343fe2e01d7d573ce0f6423cd377af2d3d18774b34a2f4b9a0699546d42/node_modules/@openai/codex/vendor/aarch64-apple-darwin/bin/codex",
        "install context": "npm (package /Users/dli/Library/pnpm/store/v11/links/@openai/codex/0.137.0-darwin-arm64/eb4fa343fe2e01d7d573ce0f6423cd377af2d3d18774b34a2f4b9a0699546d42/node_modules/@openai/codex/vendor/aarch64-apple-darwin, bin /Users/dli/Library/pnpm/store/v11/links/@openai/codex/0.137.0-darwin-arm64/eb4fa343fe2e01d7d573ce0f6423cd377af2d3d18774b34a2f4b9a0699546d42/node_modules/@openai/codex/vendor/aarch64-apple-darwin/bin, resources /Users/dli/Library/pnpm/store/v11/links/@openai/codex/0.137.0-darwin-arm64/eb4fa343fe2e01d7d573ce0f6423cd377af2d3d18774b34a2f4b9a0699546d42/node_modules/@openai/codex/vendor/aarch64-apple-darwin/codex-resources, path /Users/dli/Library/pnpm/store/v11/links/@openai/codex/0.137.0-darwin-arm64/eb4fa343fe2e01d7d573ce0f6423cd377af2d3d18774b34a2f4b9a0699546d42/node_modules/@openai/codex/vendor/aarch64-apple-darwin/codex-path)",
        "managed by bun": "false",
        "managed by npm": "true",
        "managed package root": "/Users/dli/Library/pnpm/store/v11/links/@openai/codex/0.137.0/2ce4c026fd5e267b675a633ec56b4900b6b6bd7573d45347022d68733b16c1f4/node_modules/@openai/codex",
        "npm package root": "/Users/dli/.nvm/versions/node/v24.13.1/lib/node_modules/@openai/codex",
        "running package root": "/Users/dli/Library/pnpm/store/v11/links/@openai/codex/0.137.0/2ce4c026fd5e267b675a633ec56b4900b6b6bd7573d45347022d68733b16c1f4/node_modules/@openai/codex"
      },
      "remediation": "Fix PATH or npm prefix so the running package root (/Users/dli/Library/pnpm/store/v11/links/@openai/codex/0.137.0/2ce4c026fd5e267b675a633ec56b4900b6b6bd7573d45347022d68733b16c1f4/node_modules/@openai/codex) matches the npm global package root (/Users/dli/.nvm/versions/node/v24.13.1/lib/node_modules/@openai/codex).",
      "durationMs": 154
    },
    "mcp.config": {
      "id": "mcp.config",
      "category": "mcp",
      "status": "ok",
      "summary": "MCP configuration is locally consistent",
      "details": {
        "configured servers": "1",
        "disabled servers": "0",
        "stdio servers": "1"
      },
      "remediation": null,
      "durationMs": 0
    },
    "network.env": {
      "id": "network.env",
      "category": "network",
      "status": "ok",
      "summary": "network-related environment looks readable",
      "details": {
        "proxy env vars": "none"
      },
      "remediation": null,
      "durationMs": 0
    },
    "network.provider_reachability": {
      "id": "network.provider_reachability",
      "category": "reachability",
      "status": "ok",
      "summary": "active provider endpoints are reachable over HTTP",
      "details": {
        "openai API base URL": "https://api.openai.com/v1 reachable (HTTP 404)",
        "openai API route probe": "https://api.openai.com/v1/<redacted> route exists (HTTP 401)",
        "reachability mode": "API key auth"
      },
      "remediation": null,
      "durationMs": 442
    },
    "network.websocket_reachability": {
      "id": "network.websocket_reachability",
      "category": "websocket",
      "status": "ok",
      "summary": "Responses WebSocket handshake succeeded",
      "details": {
        "DNS": "2 IPv4, 2 IPv6, first IPv4",
        "auth mode": "chatgpt",
        "connect timeout": "15000 ms",
        "endpoint": "wss://chatgpt.com/backend-api/<redacted>",
        "handshake result": "HTTP 101 Switching Protocols",
        "model provider": "openai",
        "models etag present": "true",
        "provider name": "OpenAI",
        "proxy env vars": "none",
        "reasoning header": "false",
        "server model present": "false",
        "supports websockets": "true",
        "wire API": "responses"
      },
      "remediation": null,
      "durationMs": 702
    },
    "runtime.provenance": {
      "id": "runtime.provenance",
      "category": "runtime",
      "status": "ok",
      "summary": "running npm on macos-aarch64",
      "details": {
        "commit": "unknown",
        "current executable": "/Users/dli/Library/pnpm/store/v11/links/@openai/codex/0.137.0-darwin-arm64/eb4fa343fe2e01d7d573ce0f6423cd377af2d3d18774b34a2f4b9a0699546d42/node_modules/@openai/codex/vendor/aarch64-apple-darwin/bin/codex",
        "install method": "npm (package /Users/dli/Library/pnpm/store/v11/links/@openai/codex/0.137.0-darwin-arm64/eb4fa343fe2e01d7d573ce0f6423cd377af2d3d18774b34a2f4b9a0699546d42/node_modules/@openai/codex/vendor/aarch64-apple-darwin, bin /Users/dli/Library/pnpm/store/v11/links/@openai/codex/0.137.0-darwin-arm64/eb4fa343fe2e01d7d573ce0f6423cd377af2d3d18774b34a2f4b9a0699546d42/node_modules/@openai/codex/vendor/aarch64-apple-darwin/bin, resources /Users/dli/Library/pnpm/store/v11/links/@openai/codex/0.137.0-darwin-arm64/eb4fa343fe2e01d7d573ce0f6423cd377af2d3d18774b34a2f4b9a0699546d42/node_modules/@openai/codex/vendor/aarch64-apple-darwin/codex-resources, path /Users/dli/Library/pnpm/store/v11/links/@openai/codex/0.137.0-darwin-arm64/eb4fa343fe2e01d7d573ce0f6423cd377af2d3d18774b34a2f4b9a0699546d42/node_modules/@openai/codex/vendor/aarch64-apple-darwin/codex-path)",
        "platform": "macos-aarch64",
        "version": "0.137.0"
      },
      "remediation": null,
      "durationMs": 0
    },
    "runtime.search": {
      "id": "runtime.search",
      "category": "search",
      "status": "ok",
      "summary": "search is OK (bundled)",
      "details": {
        "search command": "/Users/dli/Library/pnpm/store/v11/links/@openai/codex/0.137.0-darwin-arm64/eb4fa343fe2e01d7d573ce0f6423cd377af2d3d18774b34a2f4b9a0699546d42/node_modules/@openai/codex/vendor/aarch64-apple-darwin/codex-path/rg",
        "search command readiness": "file exists",
        "search provider": "bundled"
      },
      "remediation": null,
      "durationMs": 0
    },
    "sandbox.helpers": {
      "id": "sandbox.helpers",
      "category": "sandbox",
      "status": "ok",
      "summary": "sandbox configuration is readable",
      "details": {
        "approval policy": "Never",
        "codex-linux-sandbox helper": "none",
        "execve wrapper helper": "/Users/dli/.codex/tmp/arg0/codex-arg0O9aLJR/codex-execve-wrapper",
        "filesystem sandbox": "unrestricted",
        "network sandbox": "enabled"
      },
      "remediation": null,
      "durationMs": 0
    },
    "state.paths": {
      "id": "state.paths",
      "category": "state",
      "status": "ok",
      "summary": "state paths and databases are inspectable",
      "details": {
        "CODEX_HOME": "/Users/dli/.codex (dir)",
        "active rollout files": "1414 files, 896052207 total bytes, 633700 average bytes",
        "archived rollout files": "49 files, 16191491 total bytes, 330438 average bytes",
        "goals DB": "/Users/dli/.codex/goals_1.sqlite (file)",
        "goals DB integrity": "ok",
        "log DB": "/Users/dli/.codex/logs_2.sqlite (file)",
        "log DB integrity": "ok",
        "log dir": "/Users/dli/.codex/log (dir)",
        "memories DB": "/Users/dli/.codex/memories_1.sqlite (file)",
        "memories DB integrity": "ok",
        "sqlite home": "/Users/dli/.codex (dir)",
        "state DB": "/Users/dli/.codex/state_5.sqlite (file)",
        "state DB integrity": "ok"
      },
      "remediation": null,
      "durationMs": 15067
    },
    "state.rollout_db_parity": {
      "id": "state.rollout_db_parity",
      "category": "threads",
      "status": "warning",
      "summary": "rollout files and state DB thread inventory differ",
      "details": {
        "default model provider": "openai",
        "rollout DB active files": "1414",
        "rollout DB active rows": "1607",
        "rollout DB archive mismatches": "0",
        "rollout DB archived files": "49",
        "rollout DB archived rows": "72",
        "rollout DB duplicate DB paths": "0",
        "rollout DB duplicate rollout thread ids": "0",
        "rollout DB malformed file names": "0",
        "rollout DB missing active rows": "0",
        "rollout DB missing archived rows": "0",
        "rollout DB model providers": "openai=1628, azure=51",
        "rollout DB rows": "1679",
        "rollout DB scan cap reached": "false",
        "rollout DB scan errors": "0",
        "rollout DB sources": "cli=1108, subagent:review=563, vscode=8",
        "rollout DB stale row sample": [
          "/Users/dli/.codex/archived_sessions/rollout-2026-02-12T11-48-59-019c5366-4c32-7150-b86f-8fc801014552.jsonl",
          "/Users/dli/.codex/archived_sessions/rollout-2026-02-12T11-50-45-019c5367-eaea-7a60-9ed2-9e528804e8a2.jsonl",
          "/Users/dli/.codex/archived_sessions/rollout-2026-02-13T09-32-52-019c5810-0b96-7eb0-87b2-041f82750fc1.jsonl",
          "/Users/dli/.codex/archived_sessions/rollout-2026-02-13T09-36-32-019c5813-6552-7243-83b6-c43cfa50a2d7.jsonl",
          "/Users/dli/.codex/archived_sessions/rollout-2026-02-13T09-53-40-019c5823-16dd-71a3-8a3b-663e355a355d.jsonl"
        ],
        "rollout DB stale rows": "216"
      },
      "issues": [
        {
          "severity": "warning",
          "cause": "state DB rows point at missing or unusable rollout files",
          "measured": "216 stale rows",
          "expected": "every state DB rollout path is a file on disk",
          "remedy": null,
          "fields": []
        }
      ],
      "remediation": null,
      "durationMs": 4943
    },
    "system.environment": {
      "id": "system.environment",
      "category": "system",
      "status": "ok",
      "summary": "OS language en-US",
      "details": {
        "LANG": "en_US.UTF-8",
        "os": "Mac OS 26.5.1 [64-bit]",
        "os language": "en-US",
        "os type": "Mac OS",
        "os version": "26.5.1"
      },
      "remediation": null,
      "durationMs": 12
    },
    "terminal.env": {
      "id": "terminal.env",
      "category": "terminal",
      "status": "ok",
      "summary": "terminal metadata was detected",
      "details": {
        "COLORTERM": "truecolor",
        "TERMINFO": "/Applications/Ghostty.app/Contents/Resources/terminfo (dir)",
        "TERM_PROGRAM": "ghostty",
        "color output": "enabled",
        "effective locale": "en_US.UTF-8",
        "stderr is terminal": "true",
        "stdin is terminal": "true",
        "stdout is terminal": "true",
        "terminal": "Ghostty",
        "terminal size": "150x33",
        "terminal version": "1.3.1"
      },
      "remediation": null,
      "durationMs": 0
    },
    "terminal.title": {
      "id": "terminal.title",
      "category": "title",
      "status": "ok",
      "summary": "terminal title default",
      "details": {
        "terminal title activity": "true",
        "terminal title items": "activity, project-name",
        "terminal title project source": "git repo root",
        "terminal title project value": "asim3",
        "terminal title source": "default"
      },
      "remediation": null,
      "durationMs": 0
    },
    "updates.status": {
      "id": "updates.status",
      "category": "updates",
      "status": "fail",
      "summary": "update would target a different npm install",
      "details": {
        "cached latest version": "0.137.0",
        "check for update on startup": "true",
        "last checked at": "2026-06-08T03:25:14.197140Z",
        "latest version probe": "curl: (56) The requested URL returned error: 403",
        "npm package root": "/Users/dli/.nvm/versions/node/v24.13.1/lib/node_modules/@openai/codex",
        "running package root": "/Users/dli/Library/pnpm/store/v11/links/@openai/codex/0.137.0/2ce4c026fd5e267b675a633ec56b4900b6b6bd7573d45347022d68733b16c1f4/node_modules/@openai/codex",
        "update action": "npm install -g @openai/codex",
        "version cache": "/Users/dli/.codex/version.json"
      },
      "remediation": "Fix PATH or npm prefix so the running package root (/Users/dli/Library/pnpm/store/v11/links/@openai/codex/0.137.0/2ce4c026fd5e267b675a633ec56b4900b6b6bd7573d45347022d68733b16c1f4/node_modules/@openai/codex) matches the npm global package root (/Users/dli/.nvm/versions/node/v24.13.1/lib/node_modules/@openai/codex).",
      "durationMs": 236
    }
  }
}

What issue are you seeing?

On a repo where the default/main branch is called trunk, as opposed to master or main, the /review command does not auto-select it.

What steps can reproduce the bug?

Use the cli /review, hit enter to select option 1., see that trunk is not the default selection.

What is the expected behavior?

Ideally, the /review command auto-selects trunk when it is the default git branch, so the workflow of /review -> enter -> enter will do a review comparing the current branch to trunk, similar to how it works if the default branch is master or main.

Additional information

_No response_

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗