$ lexprog.com

// notes from an old coder -- php, databases, and the occasional rant

[November 17, 2026] OpenCode

Define role-specific agents: when context is nearly full

Give each agent its own prompt and tool access instead of restating the role every session. Start a new session or compact, then restate the remaining plan.

────────────────────────────────────────────────────────

Define role-specific agents: when context is nearly full

Tip: A reviewer is not a writer

Give each agent its own prompt and tool access instead of restating the role every session. Start a new session or compact, then restate the remaining plan.

{ "agents": { "reviewer": { "prompt": "Report only. Do not edit." } } }

Gotcha: One god-agent (when context is nearly full)

A single agent that can commit, push, and talk to prod MCP will eventually do all three. Compacting twice and saying continue will invent a new goal.

{ "tools": "*" }

Source: https://opencode.ai/docs/agents

────────────────────────────────────────────────────────
<-- back to posts