Lesson #1458

← Back to Knowledge Board
Trigger phrase for OR-routed Claude-Code delegation
ID
1458
Author
ai
Agent
agent-claude
Reviewed
✓ Yes
Source authority
75 / 100
Source
When user says "agenten via claude code+openrouter darauf ansetzen" or similar, delegate to or-coder subagent (CCR-routed Claude Code via OpenRouter)
Source issue
Created at
2026-05-12T10:00:23.252058+00:00
Valid until
Deprecated at
Supersedes
Obsidian path
/root/.claude/projects/-nvmetank1-projects/memory/feedback_or_claude_router_trigger.md
Obsidian hash
16430866588c91fe3cd90145941bab7f
Tags
claude-memory,feedback

Content

**Rule:** When the user says any of these phrases, treat as instruction to delegate the current task to a Claude-Code subagent that's routed through claude-code-router (CCR) to OpenRouter models:

- "agenten via claude code+openrouter darauf ansetzen" (canonical phrase)
- "agenten via claude code+router darauf ansetzen" (older variant — same meaning)
- "via CCR" / "über den router" / "mit dem CCR-claude"
- "OR-claude" / "OpenRouter-claude"
- "claude-or"

**Why:** User wants cost-savings on routine tasks by using OR-backed Claude Code (Qwen/DeepSeek/Haiku via OpenRouter) instead of Anthropic-direct. Reasoning + final review stays in main Claude (Anthropic Opus); execution delegated to cheap OR-models.

**How to apply:**
- Use the `Agent` tool with `subagent_type="or-coder"` (subagent definition lives at `~/.claude/agents/or-coder.md`).
- Or, for one-shot single-prompt invocations, shell out via Bash: `claude-or --print "<prompt>"` and capture output.
- Pass the same task-context the user described — let the OR-claude do the implementation work + commits.
- Verify the result before reporting back to user (since OR-models can hallucinate or skip steps; orchestrator-Claude is responsible for quality gate).

**Infrastructure:**
- CCR daemon: systemd unit on port 3457, config at `/root/.claude-code-router/config.json`
- Wrapper: `/usr/local/bin/claude-or` (sets `ANTHROPIC_BASE_URL=http://127.0.0.1:3457`)
- Subagent definition: `~/.claude/agents/or-coder.md`
- Routing rules: default→qwen3-coder-plus, think→deepseek-chat, longContext→gemini-2.5-flash, webSearch→gemini-2.5-flash, background→deepseek-chat

**Important rule (user-direktive 2026-05-05):** Claude models (Opus/Sonnet/Haiku) MUST run via Claude Code DIRECT (Anthropic API), NEVER via CCR/OR. Reason: cost — when we have direct Anthropic access, routing Claude through OR adds OR markup. CCR config has anthropic/* removed from provider list. Trigger phrase only routes work that should run on non-Claude models (Qwen/DeepSeek/Gemini).

**When NOT to use:**
- Hard architectural reasoning (Opus > Qwen for system-design)
- Tasks needing extended thinking / large-context
- Security-critical changes where cost-cheaper-model misalignment is risky