<< All versions
Skill v1.0.0
currentLLM-judged scan90/100llucax/opencode-sessions-spawning/sessions-spawning
──Details
PublishedOctober 22, 2026 at 12:33 AM
Content Hashsha256:1537d85fd826e77f...
Git SHAb70df5a1ecf2
──Files
Files (1 file, 3.0 KB)
SKILL.md3.0 KBactive
SKILL.md · 50 lines · 3.0 KB
version: "1.0.0" name: sessions-spawning description: > How to spawn OpenCode worker sessions and tasks and keep track of them. Load before spawning a session, or before a task when you manage several workers.
Spawning sessions and tasks
A worker is a session or a task.
- Tasks for short, blocking work. Sessions for long work, parallel work, or work that spawns workers of its own.
- Reuse a warm worker for follow-ups on its own work.
- Load
agent-messagesto write delegations and read reports.
Model
- Call the
model_routetool with thejobthat fits, or thejoborscoreandtagsthe agent's description recommends; addnot_modelwith the author's model for second-opinion reviews. Its first line is the route: aprovider/model, an effort and its notes; or it says no route fits. - Pass the model as
modeland the effort asvarianttotaskorspawn_session. - Respect the notes.
heavy: the provider's limit on heavy workers at once; long-running workers count as heavy too.bounded work only: one bounded job, never a loop or a long-running session. - When routing fails or finds no route, fix the cause or ask the user; never pick a model another way.
- Only if there is no
model_routetool: pick fromlist_models(and thequotatool, if installed), prefer the more capable model in doubt, never use a provider that trains on submitted data or keeps it beyond short operational retention, and treatxhighormaxworkers as heavy, one per provider.
Tools
- If
taskprints atask:warning thatmodelandvariantdid not apply, stop and tell the user. - Sessions need
spawn_session,send_agent_messageandreply(pluginmarenz/opencode-plugins). Without them, use tasks or ask the user.
Setup
- One worker per disjoint scope: never two writers in one checkout.
- Title a spawned session (not a task)
W: <topic>, orM: <topic>for a manager. The global or projectAGENTS.mdmay set other prefixes. - Reusing a warm session, drop its
(DONE)and keepW:. Ask before reusing a session withoutW:; never reuse anM:one. - A heavy worker is long-running or on a heavy route. Stay under the provider's limit, counting every worker under you, your workers' workers included.
- Workers may start their own unless their delegation says otherwise: lightweight agents and short tasks on routes not marked heavy freely. For a heavy one, tell your spawner (agent, model, variant, why): a session in a one-line
replywhen starting it, a task in its final answer. - Tell a worker to slow down when it starts heavy workers too often.
Progress
- Tell workers not to
replywith routine progress, only final results, blockers, decisions and heavy-worker starts. - To check progress, call
list_sessionswithinclude_todoand match rows to your spawns' IDs. Never just to mirror it. - A worker is done only at its final report, not at 100%.
Cleanup
- Prefix a session's title with
(DONE)once its work is verified and finished. - Remove stale worktrees and branches when the work is merged or abandoned.