setup: --refresh-registered reinstalls Codex globally from the checkout's own .agents render

Aperta
#4,835 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
67/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
git, shell, typescript
Ambito
cli, devtools

Direzione di ricerca

Start with bin/gstack-install-registry.sh, especially gstack_install_known_roots around lines 263–267, and trace how it handles the source checkout as the project root during ./setup --refresh-registered. Reproduce the reported setup with codex in .gstack-installed-hosts and a Claude install row. Done when refresh no longer creates a Codex global install from the checkout’s .agents render.

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

Descrizione

Every upgrade puts gstack back into ~/.codex/skills, even when ~/.gstack/installs.tsv has only a claude row. Deleting ~/.codex/skills/gstack doesn't stick, because the next upgrade brings it back.

Setup: global Claude install at ~/.claude/skills/gstack, with ./setup --host codex run once months ago, so .gstack-installed-hosts still lists codex.

The loop:

  1. With codex in .gstack-installed-hosts, setup renders .agents/skills/ inside the checkout, the .agents/skills/gstack sidecar included.
  2. The upgrade runs cd "$ROOT" && ./setup --refresh-registered. gstack_install_known_roots takes git rev-parse --show-toplevel as the project, which here is the checkout itself, and emits codex project <checkout>/.agents/skills/gstack. _gstack_install_source resolves that sidecar to the checkout, so the refresh adds it as a pre-registry Codex install.
  3. The refresh child gets --host codex without --global (only global rows get it). The checkout lives in ~/.claude/skills, so CODEX_REPO_LOCAL stays 0 and it installs into ~/.codex/skills, writes a codex global row and adds codex back to .gstack-installed-hosts.

Result on 1.103.1.0: codex experimental global installed in the summary of every upgrade. Still the same on main (959df8c), bin/gstack-install-registry.sh:263-267.

Suggestion: skip the project rows in gstack_install_known_roots when the toplevel is the source checkout, since its .agents/ is a render, not an install.

Workaround: rm -r <checkout>/.agents, drop codex from .gstack-installed-hosts and installs.tsv, remove ~/.codex/skills/gstack*.

Lingua principale
TypeScript
Stelle
143k
Fork
21k
Merge medio
7h 19m
PR unite (30g)
781

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 garrytan/gstack

Tutte le issue di garrytan/gstack

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.