fix(external-agents): Codex write runs in a linked worktree cannot stage or commit

Aperta
#19,070 6 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
git, python, shell

Direzione di ricerca

Start with the plugins/external-agents/ command and Codex adapter, then trace how write runs set --add-dir and classify refusals as blocked-by-mode. Check how Git reports the linked worktree git directory and where uv's cache path is configured. Done means a test or recorded run shows a linked worktree can stage and commit, and cache write refusals no longer misreport a completed run.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Context

During the #19004 build, every external-agents run codex --use task --mode write --add-dir <worktree> run (4 of 4) was recorded blocked-by-mode. Codex's workspace-write sandbox mounted the linked worktree's git metadata read-only, so git add failed with exit 128 (index.lock could not be created), and uvx with the default cache was refused. The edits themselves landed each time, so the orchestrator had to verify, stage and commit every change by hand, and the run status misreported finished work as blocked.

A linked worktree keeps its index under the main checkout's .git/worktrees/<name>/, which is outside the --add-dir path.

Proposed work
  • On a write run whose --add-dir (or cwd) is a linked git worktree, also pass that worktree's git dir (git -C <wt> rev-parse --git-dir, plus the common dir's object store if commits need it) as a writable directory, or document that write runs leave staging and commits to the caller.
  • Give the run a writable uv/pip cache path, or document the expected UV_CACHE_DIR.
Acceptance criteria
  • A Codex write run in a linked worktree can git add and git commit, shown by a test or a recorded live run.
  • A run whose only refusals were cache writes it worked around is not reported as blocked-by-mode, or the docs say why it is.
References
Lingua principale
Shell
Stelle
22
Fork
2
Merge medio
2h
PR unite (30g)
960

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di melodic-software/claude-code-plugins

Tutte le issue di melodic-software/claude-code-plugins

Issue simili

Altre issue su Shell/Bash

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.