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

Resolved 💬 1 comment Opened Apr 3, 2026 by stprocker Closed Apr 19, 2026

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/:

``bash
git worktree add /tmp/codex-worktree-test -b test-branch
``

  1. Launch Codex from that worktree:

``bash
cd /tmp/codex-worktree-test
codex --yolo
``

  1. 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.

View original on GitHub ↗

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