Skip to content

Panic: plugin cache root resolution fails when running in a git worktree #16637

@stprocker

Description

@stprocker

Summary

Codex CLI panics on startup when launched from a git worktree under /tmp/. The error message is:

The application panicked (crashed).
Message:  plugin cache root should be absolute: No such file or directory (os error 2)

Reproduction

  1. Have plugins enabled in ~/.codex/config.toml (any openai-curated plugin)
  2. Create a git worktree in /tmp/:
    git worktree add /tmp/codex-worktree-test -b test-branch
  3. Launch Codex from that worktree:
    cd /tmp/codex-worktree-test
    codex --yolo
  4. Codex panics immediately after the SessionStart hook completes.

Expected behavior

Codex should resolve its plugin cache root to ~/.codex/plugins/cache/ (absolute) regardless of the current working directory.

Actual behavior

The plugin cache root is resolved relative to CWD. When CWD is a worktree under /tmp/, the path doesn't exist and Codex panics. On macOS, /tmp is a symlink to /private/tmp, which may compound the issue.

Environment

  • Codex CLI version: 0.118.0
  • OS: macOS 15.5 (Darwin 25.4.0), Apple Silicon
  • Enabled plugins: google-calendar, gmail, canva, github, google-drive (all openai-curated)
  • Plugin cache location: ~/.codex/plugins/cache/openai-curated/ (exists and populated)

Context

This blocks using Codex in isolated worktree workflows (e.g., Claude Code's Codex plugin dispatching work to a temp worktree). The workaround is disabling all plugins before running in a worktree, but that shouldn't be necessary.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingregressionBehaviors that worked in previous versions but were broken due to an updateskillsIssues related to skills

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions