Files
solution-erp/.claude/auto-memory/feedback_background_spawn_visibility.md
pqhuy1987 23bbe97f39
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 5m26s
[CLAUDE] Docs: S124 adap-wave AI_INFRA + owner worker-tier-pin (14 agent opus+effort:max) + user-memory relocate R6 + H24 dogfood
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-15 23:17:45 +07:00

1.8 KiB
Raw Blame History

name, description, metadata
name description metadata
feedback-background-spawn-visibility Long sub-agent / command spawned in FOREGROUND streams no progress — "looks frozen" to anh main. Push to background + report immediately for live visibility.
node_type type originSessionId revision
memory feedback solution-erp-s45 repopulated S46 (2026-06-01) — original S45 write produced 0 bytes

S45 (2026-06-01): Spawn 🟪 test-specialist (viết +27 test rồi chạy — nhiều phút) ở foreground → suốt lúc chạy KHÔNG có output nào hiện → anh main thấy "looks frozen" (tưởng treo). Agent thực ra vẫn chạy bình thường; foreground chỉ block + im lặng đến khi return.

Why: Foreground spawn (Agent blocking, hoặc Bash không run_in_background) KHÔNG stream tiến độ trong harness này. Task dài (test-gen + chạy, heavy scaffold, dotnet test full, npm build ×2, agent multi-step) làm UI đứng im → anh main không phân biệt được "đang chạy" vs "treo thật" → mất visibility, dễ interrupt nhầm hoặc mất tin tưởng.

How to apply:

  • Sub-agent / command chạy DÀI (>~30s) → đẩy background (run_in_background: true) thay vì foreground block. Harness auto-notify khi xong → KHÔNG poll/sleep.
  • Report NGAY lúc vừa spawn: 1 dòng "đã spawn X ở background, đang chạy Y, báo khi xong" → anh main có signal sống.
  • Foreground chỉ cho task NGẮN (<30s) hoặc khi cần kết quả ngay để quyết bước kế.
  • S45 còn kèm gotcha #53 (test-specialist return truncated) → background spawn + em main verify-on-disk + proxy MEMORY là combo xử lý.

Related: feedback-implementer-truncation-mitigation feedback-high-to-max-multiagent-quality feedback-7agent-split-upgrade