CommandCodeAI / CommandCodeAI/command-code

CLI hangs after completed generation run; usage shows completed but no assistant response

Đang mở
#466 3 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ả

Summary

Command Code CLI sends requests successfully and the usage dashboard shows completed runs/token usage, but the CLI never displays or saves the assistant response. The request appears to hang indefinitely in both Windows PowerShell and WSL.

Environment

  • Command Code CLI: 0.32.3
  • Account shown by commandcode status: rikitikitavi2012-debug
  • Windows: PowerShell, installed via npm global wrapper in C:\Users\User\AppData\Roaming\npm
  • WSL: Ubuntu 24.04 on WSL2
  • Node tested:
    • Windows Node from C:\Program Files\nodejs\node.exe
    • WSL Node v24.12.0
    • WSL Node v22.22.1

Proxy setup

The issue reproduces with the normal proxy setup used on this machine:

  • Windows:
    • SOCKS tunnel: ssh -D 1080 ...
    • HTTP bridge: http-proxy-to-socks listening on 127.0.0.1:8001
    • CLI tested with:
      • HTTP_PROXY=http://127.0.0.1:8001
      • HTTPS_PROXY=http://127.0.0.1:8001
  • WSL:
    • HTTP_PROXY=http://127.0.0.1:8118
    • HTTPS_PROXY=http://127.0.0.1:8118
    • privoxy forwards to SOCKS5 127.0.0.1:1080

What works

These commands work in both Windows and WSL:

commandcode status
commandcode --list-models
commandcode info

The dashboard also shows completed runs and consumed credits/tokens after attempted prompts. Example from the dashboard:

  • Status: COMPLETED
  • Model: moonshotai/Kimi-K2.5
  • Mode: agent
  • Input/output tokens are counted
  • Cost is consumed

Manual unauthenticated POST checks through the proxy also reach the API and return the expected 401 response:

curl -X POST https://api.commandcode.ai/alpha/generate \
  -H 'content-type: application/json' \
  --data '{}'

Response:

{"success":false,"error":{"code":"UNAUTHORIZED","status":401,"message":"Invalid 'Authorization' header or token."}}

What fails

Generation hangs and produces no visible output:

commandcode -p --model moonshotai/Kimi-K2.5 "Reply with exactly the word TEST"

Also reproduced with:

commandcode --model moonshotai/Kimi-K2.5

Then sending a first message such as:

привет

The UI shows a running state such as reviewing/mapping/ruminating, but no assistant response appears.

Local history result

After a failed interactive prompt, local Command Code history contains only the user message and no assistant message.

Windows example:

C:\Users\User\.commandcode\projects\c-users-user\417de20a-54a8-410f-9cc1-595140c811fc.jsonl

Contains:

{"role":"user","content":[{"type":"text","text":"привет"}]}

No role: "assistant" entry appears.

WSL showed the same behavior in ~/.commandcode/projects/.../*.jsonl.

Expected behavior

If the dashboard shows the run as completed, the CLI should display the assistant response and save it to local history.

Actual behavior

The backend appears to complete the run, but the CLI never receives/displays/saves the final assistant response.

Notes

This does not look like a simple auth/account/model issue because status, --list-models, and the usage dashboard all work. It looks like either a CLI streaming/response handling bug or an incompatibility with the proxy chain used for long-running generation responses.

Please advise how to debug the streaming response path or whether there is a known issue/workaround for proxied environments.

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 với các điểm truy cập tạo sinh được thực thi bởi commandcode -pcommandcode --model tương tác, sau đó so sánh cách xử lý phản hồi dạng streaming của chúng trong các thiết lập HTTP proxy được ghi trong tài liệu. Tái hiện bằng prompt Reply with exactly the word TEST và kiểm tra các tệp lịch sử JSONL. Được xem là hoàn tất khi một lần chạy dashboard đã hoàn thành hiển thị phản hồi của assistant và ghi một mục assistant vào máy cục bộ.

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

Đánh giá

Công nghệ
node.js
Lĩnh vực
cli, networking
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
35/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.