You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Agent loop runs extra step when client/server clocks are skewed #24183
The agent loop uses message IDs to detect whether a new user prompt arrived mid-response. User message IDs are stamped by the browser; assistant IDs are stamped by the server. When the client and server clocks differ, the browser-stamped user ID can compare as greater than the server-stamped assistant ID even with no new user input, causing the loop to run a spurious extra step. toModelMessagesEffect then produces a message array ending with an assistant message. On llama.cpp with Qwen3 and enable_thinking, this is rejected with: Assistant response prefill is incompatible with enable_thinking. Of course, this may have other effects beyond this, but it's the one that I ran into.
Plugins
none
OpenCode version
1.14.22
Steps to reproduce
Run the OpenCode server and connect from a separate machine whose clock differs from the server's
Send any prompt to a Qwen3 model via llama.cpp with enable_thinking enabled
Observe the error above after the model completes its response
This issue might be a duplicate of or closely related to an existing issue. Please check:
Bug: OpenCode prompt loop continues after finish=stop, triggering prefill error on claude-opus-4-6 #17982: Same symptom (agent loop runs an extra step, last message ends with an assistant turn, triggering a prefill-incompatibility error). That issue attributes the root cause to the prompt loop not gating continuation on finish=stop; your issue identifies clock skew between client and server as a trigger for the same behavior. These may be the same underlying bug or closely related manifestations worth investigating together.
Activity
github-actions commentedon Apr 24, 2026
This issue might be a duplicate of or closely related to an existing issue. Please check:
finish=stop, triggering prefill error on claude-opus-4-6 #17982: Same symptom (agent loop runs an extra step, last message ends with an assistant turn, triggering a prefill-incompatibility error). That issue attributes the root cause to the prompt loop not gating continuation onfinish=stop; your issue identifies clock skew between client and server as a trigger for the same behavior. These may be the same underlying bug or closely related manifestations worth investigating together.finish=stop, triggering prefill error on claude-opus-4-6 #17982