Skip to content

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

Closed

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.

Activity

  1. added
    bug
    CLI
    skills
    on Apr 3, 2026
  2. github-actions commented on Apr 3, 2026

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

  3. added
    regression
    and removed
    CLI
    on Apr 3, 2026
  4. added a commit that references this issue on Apr 19, 2026
    e3f44ca
  5. added a commit that references this issue on May 7, 2026
    8862647
  6. added a commit that references this issue on Jun 27, 2026
    c2cd6ff
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

    bugregressionskills

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions