--- name: setup-pstack description: Configure pstack for Codex, choose models and reasoning budgets, and offer project verification skills. Use for setup-pstack, pstack setup, model choices, or session routing. --- # Set up pstack on Codex Read [the Codex adapter](../../docs/harness/codex.md) first, including its question transport rules. `` is this skill's plugin root, two directories above this file. Ask one setup decision at a time and wait for the user's answer before asking the next dependent question. Use choices the user already supplied without asking again. A displayed default is context, not an answer. Show the proposed model table before writing configuration. Finish model setup before offering optional verification skills. 1. Detect the actual models and reasoning levels offered by the current host's native subagent tool schema or documented model list. Do not treat saved config as entitlement. If detection is unavailable, ask which model IDs are available. Aliases `auto` and `inherit-parent` are always valid. Confirm that native `spawn_agent` and `wait_agent` are offered before promising fan-out. 2. Read `${CODEX_HOME:-~/.codex}/pstack-models.md` and existing instructions if present. Show existing choices. Defaults and roles are in the adapter. Preserve custom roles. `hardest tasks` and `strongest judgment` denote the same role. 3. Ask for a reasoning budget, using the current choice as context. When the question tool allows five options, offer session, small, medium, large, and unlimited together in one real widget. When fewer options are allowed, split the budgets into sequential questions that obey the actual schema limit. For a three-option limit, first ask whether to use session effort with no override or choose a fixed budget. For a fixed budget, ask whether to use small with medium reasoning, medium with high reasoning, or a higher budget. For a higher budget, ask whether to use large with xhigh reasoning or unlimited with max reasoning. Stop the branch as soon as the budget is known. Do not change explicit effort suffixes on panel entries when setting the default budget. 4. Show every proposed role, all panel entries, and any unavailable model in a table. The default four-agent Sol panels vary effort and have reduced model diversity. Explain that cost grows with panel size. Ask whether to keep the table or change specific roles. If changes are requested, collect the requested changes before proceeding. Keep four independent reviewers unless the user chooses a different panel size. Ask about persistent session routing separately if it has not already been decided. Offer `--session-hook on`; `off` disables hook output. Do not claim the hook is active until trusted through the host's `/hooks` interface. Explicit `$pstack:poteto-mode` works without a hook. 5. Validate selected real models against the detected set. Model IDs and reasoning effort are separate. Do not append Cursor effort suffixes or silently substitute models. 6. Run the bundled CLI `python3 /tools/setup.py --check` with the chosen `--budget` and `--available-model` arguments. For explicit role changes, write a temporary JSON role-to-string-or-list file and pass `--models-file`. Inspect the proposed changes. Run again without `--check` to apply within the user's authorized setup scope. Use `--codex-home` for a custom home. Preserve unrelated TOML and AGENTS.md instructions. Host permission requirements still apply. 7. Report the sheet and managed loader locations. Start a new chat for global instructions and multi-agent configuration to load. Test a read-only native child before promising model availability if the tool schema did not establish it. State any blocked capability explicitly. 8. After model setup is written, offer once to generate a project verification skill with [create-verification-skill](../create-verification-skill/SKILL.md) when no driver skill or equivalent real-app verification exists. On yes, write it under `.agents/skills/` and prove it works. On no, move on. 9. Then offer once to generate a formal verification skill with [create-formal-verification-skill](../create-formal-verification-skill/SKILL.md) when none exists. Explain that it suits costly concurrency, retries, parsers, or state invariants. Respect the answer.