Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

work-items: preflight credits the main checkout's settings.local.json to worktrees on Windows, where approvals stay per worktree

Abierto
#7,290 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
72/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
shell
Área
tooling

Línea de trabajo

Read plugins/work-items/skills/work/scripts/preflight.sh and its collect() function, then compare the platform-specific settings behavior described in the issue with Cases 16 and 16b in plugins/work-items/skills/work/scripts/preflight.test.sh. Add a Windows-layout test alongside those cases and update the preflight behavior to match it. Done means the main settings file is not credited for a Windows worktree and the worktree's own local settings are considered.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

priority: low

Summary

The work-items preflight credits the main checkout's .claude/settings.local.json to every linked worktree. The live docs say approvals are shared that way only where Claude Code uses the repository root; on Windows and the other layouts where it does not, an approval stays with the worktree it was granted in. On those layouts the preflight reports a grant as covered that the worktree session will not have, so an unattended lane can hit a permission prompt the preflight said was covered.

Affected area / component

plugins/work-items/skills/work/scripts/preflight.sh (collect()), plugins/work-items/skills/work/scripts/preflight.test.sh

Steps to reproduce

  1. On Windows, put Bash(gh pr create *) in the main checkout's .claude/settings.local.json only.
  2. Run the preflight for a linked worktree (--worktree-root <worktree>).
  3. The preflight reports no gap for gh pr create.
  4. Start a session in that worktree and run gh pr create: it prompts.

(Steps 1-3 match the existing test "Case 16" at preflight.test.sh:303; step 4 follows from the docs and was not run.)

Expected behavior

On Windows and other layouts where Claude Code does not use the repository root, the preflight reads the worktree's own settings.local.json and does not credit the main checkout's.

Actual behavior

  • preflight.sh:24-31 and :143-146: since Claude Code v2.1.211, "don't ask again" approvals "save here (resolved through worktrees to the main checkout) and apply in every worktree of the repository, so this file is read in every mode". collect() at :343 reads it unconditionally on every platform.
  • preflight.test.sh:303-322 ("Case 16") asserts the main checkout's grant covers a worktree run; :324 ("Case 16b") asserts a worktree's own local file is excluded.
  • Live docs (read 2026-10-12):

Suggested fix

Branch on the layout: on Windows and the other non-repository-root cases listed at https://code.claude.com/docs/en/settings#where-claude-code-keeps-the-local-file-in-a-git-repository (outside a git repository, a home-directory repository root, Windows, or a root not owned by the user), read the worktree's own settings.local.json instead of the main checkout's. Add a Windows-layout case beside Case 16 and invert Case 16b for that layout.

Environment

Windows; work-items on main as of 2026-10-12.

Found during the upstream-pointer sweep (PRs #7061-#7274).

Lenguaje dominante
Shell
Estrellas
22
Forks
2
Merge medio
7 h 42 min
PR fusionados (30 d)
923

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de melodic-software/claude-code-plugins

Todos los issues de melodic-software/claude-code-plugins

Issues similares

Más issues de Shell/Bash

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.