Claude CLI v2.1.154 Breaks Local vLLM — One-Line Patch Fixes It

Claude CLI v2.1.154 introduced support for workflows, but in doing so it added three new API message roles (ctx, msg, and system) that broke compatibility with local vLLM servers. The fix is a one-line change to vLLM's Anthropic protocol definitions.
The Problem
Claude CLI versions ≥2.1.154 now send messages with roles beyond user and assistant. vLLM's Anthropic API endpoint only accepted the original two roles, causing requests from the CLI to fail when pointing to a local vLLM instance.
The One-Line Patch
The patch updates the role field in vllm/entrypoints/anthropic/protocol.py to allow the new roles:
--- a/vllm/entrypoints/anthropic/protocol.py
+++ b/vllm/entrypoints/anthropic/protocol.py
@@ -65,7 +65,7 @@ class AnthropicContentBlock(BaseModel):
class AnthropicMessage(BaseModel):
"""Message structure"""
- role: Literal["user", "assistant"]
+ role: Literal["user", "assistant", "ctx", "msg", "system"]That's it. After applying this change, you can use the latest Claude CLI workflows with vLLM-based local models like MiniMax-M2.7 (the only model tested by the author).
If you run a local Anthropic-compatible endpoint on vLLM, apply this patch to keep working with Claude CLI ≥2.1.154.
📖 Read the full source: r/LocalLLaMA
👀 See Also

Two Small Prompt Changes Cut Claude Editing Time by 80%
Put role instruction at the start and format instruction at the end. One user reports cutting editing iterations from three to one.

Yes Flow/No Flow: A Simple Technique to Reduce Context Hallucination in AI Coding Sessions
A Reddit user shares the Yes Flow/No Flow technique for maintaining consistency in AI conversations by rewriting prompts instead of stacking corrections, which helps reduce context breakdown and hallucination during long coding sessions.

Running OpenClaw Inside Ollama's Docker Container for Simpler Networking
A Reddit user shows how to install OpenClaw inside the official ollama/ollama Docker container so OpenClaw talks to Ollama via localhost, avoiding host.docker.internal and extra networking setup. Trade-off is higher RAM usage.

OpenClaw Dashboard Disconnecting After 2026.5.27 Update? Fix: Remove Stuck Update Launchd Job
After the 2026.5.27 update, a stuck update launchd job causes dashboard WebSocket disconnects and Telegram failures. Removing the job restores stability.