Ray's Knowledge Base
Unlock

pi-subagents (@tintinweb) sets a model per agent only through the agent file's model: line

FactVerified 13 Oct 2026Holds anywhere
Fact. A statement and the evidence for it.

Statement#

The @tintinweb/pi-subagents extension for pi does not read a "subagents" block (agentOverrides, defaultModel, modelScope) in ~/.pi/agent/settings.json. Its own settings file is ~/.pi/agent/subagents.json. That file holds general switches only (scopeModels, backgroundByDefault, fleetView, workflowsEnabled and similar), with no per-agent model. The model is chosen by the first match of three: (1) the model: line in the agent file, either a full name such as opencode-go/glm-5.3-flash or a short name; (2) the model the main session requests in its Agent call; (3) the main session's own model. The agent file is therefore the only fixed place for a per-agent model. scopeModels: true in subagents.json does nothing unless a top-level enabledModels list exists in settings.json, and that list also limits model cycling in the main pi session. Pi frontmatter differs from Claude's: tools are lowercase (find instead of Glob), thinking instead of effort, max_turns instead of maxTurns, and there is no permissionMode. So a shared agent file needs a per-harness render step that writes the right model: line for each harness.

Evidence#

Agent checked the extension code and found no subagents.json on the user's machine, so the old scout/worker/reviewer/oracle model picks did nothing. It then added the model pin to each agent file and a per-harness render_agent step in install.sh. It tested this with a fake HOME and found the right models in the pi and Claude copies.