[Bug] Main agent reverted from DeepSeek to Kimi-K3 mid-task, causing unintended charges
@aliarain đang làm issue này rồi.
Từ ngày 9/8/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Summary
A long-running desktop task unexpectedly reverted from DeepSeek to moonshotai/Kimi-K3 for the main agent loop. The visible interaction produced three Kimi-K3 inference calls with roughly 706k–734k input tokens each, resulting in $12.159 of unintended charges.
This is distinct from #326: these were not background title-generation or taste-learning calls. Kimi generated the main assistant response, invoked todo_write, processed its result, invoked shell_command, processed that result, and generated the final response.
Expected behavior
After selecting DeepSeek for the task, subsequent main-agent requests should continue using the selected/resolved DeepSeek model unless I explicitly change it.
The documented model-resolution behavior says an explicit in-session model selection applies to subsequent outgoing requests and that a resumed conversation adopts its saved model.
Actual behavior
At 2026-08-07 15:35:28 MYT, the user message:
Oh, then how come the Todos are still there?
started a three-turn main-agent/tool loop using moonshotai/Kimi-K3:
| Local time | Main-agent action | Input tokens | Output tokens | Dashboard cost |
|---|---|---|---|---|
| 15:35:28 | Responded and invoked todo_write |
706,501 | 568 | $5.67 |
| 15:36:56 | Processed tool result and invoked shell_command |
733,152 | 313 | $5.88 |
| 15:37:27 | Processed verification and produced final response | 733,978 | 348 | $0.609 |
The last turn reported 732,928 cache-read tokens. Total unexpected Kimi cost shown by the dashboard: $12.159.
Local transcript evidence
Task/session ID:
abe_tmr6jN-UORYdoZ5NZ
The on-disk JSONL records each assistant turn's actual model and usage. The relevant records identify all three assistant turns as:
model: moonshotai/Kimi-K3
The model history in this same task was:
2026-08-06 12:19 MYT moonshotai/Kimi-K3
2026-08-06 13:58 MYT Qwen/Qwen3.8-Max
2026-08-06 18:32 MYT xai/grok-4.5
2026-08-07 08:12 MYT deepseek/deepseek-v4-flash
2026-08-07 12:08 MYT deepseek/deepseek-v4-pro
2026-08-07 15:35 MYT moonshotai/Kimi-K3 <-- unexpected reversion
The immediately preceding main-agent turns, through 14:36 MYT, used deepseek/deepseek-v4-pro. Earlier in the same task I had explicitly requested DeepSeek V4 Flash and the agent twice queried the model config and confirmed deepseek/deepseek-v4-flash.
After the incident, the desktop state file showed both the global selection and this task's saved model as deepseek/deepseek-v4-flash.
Checks performed
- No personal or project custom-agent files existed.
- No agent/subagent tool was invoked during the incident.
- No
model: moonshotai/Kimi-K3pin was found in Command Code agent/config files. - The Kimi calls are present in the main task transcript, causally connected to the user's message and the returned tool results.
- The desktop process had been running continuously since 08:11 MYT; there was no app restart immediately before the 15:35 incident.
- A separate
taste-1learning call appears afterward in billing, but it is separate from these Kimi main-agent calls.
This suggests a desktop/session/backend model-state desynchronization or erroneous restoration of the task's original model.
Environment
- Command Code Desktop:
0.1.8 - Bundled
command-code:1.14.0 - OS: macOS (Apple Silicon)
- Task entrypoint: interactive desktop
- Provider: Command Code
- Context size at incident: approximately 706k–734k input tokens
Billing trace prefixes
a8bb9698...
b3b111c0...
223f5d34...
I can provide the complete local transcript or additional screenshots privately, but have not attached the full JSONL publicly because it contains private project and tool-call data.
Requested investigation
- Determine why the main task reverted to its original Kimi-K3 model after later DeepSeek selections.
- Confirm whether the desktop UI/task model and backend execution model can become desynchronized.
- Add the resolved model ID to request-visible diagnostics before submission.
- Consider a warning/confirmation when a task with a very large context changes to a materially more expensive model.
- 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
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
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của CommandCodeAI/command-code
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
CommandCodeAI/command-code#855 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
CommandCodeAI/command-code#841 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
CommandCodeAI/command-code#655 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
CommandCodeAI/command-code#608 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 70/100
CommandCodeAI/command-code#893 ·