-
Notifications
You must be signed in to change notification settings - Fork 15.5k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When using the opencode zen GLM 4.7 model, it triggers a "Message ordering conflict" error that corrupts the session in a way that causes ALL models to fail until a full reset is performed.
Steps to reproduce
- Use
opencode zen GLM 4.7model - Session runs for a while (sometimes after debugging loops or other issues)
- Suddenly all messages return:
"Message ordering conflict - please try again. If this persists, use /new to start a fresh session." - Critical: Even after using
/new,/reset, orclawdbot /new, the error persists - All other models also fail with the same error
- Only a full reset fixes it (see Workaround)
Expected behavior
- Model should handle message ordering correctly
- Session reset commands (
/new,/reset) should recover from corrupted state - Corrupted session should be isolated to the problematic model/provider
Actual behavior
opencode zen GLM 4.7triggers message ordering conflict- Error spreads to ALL models (not just the problematic one)
/new,/reset, andclawdbot /newdon't recover the session- Complete reset required
Workaround (to recover)
- Delete all session files from
~/.clawdbot/sessions/ - Restart the clawdbot gateway completely (not just hot reload)
- Start a new session with a DIFFERENT model (e.g.,
z.ai coding plan GLM 4.7)
Environment
- Problematic model:
opencode zen GLM 4.7 - Working model with same base:
z.ai coding plan GLM 4.7 - Other models: Work fine after recovery
- Error source:
src/agents/pi-embedded-helpers/errors.ts(lines 198-201) - triggered by LLM returning "incorrect role information" or "roles must alternate"
Additional notes
- The same GLM 4.7 model from z.ai provider works without issues
- This isolates the bug to the opencode provider's implementation
- The session corruption shouldn't cascade to other models - suggests session state isn't properly isolated per-provider
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working