musistudio/claude-code-router · warning
[gateway] Cursor sent an OpenAI-compatible chat request with
Error message
[gateway] Cursor sent an OpenAI-compatible chat request with only user messages and no system/tools. Configure plugins[].id="cursor-proxy" config.systemPrompt/config.tools to inject fallback context, or route Cursor native Agent traffic through the proxy.
What it means
The Cursor proxy plugin received an OpenAI-compatible chat request whose body contains only user messages with no system prompt or tools, indicating Cursor is sending a simplified request that lacks Agent context. The gateway warns once per process that fallback context should be injected via plugin config, or Cursor native Agent traffic should be routed through the proxy.
Source
Thrown at packages/core/src/gateway/features/cursor-compat.ts:54
body.messages = [
{ content: context.systemPrompt, role: "system" },
...(Array.isArray(body.messages) ? body.messages : [])
];
changed = true;
}
if (context.tools.length > 0) {
body.tools = context.tools;
changed = true;
}
if (context.toolChoice !== undefined && context.tools.length > 0) {
body.tool_choice = context.toolChoice;
changed = true;
}
if (!changed) {
if (!warnedMissingCursorOpenAICompatContext) {
warnedMissingCursorOpenAICompatContext = true;
console.warn(
"[gateway] Cursor sent an OpenAI-compatible chat request with only user messages and no system/tools. " +
"Configure plugins[].id=\"cursor-proxy\" config.systemPrompt/config.tools to inject fallback context, " +
"or route Cursor native Agent traffic through the proxy."
);
}
return { diagnostic: "simplified-missing-context" };
}
return {
body: serializeJsonBody(body),
diagnostic: "fallback-injected"
};
}
function isOpenAICompatChatCompletionsPath(path: string): boolean {
return path === "/chat/completions" ||
path === "/v1/chat/completions" ||View on GitHub (pinned to 99f24806c6)
Solutions
- Configure the cursor-proxy plugin with a systemPrompt and tools to inject fallback context: plugins: [{ id: "cursor-proxy", config: { systemPrompt: "...", tools: [...] } }]
- Route Cursor's native Agent traffic through the proxy endpoint instead of the OpenAI-compatible chat endpoint
- Update Cursor and the gateway so native Agent requests (which carry system/tools) are used
Example fix
// before
plugins: [{ id: "cursor-proxy", config: {} }]
// after
plugins: [{
id: "cursor-proxy",
config: {
systemPrompt: "You are a helpful coding agent with access to the repo.",
tools: [/* minimal tool definitions */]
}
}] Defensive patterns
Strategy: validation
Validate before calling
const hasContext = (body) => Boolean(body.messages?.some((m) => m.role === "system"?.content)) || Boolean(body.tools?.length);
Prevention
- Always configure systemPrompt/tools on the cursor-proxy plugin
- Monitor for the diagnostic 'simplified-missing-context' in responses
- Keep Cursor on native Agent routing when possible
When it happens
Trigger: Pointing Cursor at the gateway's OpenAI-compatible endpoint in a mode where it strips system prompts and tool definitions; using Cursor chat (not Agent) against the OpenAI-compat route; misconfiguring plugins[].id="cursor-proxy" so no systemPrompt/tools are set.
Common situations: Switching Cursor from its native Agent mode to a custom OpenAI-compatible model; forgetting to configure config.systemPrompt and config.tools on the cursor-proxy plugin; Cursor version changes that drop system messages for custom models.
Related errors
- No Bot Gateway conversationRef is available for media respon
- Artifact origin is not the configured CCR gateway.
- Artifact URL does not use the CCR media artifact path.
- No available models. Configure at least one provider with a
- ToolHub resolver requires TOOLHUB_OPENAI_API_KEY and TOOLHUB
AI-assisted analysis of musistudio/claude-code-router@99f24806c6 (2026-08-27).
Data as JSON: /api/errors/cd45c2a338f1cb25.
Report an issue: GitHub.