Skip to content

llama.cpp error: 'System message must be at the beginning' with Qwen 3.5 #11

@winmutt

Description

@winmutt

Environment

  • Model: Qwen3.5-122B-A10B-GGUF (Qwen 3.5)
  • Provider: lemonade (llama.cpp-based server)
  • Plugin: opencode-agent-memory

Error

Error: Jinja Exception: System message must be at the beginning.

Steps to Reproduce

  1. Enable opencode-agent-memory plugin
  2. Use Qwen 3.5 model via llama.cpp server
  3. Start a chat session

Root Cause

The plugin creates multiple system messages when merging memory blocks with provider system content. llama.cpp Jinja templates require exactly one system message at position 0.

See Also

PR #10 contains the fix

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions