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

Aperta
#7,853 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
38/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
backend

Direzione di ricerca

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.

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

Descrizione

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

Lingua principale
TypeScript
Stelle
2.1k
Fork
139
Merge medio
3h 35m
PR unite (30g)
950

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

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

Tutte le issue di coder/xum

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.