CommandCodeAI / CommandCodeAI/command-code

Background shell tasks return empty logs; provider errors (too_many_images, timeouts) and subagent failures stall long coding sessions

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

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

Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
4k
Fork
350
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Long coding session crippled by tooling failures: empty background-task output, provider errors, lost subagent reports

Environment

  • Windows 11, Command Code CLI (npm, v1.39.x line at the time)
  • Large Android/Gradle project; long-running builds (1–5 min per gradle invocation)
  • One long single-session refactor task (~15 files edited + verification builds + CI screenshot step)

Summary

A large but well-scoped coding task stretched for hours almost entirely because of harness/infra failures, not task complexity. Four classes of failure, each reproducible within the session:

1. Background shell commands return empty output logs (most damaging)
  • shell_command with run_in_background=true running gradlew ... > file.log 2>&1 or piped through | powershell ... produced 0-byte output logs for 20–60+ minutes while gradle had actually failed in 40 seconds.
  • Exit status was never surfaced; the log stayed empty; the only way to learn the real failure was to manually read ~/.gradle/daemon/9.5.0/daemon-*.out.log (the daemon's own log contained e: file:///...kt:NN Unresolved reference... compile errors all along).
  • Piping task output through PowerShell (| powershell -Command "$input | Select-Object -Last N") also silently lost everything.
  • Cost: this failure mode alone consumed the majority of the session, with multiple redundant 5–10-minute polling loops staring at empty files.
  • Expected: background tasks should surface real exit codes/stderr (or at minimum, the streamed log should contain the process's output as it appears).
2. Repeated mid-session provider errors, each requiring a manual "continue"
  • Error: 200 Failed to process successful response
  • Error: 500 Cannot connect to API: Connect Timeout Error (172.65.90.20-23:443)
  • Error: 400 Invalid_request_error ... [too_many_images] GLM requests accept at most 8 inline PNG/JPEG/WEBP/GIF ... — a session that reviews screenshots (dev workflow!) becomes unsendable until the user manually compacts. The model can't fix this itself.
3. Subagent runs errored and lost their reports
  • One general subagent returned [sub-agent stopped early: the run errored] after 20 minutes, mid-task (had made real edits already).
  • A separate audit subagent died entirely with its report lost; had to be relaunched from scratch.
  • Expected: partial output preserved on subagent error, or automatic retry.
4. Tool-schema friction
  • search_tools repeatedly returned todo_write schema, but calling it kept failing/looping for several turns before it finally worked.

Trace IDs (from the error banners in one session)

  • 6b481a97ce2ad552cb4802dc72d0b0ef
  • 39a179d53c81ee36fea47ff7f116d066
  • 52c2bcc5f22d1a3815bb7b6a4ce81356
  • ca6c03357b892c7ca6e9042e6ecb6367
  • 2cc56255ce5d8e9aab41e69325ec4e81

Ask

  1. Surface real exit status + stderr of background and piped shell tasks; don't let empty logs masquerade as "still running."
  2. Handle the image budget proactively (auto-compact or drop stale images before the provider hard-fails the whole conversation).
  3. Preserve subagent partial reports when a run errors.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

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.

Hướng nghiên cứu

Bắt đầu từ các điểm vào CLI cho shell_command với run_in_background=true và tái hiện các trường hợp Gradle và PowerShell, so sánh đầu ra đã thu thập với daemon log và trạng thái thoát. Sau đó, lần theo các lỗi image-budget của provider và việc xử lý lỗi của subagent, sử dụng các trace IDs được liệt kê khi có. Hoàn tất khi các lỗi chạy nền hiển thị status và stderr, các giới hạn của provider được xử lý, và các subagent bị lỗi vẫn giữ lại các báo cáo một phần.

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

Đánh giá

Công nghệ
ai-infra-agents, cli
Lĩnh vực
ai, cli, tooling
Loại issue
Lỗi
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
25/100

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.