fix: isolate codex home in worktrees

This commit is contained in:
Dotta
2026-03-13 11:53:56 -05:00
parent d51c4b1a4c
commit 528505a04a
7 changed files with 496 additions and 8 deletions

View File

@@ -30,6 +30,8 @@ Codex uses `previous_response_id` for session continuity. The adapter serializes
The adapter symlinks Paperclip skills into the global Codex skills directory (`~/.codex/skills`). Existing user skills are not overwritten.
When Paperclip is running inside a managed worktree instance (`PAPERCLIP_IN_WORKTREE=true`), the adapter instead uses a worktree-isolated `CODEX_HOME` under the Paperclip instance so Codex skills, sessions, logs, and other runtime state do not leak across checkouts. It seeds that isolated home from the user's main Codex home for shared auth/config continuity.
For manual local CLI usage outside heartbeat runs (for example running as `codexcoder` directly), use:
```sh