Describe the bug
After --resume, earlier assistant messages are sent without their reasoning. With kimi-k3 (first-party, /chat/completions, not BYOK), a live session sends each assistant message's reasoning_text back on later requests. After resume, the same messages are sent without it. The same message across requests:
before resume: {"role": "assistant", "reasoning_text": "Let me run the test and look at stats.py.", "tool_calls": [...]}
after resume: {"role": "assistant", "tool_calls": [...]}
The reasoning is still in the session's events.jsonl (reasoningText), so it is removed when the session is loaded, not lost when saved. Setting COPILOT_STRIP_REASONING_ON_RESUME=false keeps it.
Kimi K3 is trained with its reasoning preserved across turns, so after a resume it sees every earlier turn with empty reasoning. In our tests, K3 produced no reasoning on any request after a resume.
Separately, on the first request after resume, earlier tool_calls[].function.arguments are re-serialized compactly ({"command": "…"} becomes {"command":"…"}). That breaks prompt caching at the first assistant message.
Affected version
1.0.90-5
Steps to reproduce the behavior
- Run
copilot -p "..." --model kimi-k3 --reasoning-effort high --allow-all-tools --no-ask-user --log-level all --log-dir logs1 with a prompt that produces a few tool calls
- Run
copilot --resume=<session-id> -p "..." with the same flags and --log-dir logs2
- Compare the
Wire request: bodies: in logs1, assistant messages carry reasoning_text; in the first request in logs2, the same messages have none
Expected behavior
A resumed session sends the same assistant history, including reasoning_text, as the live session did.
Describe the bug
After
--resume, earlier assistant messages are sent without their reasoning. Withkimi-k3(first-party,/chat/completions, not BYOK), a live session sends each assistant message'sreasoning_textback on later requests. After resume, the same messages are sent without it. The same message across requests:The reasoning is still in the session's
events.jsonl(reasoningText), so it is removed when the session is loaded, not lost when saved. SettingCOPILOT_STRIP_REASONING_ON_RESUME=falsekeeps it.Kimi K3 is trained with its reasoning preserved across turns, so after a resume it sees every earlier turn with empty reasoning. In our tests, K3 produced no reasoning on any request after a resume.
Separately, on the first request after resume, earlier
tool_calls[].function.argumentsare re-serialized compactly ({"command": "…"}becomes{"command":"…"}). That breaks prompt caching at the first assistant message.Affected version
1.0.90-5
Steps to reproduce the behavior
copilot -p "..." --model kimi-k3 --reasoning-effort high --allow-all-tools --no-ask-user --log-level all --log-dir logs1with a prompt that produces a few tool callscopilot --resume=<session-id> -p "..."with the same flags and--log-dir logs2Wire request:bodies: inlogs1, assistant messages carryreasoning_text; in the first request inlogs2, the same messages have noneExpected behavior
A resumed session sends the same assistant history, including
reasoning_text, as the live session did.