Skip to content

feat(pstack-omp): route each config line to an agent pinned by task.agentModelOverrides - #14

Merged
cwkang1998 merged 6 commits into
mainfrom
feat/per-call-model-routing
Nov 15, 2026
Merged

cwkang1998 merged 6 commits into
mainfrom
feat/per-call-model-routing

Conversation

@cwkang1998

@cwkang1998 cwkang1998 commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

Why

$PSTACK_CONFIG sets a model for each role, but each role ran on its fixed agent at whatever model task.agentModelOverrides gave that agent. A line that differed was ignored. For example, hardest tasks: fable ran on Opus, and a panel seat for a model that no agent runs had nowhere to go. Every role must run on its configured model or fail.

What changed

  • The Model routing section of skills/pstack-omp/SKILL.md maps each config line to an agent. Lines reuse task, reviewer, scout and librarian where their models agree. Ten new agents cover the rest: pstack-hardest, pstack-judgment, pstack-reflect-tooling, pstack-swarm-worker, pstack-runner-1 to 3 for arena, architect and interrogate, and pstack-judge-1 to 3.
  • pstack never names a model on a task call. Before each spawn, the session compares the agent's override with the config line and stops when they differ. how, why, reflect, swarm and arena stop instead of falling back to a default model or agent.
  • setup-pstack writes the overrides. It refuses inherit-parent, a panel longer than three, two lines on one agent that disagree, a fallback chain that covers a configured model, and a before_subagent_spawn handler. scripts/verify.mjs fails when a config line has no routing row or routes to an agent the package does not ship.

Scope

  • Panels hold up to three different models. Repeating a model starts its seat again.
  • inherit-parent and auto are no longer valid config values.

Blast Radius

Every pstack spawn for a config line now depends on that agent's override. A missing or mismatched override stops the spawn, where before the role ran on whatever the agent had. Re-running /setup-pstack writes the overrides. This PR conflicts with #15 in skills/arena/SKILL.md and skills/setup-pstack/SKILL.md.

Verification

  • With the overrides written and the agents copied into the installed package, each new agent ran on its override's model and level. Opus at high held for pstack-reflect-tooling and pstack-swarm-worker, and pstack-runner-2 and pstack-judge-2 ran on openai-codex/gpt-6-astra.
  • An override pointing at an unknown model, and one pointing at a disabled provider, each failed with "No model selected". Neither fell back to another model.
  • npm run verify and npm run test:sync (4 of 4) pass. verify failed as intended with a renamed agent in the routing table, and with a config line that had no row.

…er agents

A role whose configured model differs from its mapped agent's task.agentModelOverrides entry now runs on pstack-worker or pstack-reader, with the model named in the task call. A role that keeps its agent's model but changes the level sends effort instead.
setup-pstack checks task.perCallModel, task.enableEffort and the modelRoles entries these need, and no longer rewrites task.agentModelOverrides for each role.
Model routing is now two cases. The mapped agent runs a role when it already runs the role's model, with effort for a level change. Every other role runs on pstack-worker with the model named per call.
pstack-reader is removed. pstack-worker takes read-only roles too, and its prompt tells it to change nothing when the role is read-only.
@cwkang1998 cwkang1998 changed the title feat(pstack-omp): run each role on its configured model through carrier agents feat(pstack-omp): run each role on its configured model, through pstack-worker when its agent runs another Nov 15, 2026
…-worker for overridden agents

With no task.agentModelOverrides entry, OMP accepts a per-call model on any agent. The mapped agent now takes the role line's value in model, and the :level suffix sets the effort.
pstack-worker takes a role only when its mapped agent has an override with another value. The effort mapping and the task.enableEffort requirement are gone.
setup-pstack no longer writes overrides. It adds a modelRoles entry for each model that no role names.
@cwkang1998 cwkang1998 changed the title feat(pstack-omp): run each role on its configured model, through pstack-worker when its agent runs another feat(pstack-omp): run each role on its configured model by naming it on the task call Nov 15, 2026
…drop pstack-worker

A per-call spawn that OMP refuses or cannot run now stops and reports the missing setting, role, or model. It no longer restarts on the agent's default model.
how, why, reflect, swarm and arena no longer fall back to a default model or agent. Arena's cross-judge still moves to the next configured pool entry.
pstack-worker is removed. With no overrides it never ran, and an override now fails the spawn instead of moving the role to another agent.
The Model routing table lists the modelRoles entry each agent follows when no model is named, as observed on OMP 18.20.2.
@cwkang1998 cwkang1998 changed the title feat(pstack-omp): run each role on its configured model by naming it on the task call feat(pstack-omp): run each role on its configured model by naming it on the task call, or fail Nov 15, 2026
…gentModelOverrides

Replaces the per-call model routing on this branch. pstack never names a model on a task call again.
The Model routing section maps every config line to an agent. Lines reuse task, reviewer, scout and librarian where their models agree. Ten new agents cover hardest tasks, judgment and prose, reflect tooling, swarm workers, three runner seats shared by arena, architect and interrogate, and three judge seats.
Before each spawn the session compares the agent's override with the config line and stops when they differ. how, why, reflect, swarm and arena stop instead of falling back to a default model or agent.
setup-pstack writes the overrides, and refuses inherit-parent, panels longer than three, disagreeing lines on one agent, fallback chains covering a configured model, and before_subagent_spawn handlers.
verify.mjs fails when a config line in the setup-pstack template has no routing row or routes to an agent the package does not ship.
@cwkang1998 cwkang1998 changed the title feat(pstack-omp): run each role on its configured model by naming it on the task call, or fail feat(pstack-omp): route each config line to an agent pinned by task.agentModelOverrides Nov 15, 2026
Config-line spawns send no effort, so the override's level holds. poteto-mode's effort rule applies only to roles with no line and drops its inherit-parent and closest-choice fallbacks.
Remove leftover model-switching text from orchestrate, architect, poteto-help and setup-pstack. swarm and reflect now spawn on the line's agent instead of the canonical role.
verify.mjs checks lines with hyphens, flags routing rows that are not config lines, requires each pstack agent to name only its own role, and keeps edit and write off the judges.
Runner prompts no longer mention panels, seats or other models, so an eval candidate is not told it is being compared.
@cwkang1998
cwkang1998 merged commit 61aa90c into main Nov 15, 2026
@cwkang1998
cwkang1998 deleted the feat/per-call-model-routing branch November 15, 2026 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant