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

Aberta
#19,070 6 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
55/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
git, python, shell

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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
Linguagem predominante
Shell
Estrelas
22
Forks
2
Merge médio
2h
PRs com merge (30d)
960

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de melodic-software/claude-code-plugins

Todas as issues de melodic-software/claude-code-plugins

Issues semelhantes

Mais issues de Shell/Bash

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.