🤖 perf: sub-agent spawn follow-ups after #7851

Đang mở
#7,853 1 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ó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
38/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
backend

Hướng nghiên cứu

Start with the n loop in src/node/services/tools/task.ts and createWorkspaceTurn in workspaceTurnManager.ts, then trace the locking and stop-state follow-ups described here. Re-run the live-server profile after the server includes #7840, #7845, and #7851. Done means addressing a defined follow-up and verifying its behavior; the issue lists several distinct areas without selecting one.

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

Mô tả

Summary

#7851 lets a child's slow first-send preparation run after TaskService.create releases its mutex and tree lock. Spawns in different trees no longer wait host-wide: in a live rig with a 2 s first send, the last of 4 parents got its task result at 2,464 ms instead of 8,868 ms (median of 6 rounds, p = 0.0039). Reviews and verifiers accepted these follow-ups.

Follow-ups

  1. One parent's task(n: 4) and parallel non-explore task calls stay serial. The n loop in src/node/services/tools/task.ts (around lines 694-699) awaits each create. withSequentialExecution serializes parallel task calls unless they are explore with fork isolation. The live rig shows no change for these cases (about 8.9 s for 4 children on both builds). This is now the largest remaining spawn limiter for one parent.
  2. createWorkspaceTurn (kind: "workspace") still holds the mutex through its own send (workspaceTurnManager.ts, around line 1360).
  3. Locked steps still run one at a time. The fork plus config write takes about 63-87 ms per spawn under the mutex (166-177 ms with fork isolation). Pre-admission send hooks and history I/O also hold both locks until the session admits the brief, with no total deadline. Base had the same lack of a deadline.
  4. Ancestor Stop after the brief started preparing. create can report running for a row that the Stop already marked interrupted. That Stop stops the parent's stream first, so impact is low.
  5. A child stopped during its first send stays running, and the parent is told running. This predates #7851.
  6. Re-run the live-server profile once the live server runs a build with #7840, #7845 and #7851.

Evidence (local): verifier reports D1-D4 for #7851.


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high • Cost: $78.84

Ngôn ngữ chính
TypeScript
Star
2.1k
Fork
139
Merge trung bình
3 giờ 35 phút
Pull request đã merge (30 ngày)
950

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

  • Có Dockerfile hoặc tệp Docker Compose
  • Không có mẫu pull request
  • Không có hướng dẫn đóng góp

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 coder/xum

Tất cả issue của coder/xum

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.