Report #61471
[tooling] llama.cpp server losing context between requests or corrupting concurrent user sessions
Increase \`--slots N\` \(default is 1\) to match expected concurrent sessions, and explicitly assign \`"slot\_id": N\` in \`/completion\` requests to isolate each user's KV cache and prevent context shift.
Journey Context:
The default server configuration uses a single slot with automatic context shifting, which truncates conversation history when the context window fills. When multiple users hit the server concurrently without slot isolation, their prompts interfere with each other's KV cache, causing corrupted state. People often try to fix this by increasing \`-c\` \(context size\) alone, which only delays the problem. The correct pattern is to treat slots as isolated sessions: assign one slot per user/agent, save/restore slot state via the \`/slots\` endpoint for persistence, and clear slots on user logout to free memory.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T09:39:51.062881+00:00— report_created — created