[Bug]: t3_worktree_handoff drops git's error message ("git worktree add failed")

Đang mở Phù hợp với người mới
#38,935 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

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
73/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, typescript
Lĩnh vực
backend, devtools

Hướng nghiên cứu

Bắt đầu trong khu vực apps/server bằng cách lần theo lời gọi t3_worktree_handoff đến GitVcsDriver.createWorktree, nơi xảy ra lỗi được báo cáo. Kiểm tra cách xử lý lỗi của các lệnh git và stderr, sau đó tái hiện lỗi git worktree add và xác nhận lỗi trả về có chứa thông báo của git, nhánh và đường dẫn.

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

Mô tả

Before submitting
  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.
Area

apps/server

Steps to reproduce
  1. Fill the disk until it has a few hundred MB free (or any other condition that makes git worktree add fail for a reason other than the ones T3 already names).
  2. From a Claude thread on the project root, call t3_worktree_handoff with {"branch": "fix/example", "baseRef": "origin/main", "startFromOrigin": true, "continuationPrompt": "…"}.
Expected behavior

The error carries git's own message and the ref and path T3 used, e.g. git worktree add failed: fatal: … No space left on device (branch fix/example from origin/main), so the agent can act on it.

Actual behavior
{"_tag":"WorktreeMcpFailure","code":"operation_failed","message":"Unable to create the worktree: Git command failed in GitVcsDriver.createWorktree (<project root>): git worktree add failed"}

git's stderr is dropped. In the case above the agent only found the cause (disk 100% full, 356 MB free) by running git worktree add --dry-run and df itself; the identical handoff call succeeded later once space was freed.

In my usage over one week this generic error came up 3 times in 3 sessions, with different underlying causes. The cases T3 already recognises are clear (e.g. Branch '…' already exists and is checked out at '…'), so this is about the fallback path.

Impact

Minor bug or occasional failure

Version or commit

0.1.10 (desktop); also seen on the build before it

Environment

macOS 27.2 arm64, Claude Code 2.1.327 provider

Logs or stack traces

See "Actual behavior".

Workaround

Run git worktree add --dry-run by hand to see git's message.

Related: #38027, where a missing ref was reported as a different error and the error text didn't name the ref.

Ngôn ngữ chính
TypeScript
Star
24.8k
Fork
6.4k
Merge trung bình
4 giờ 46 phút
Pull request đã merge (30 ngày)
488

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

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

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 pingdotgg/t3code

Tất cả issue của pingdotgg/t3code

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.