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

Đang mở
#4,835 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@garrytan đang làm issue này rồi.

Từ ngày 26/11/2026.

  • #4850 của @garrytan — đang mở

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
67/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
git, shell, typescript
Lĩnh vực
cli, devtools

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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*.

Ngôn ngữ chính
TypeScript
Star
143k
Fork
21k
Merge trung bình
7 giờ 19 phút
Pull request đã merge (30 ngày)
781

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của garrytan/gstack

Tất cả issue của garrytan/gstack

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.