open-pstack 0.9.155 → 0.9.156

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-pstack",
3
- "version": "0.9.155",
3
+ "version": "0.9.156",
4
4
  "description": "Install pstack into the agent harnesses on this machine: Claude Code, Codex, Pi, Copilot, Muse, OMP, Kimi, Grok, MiniMax, OpenCode, Antigravity, and the shared skills directory.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pstack",
3
- "version": "0.9.155",
3
+ "version": "0.9.156",
4
4
  "description": "If you want to go fast, go deep first. pstack helps you write less, but higher quality code. rigorous agent workflows you can parallelize with confidence. Ported from cursor/plugins/pstack to Antigravity. Original pstack by Lauren Tan (poteto).",
5
5
  "author": "Michael Denyer",
6
6
  "logo": "assets/pstack-icon.png",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pstack",
3
3
  "displayName": "pstack (Claude Code port)",
4
- "version": "0.9.155",
4
+ "version": "0.9.156",
5
5
  "description": "If you want to go fast, go deep first. pstack helps you write less, but higher quality code. rigorous agent workflows you can parallelize with confidence. Ported from cursor/plugins/pstack to Claude Code. Original pstack by Lauren Tan (poteto).",
6
6
  "author": {
7
7
  "name": "Michael Denyer",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pstack",
3
- "version": "0.9.155",
3
+ "version": "0.9.156",
4
4
  "description": "If you want to go fast, go deep first. pstack helps you write less, but higher quality code. rigorous agent workflows you can parallelize with confidence. Codex port of the Claude Code plugin; skills are shared, tool names resolve via skills/poteto-mode/references/codex-tools.md. Original pstack by Lauren Tan (poteto).",
5
5
  "author": {
6
6
  "name": "Michael Denyer",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pstack",
3
3
  "displayName": "pstack (GitHub Copilot port)",
4
- "version": "0.9.155",
4
+ "version": "0.9.156",
5
5
  "description": "If you want to go fast, go deep first. pstack helps you write less, but higher quality code. rigorous agent workflows you can parallelize with confidence. Ported from cursor/plugins/pstack to GitHub Copilot CLI and app. Original pstack by Lauren Tan (poteto).",
6
6
  "author": {
7
7
  "name": "Michael Denyer",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pstack",
3
- "version": "0.9.155",
3
+ "version": "0.9.156",
4
4
  "description": "pstack workflows and skills for Grok Build",
5
5
  "skills": [
6
6
  "./skills",
@@ -2,7 +2,7 @@
2
2
  "schemaVersion": 1,
3
3
  "name": "pstack",
4
4
  "displayName": "pstack (Muse port)",
5
- "version": "0.9.155",
5
+ "version": "0.9.156",
6
6
  "description": "If you want to go fast, go deep first. pstack helps you write less, but higher quality code. Rigorous agent workflows you can parallelize with confidence. Muse port of the Claude Code plugin; skills are shared, tool names resolve via skills/poteto-mode/references/muse-tools.md. Original pstack by Lauren Tan (poteto).",
7
7
  "compat": {
8
8
  "source": "native",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pstack",
3
- "version": "0.9.155",
3
+ "version": "0.9.156",
4
4
  "private": true,
5
5
  "omp": {
6
6
  "extensions": ["./omp/index.mjs"]
@@ -9,7 +9,7 @@ import { Value } from "typebox/value";
9
9
  import { noticeOf, OUTPUT_CAP_BYTES, statusText, truncateUtf8 } from "./agent-text.ts";
10
10
  import type { AgentParams } from "./agent-tools.ts";
11
11
  import { type Activity, type AgentChild, alive, type ChildExit, PiChild, terminateGroup } from "./child.ts";
12
- import { HcChild } from "./hc-child.ts";
12
+ import { HcChild, pidOfTerminal } from "./hc-child.ts";
13
13
  import { loadAgentTypes } from "./agent-files.ts";
14
14
  import { checkEffort, DEPTH_FLAG, GENERAL_PURPOSE, InvalidValueError, PSTACK_STATE_DIR, readSheet, resolveModel, type Settings } from "./config.ts";
15
15
  import { ensureWorktree, planWorktree, settleWorktree, type Worktree, worktreeSchema } from "./worktree.ts";
@@ -174,7 +174,9 @@ function inspect(pid: number): { parentPid: number; start: string } | undefined
174
174
 
175
175
  // What became of the process a running record names:
176
176
  // - kept: it is still a child of the live pi process that launched it;
177
- // - orphan: it is the process the record was written for, its launcher gone;
177
+ // - orphan: it is the process the record was written for, its launcher gone
178
+ // (an hc record written before its pid takes the pid and start that hc names
179
+ // for the agent's terminal, in identifyByTerminalName);
178
180
  // - unknown: a process is there, and nothing says whether it is the agent's;
179
181
  // - gone: no process is there, or another one is.
180
182
  type Fate = "kept" | "orphan" | "unknown" | "gone";
@@ -192,6 +194,12 @@ function fateOf(record: RunningRecord): Fate {
192
194
  return info && info.start === pidStart ? "orphan" : "unknown";
193
195
  }
194
196
 
197
+ function identifyByTerminalName(record: RunningRecord): RunningRecord {
198
+ if (record.host !== "hc" || record.pid !== undefined) return record;
199
+ const pid = pidOfTerminal(record.agent.id);
200
+ return pid === undefined ? record : { ...record, pid, pidStart: inspect(pid)?.start };
201
+ }
202
+
195
203
  // Stops an orphan, by its group so the bash command it has running goes too.
196
204
  // No other fate is signalled: a pid that may have been reused is not ours to hit.
197
205
  function reapOrphan(record: RunningRecord, killGraceMs: number): Promise<void> {
@@ -279,7 +287,7 @@ export class AgentRunner {
279
287
  }
280
288
  const child = this.spawnChild(identity, prompt);
281
289
  const pidStart = child.pid === undefined ? undefined : inspect(child.pid)?.start;
282
- const record: RunningRecord = { agent: identity, status: "running", pid: child.pid, pidStart, parentPid: process.pid };
290
+ const record: RunningRecord = { agent: identity, status: "running", pid: child.pid, pidStart, parentPid: process.pid, host: child instanceof HcChild ? "hc" : undefined };
283
291
  const run: Run = { child, background, done: child.exited.then((exit) => this.finish(identity, run, exit)) };
284
292
  this.agents.set(identity.id, { kind: "local", record, run });
285
293
  this.persist(record);
@@ -301,13 +309,13 @@ export class AgentRunner {
301
309
  envFile: join(identity.sessionDir, `${identity.id}.env`),
302
310
  graceMs: this.settings.killGraceMs,
303
311
  transcript: () => sessionFile(identity),
304
- onStart: (pid) => this.track(identity.id, { host: "hc", pid, pidStart: inspect(pid)?.start }),
312
+ onStart: (pid) => this.track(identity.id, { pid, pidStart: inspect(pid)?.start }),
305
313
  }, prompt);
306
314
  }
307
315
  return new PiChild(command, [...base, "--mode", "rpc", ...flags], { cwd: identity.cwd, env, exitGraceMs: this.settings.exitGraceMs, onActivity: () => this.showStatus() }, prompt);
308
316
  }
309
317
 
310
- private track(id: string, handle: Pick<RunningRecord, "host" | "pid" | "pidStart">): void {
318
+ private track(id: string, handle: Pick<RunningRecord, "pid" | "pidStart">): void {
311
319
  const state = this.agents.get(id);
312
320
  if (state?.kind !== "local") return;
313
321
  Object.assign(state.record, handle);
@@ -506,6 +514,9 @@ export class AgentRunner {
506
514
  if (this.agents.get(id)?.kind === "local") continue;
507
515
  this.agents.set(id, entry.data.status === "running" ? { kind: "remote", record: entry.data } : { kind: "ended", record: entry.data });
508
516
  }
509
- for (const state of this.agents.values()) this.refreshRestored(state);
517
+ for (const state of this.agents.values()) {
518
+ if (state.kind === "remote") state.record = identifyByTerminalName(state.record);
519
+ this.refreshRestored(state);
520
+ }
510
521
  }
511
522
  }
@@ -1,4 +1,4 @@
1
- import { execFile, spawn } from "node:child_process";
1
+ import { execFile, execFileSync, spawn } from "node:child_process";
2
2
  import { readFileSync, statSync, unlinkSync, writeFileSync } from "node:fs";
3
3
  import { setTimeout as sleep } from "node:timers/promises";
4
4
  import { promisify } from "node:util";
@@ -11,6 +11,8 @@ const execHc = promisify(execFile);
11
11
  const SCREEN_LINES = "30";
12
12
  const CLOSE_POLL_MS = 200;
13
13
  const STARTUP_POLL_MS = 500;
14
+ // hc answers a get in milliseconds. pidOfTerminal waits for it synchronously, so it gives up on a core that never answers.
15
+ const GET_TIMEOUT_MS = 2000;
14
16
  const NOT_THE_CHILD = new Set(["timeout", "message"]);
15
17
  const TERMINAL_VARS = new Set(["COLORTERM", "TERM", "TERM_PROGRAM", "PWD", "OLDPWD", "SHLVL", "_"]);
16
18
  const LOAD_ENV = '. "$1" && rm -- "$1" && shift && exec "$@"';
@@ -180,8 +182,21 @@ export function replyIn(file: string | undefined, from: number): Pick<ChildExit,
180
182
  return reply;
181
183
  }
182
184
 
185
+ export function pidOfTerminal(name: string): number | undefined {
186
+ const args = ["get", "--json", name];
187
+ try {
188
+ return answer(getResult, args, execFileSync("hc", args, { encoding: "utf8", stdio: ["ignore", "pipe", "ignore"], timeout: GET_TIMEOUT_MS })).pid ?? undefined;
189
+ } catch {
190
+ return undefined;
191
+ }
192
+ }
193
+
183
194
  async function hc<T extends TSchema>(schema: T, args: string[]): Promise<Static<T>> {
184
195
  const { stdout } = await execHc("hc", args);
196
+ return answer(schema, args, stdout);
197
+ }
198
+
199
+ function answer<T extends TSchema>(schema: T, args: string[], stdout: string): Static<T> {
185
200
  const result: unknown = JSON.parse(stdout.trim().split("\n").at(-1) ?? "");
186
201
  if (!Value.Check(schema, result)) throw new Error(`hc ${args[0]} answered: ${stdout.trim().slice(0, 300)}`);
187
202
  return result;
@@ -63,4 +63,4 @@ Role defaults, stamped from `plugins/pstack/models.json` (edit there, rerun `too
63
63
 
64
64
  ## Reasoning effort
65
65
 
66
- A role value in the override sheet may name a reasoning effort after its model, as in `opus @xhigh`. Levels on Claude Code: `low`, `medium`, `high`, `xhigh`, `max`. Which ones apply depends on the model. A value without `@` takes the sheet's `default effort` line, a level or `session`, and `session` when the sheet has no such line. On Claude Code, `session` sets no effort. On other runtimes, follow the platform mapping for `session`. Strip the suffix before reading the model: `inherit-parent` or `auto` still omits `model` at every level, and a model name is passed as `model`. Pass the level as the dispatch's effort field and keep the `subagent_type` you would otherwise use. That is `effort` on the Claude Code `Agent` call and `reasoning_effort` on Codex's `spawn_agent`. On Muse it is `effort` on a Workflow child; a `subagent_spawn` dispatch keeps the session's effort.
66
+ A role value in the override sheet may name a reasoning effort after its model, as in `opus @xhigh`. Levels on Claude Code: `low`, `medium`, `high`, `xhigh`, `max`. Which ones apply depends on the model. A value without `@` takes the sheet's `default effort` line, a level or `session`, and `session` when the sheet has no such line. On Claude Code, `session` sets no effort. On other runtimes, follow the platform mapping for `session`. Strip the suffix before reading the model: `inherit-parent` or `auto` still omits `model` at every level, and a model name is passed as `model`. Pass the level as the dispatch's effort field and keep the `subagent_type` you would otherwise use. That is `effort` on the Claude Code `Agent` call and `reasoning_effort` on Codex's `spawn_agent`. On Codex, pass `model` and `reasoning_effort` only as the platform mapping's schema check allows. On Muse it is `effort` on a Workflow child; a `subagent_spawn` dispatch keeps the session's effort.
@@ -45,4 +45,4 @@ Role defaults, stamped from `plugins/pstack/models.json` (edit there, rerun `too
45
45
 
46
46
  ## Reasoning effort
47
47
 
48
- A role value in the override sheet may name a reasoning effort after its model, as in `opus @xhigh`. Levels on Claude Code: `low`, `medium`, `high`, `xhigh`, `max`. Which ones apply depends on the model. A value without `@` takes the sheet's `default effort` line, a level or `session`, and `session` when the sheet has no such line. On Claude Code, `session` sets no effort. On other runtimes, follow the platform mapping for `session`. Strip the suffix before reading the model: `inherit-parent` or `auto` still omits `model` at every level, and a model name is passed as `model`. Pass the level as the dispatch's effort field and keep the `subagent_type` you would otherwise use. That is `effort` on the Claude Code `Agent` call and `reasoning_effort` on Codex's `spawn_agent`. On Muse it is `effort` on a Workflow child; a `subagent_spawn` dispatch keeps the session's effort.
48
+ A role value in the override sheet may name a reasoning effort after its model, as in `opus @xhigh`. Levels on Claude Code: `low`, `medium`, `high`, `xhigh`, `max`. Which ones apply depends on the model. A value without `@` takes the sheet's `default effort` line, a level or `session`, and `session` when the sheet has no such line. On Claude Code, `session` sets no effort. On other runtimes, follow the platform mapping for `session`. Strip the suffix before reading the model: `inherit-parent` or `auto` still omits `model` at every level, and a model name is passed as `model`. Pass the level as the dispatch's effort field and keep the `subagent_type` you would otherwise use. That is `effort` on the Claude Code `Agent` call and `reasoning_effort` on Codex's `spawn_agent`. On Codex, pass `model` and `reasoning_effort` only as the platform mapping's schema check allows. On Muse it is `effort` on a Workflow child; a `subagent_spawn` dispatch keeps the session's effort.
@@ -42,4 +42,4 @@ Role defaults, stamped from `plugins/pstack/models.json` (edit there, rerun `too
42
42
 
43
43
  ## Reasoning effort
44
44
 
45
- A role value in the override sheet may name a reasoning effort after its model, as in `opus @xhigh`. Levels on Claude Code: `low`, `medium`, `high`, `xhigh`, `max`. Which ones apply depends on the model. A value without `@` takes the sheet's `default effort` line, a level or `session`, and `session` when the sheet has no such line. On Claude Code, `session` sets no effort. On other runtimes, follow the platform mapping for `session`. Strip the suffix before reading the model: `inherit-parent` or `auto` still omits `model` at every level, and a model name is passed as `model`. Pass the level as the dispatch's effort field and keep the `subagent_type` you would otherwise use. That is `effort` on the Claude Code `Agent` call and `reasoning_effort` on Codex's `spawn_agent`. On Muse it is `effort` on a Workflow child; a `subagent_spawn` dispatch keeps the session's effort.
45
+ A role value in the override sheet may name a reasoning effort after its model, as in `opus @xhigh`. Levels on Claude Code: `low`, `medium`, `high`, `xhigh`, `max`. Which ones apply depends on the model. A value without `@` takes the sheet's `default effort` line, a level or `session`, and `session` when the sheet has no such line. On Claude Code, `session` sets no effort. On other runtimes, follow the platform mapping for `session`. Strip the suffix before reading the model: `inherit-parent` or `auto` still omits `model` at every level, and a model name is passed as `model`. Pass the level as the dispatch's effort field and keep the `subagent_type` you would otherwise use. That is `effort` on the Claude Code `Agent` call and `reasoning_effort` on Codex's `spawn_agent`. On Codex, pass `model` and `reasoning_effort` only as the platform mapping's schema check allows. On Muse it is `effort` on a Workflow child; a `subagent_spawn` dispatch keeps the session's effort.
@@ -129,4 +129,4 @@ Role defaults, stamped from `plugins/pstack/models.json` (edit there, rerun `too
129
129
 
130
130
  ## Reasoning effort
131
131
 
132
- A role value in the override sheet may name a reasoning effort after its model, as in `opus @xhigh`. Levels on Claude Code: `low`, `medium`, `high`, `xhigh`, `max`. Which ones apply depends on the model. A value without `@` takes the sheet's `default effort` line, a level or `session`, and `session` when the sheet has no such line. On Claude Code, `session` sets no effort. On other runtimes, follow the platform mapping for `session`. Strip the suffix before reading the model: `inherit-parent` or `auto` still omits `model` at every level, and a model name is passed as `model`. Pass the level as the dispatch's effort field and keep the `subagent_type` you would otherwise use. That is `effort` on the Claude Code `Agent` call and `reasoning_effort` on Codex's `spawn_agent`. On Muse it is `effort` on a Workflow child; a `subagent_spawn` dispatch keeps the session's effort.
132
+ A role value in the override sheet may name a reasoning effort after its model, as in `opus @xhigh`. Levels on Claude Code: `low`, `medium`, `high`, `xhigh`, `max`. Which ones apply depends on the model. A value without `@` takes the sheet's `default effort` line, a level or `session`, and `session` when the sheet has no such line. On Claude Code, `session` sets no effort. On other runtimes, follow the platform mapping for `session`. Strip the suffix before reading the model: `inherit-parent` or `auto` still omits `model` at every level, and a model name is passed as `model`. Pass the level as the dispatch's effort field and keep the `subagent_type` you would otherwise use. That is `effort` on the Claude Code `Agent` call and `reasoning_effort` on Codex's `spawn_agent`. On Codex, pass `model` and `reasoning_effort` only as the platform mapping's schema check allows. On Muse it is `effort` on a Workflow child; a `subagent_spawn` dispatch keeps the session's effort.
@@ -16,15 +16,25 @@ pstack skills are written in Claude Code tool language (the `Skill` tool, the `A
16
16
  | Read a principle leaf (the **principle-<title>** skill, or the **<title>** principle skill, a pstack skill names) | Principle leaves are left out of Codex's skill list by their `agents/openai.yaml`. Read the leaf with `shell` at `<poteto-mode-dir>/../principle-<title>/SKILL.md`, with `<poteto-mode-dir>` resolved to the `poteto-mode` skill's directory and `<title>` in kebab case, or the explicit name a Principles entry gives. |
17
17
  | Dispatch a subagent (the `Agent`/`Task` tool) | `spawn_agent` |
18
18
  | Dispatch N parallel subagents in one turn | N `spawn_agent` calls in one response |
19
- | Wait for a subagent result | `wait_agent` |
20
- | Free a finished subagent slot | `close_agent`, when the session exposes it. Some Codex hosts don't. |
19
+ | Wait for a subagent result | Use `wait_agent` as described under [Agent lifecycle](#agent-lifecycle). |
20
+ | Stop a subagent (`TaskStop`) | `close_agent` or `interrupt_agent`, whichever the session exposes. See [Agent lifecycle](#agent-lifecycle). |
21
21
  | Track tasks (the todolist; `TaskCreate` / `TaskUpdate`, or `TodoWrite` on Claude Code) | `update_plan` |
22
22
  | Ask the human a fixed-choice question (`AskUserQuestion`) | Use `request_user_input` when the current mode and client support delivering structured questions, such as an interactive Plan mode session. If support is unclear or the tool is unavailable, ask in plain text. Outside Plan mode, ask a required decision or approval in plain text, because Codex continues on its own judgment when `request_user_input` returns no answer. |
23
23
  | Read this workspace's session transcripts (Claude Code's `${CLAUDE_CONFIG_DIR:-$HOME/.claude}/projects/<encoded-cwd>/`) | Codex sessions live in `${CODEX_HOME:-~/.codex}/sessions/YYYY/MM/DD/`. Ordinary names end in `-<thread-id>.jsonl`; replacements after `thread/revert` end in `-<thread-id>_<rollout-id>.jsonl`. Revert keeps the old files. Resolve the current path from the state database's `threads.rollout_path`, matched by thread ID, rather than filename order or modification time. Archived sessions are in `${CODEX_HOME:-~/.codex}/archived_sessions/`. Older rollouts in both directories can end in `.jsonl.zst`; read those with `zstd -dc`. The first line of each rollout is a `session_meta` record. Keep only rollouts whose `payload.cwd` is the workspace or one of its worktrees. Never read other projects' sessions. |
24
24
 
25
25
  Subagents are enabled by default in current Codex, and `agents.enabled` controls them. Inspect the current tool surface. If dispatch is unavailable, the fan-out skills (`interrogate`, `why`, `how`, `arena`, `reflect`) degrade to a labeled sequential pass. A required independent review does not degrade. It stays blocked, as poteto-mode's [Subagents](../SKILL.md#subagents) section says.
26
26
 
27
- Enabling subagents does not lift the host's thread limit. A thread-limit error from `spawn_agent` is a capacity error, not a rejected model slug, so the skills' fallback to another model does not apply. After the first capacity rejection, stop spawning. Close a finished agent with `close_agent` before you try again, and where the session has no `close_agent`, do not assume a finished agent's slot is free.
27
+ ## Agent lifecycle
28
+
29
+ Codex has two sets of agent tools, and `wait_agent` behaves differently in each. Choose by the tools the current session lists.
30
+
31
+ - With `close_agent`, `wait_agent` waits until the requested agents reach a final status. Use the final result or the completion notification. Close an agent with `close_agent` when you no longer need it. Its response is the status before shutdown was requested, not a confirmation that the agent stopped.
32
+ - With `interrupt_agent`, `wait_agent` returns on mailbox activity from any agent and does not carry the content. Read the delivered message or final-status notification from the delegate you are waiting on. Another agent's message, a timeout, or steering from the user leaves the delegate's result pending. `interrupt_agent` stops the delegate's current turn and returns its previous status; the agent stays available for follow-up tasks. `list_agents` reports each live agent's last known status.
33
+ - With neither tool, or without `wait_agent`, use the notification or status tools the session does expose.
34
+
35
+ Before you replace a writer or reuse its worktree, confirm through a later status (a final status, a completion notification, or `list_agents`) that its turn has ended. A close or interrupt response alone does not confirm it. If you cannot confirm it, leave the worktree with its writer.
36
+
37
+ A thread-limit error from `spawn_agent` is a capacity error, so changing the model does not fix it. After the first rejection, stop spawning. Close a finished agent with `close_agent` before you try again; a completed agent counts toward the limit until it is closed. Where the session has no `close_agent`, do not assume a finished agent's slot is free. Interrupting a turn does not close the agent.
28
38
 
29
39
  ## Subagent policy
30
40
 
@@ -34,6 +44,7 @@ poteto-mode's Subagents section sets Claude-specific defaults (`subagent_type: "
34
44
  - When the exposed spawn schema accepts a role, map Claude's `general-purpose` to `agent_type: "default"`, or use `explorer` for exploration when available. Omit the role field when the schema has none, and on a full-history fork (`fork_context: true`), which inherits the parent's role and rejects a new one. Instruct exploration agents to leave files unchanged on either interface. A read-oriented role does not enforce read-only permissions. If the job requires enforced read-only access, use a Codex session with a read-only sandbox or report that the current host cannot provide that guarantee.
35
45
  - For blind candidates or reviewers who should see only the brief, use `fork_context: false` on the older spawn interface or `fork_turns: "none"` where available. Check the exposed tool schema before dispatching.
36
46
  - `spawn_agent` calls already run concurrently with your turn, so `run_in_background: true` has no separate flag. Issue the dispatch and continue.
47
+ - `spawn_agent` may expose `model` and `reasoning_effort` independently, or neither, so check the exposed schema before resolving either, and pass each only when the schema has it. Without `reasoning_effort`, skip the effort steps below and say that the dispatch set no level; the child runs at whatever effort the host gives it. Without `model`, the Model names substitutions below cannot reach that spawn, so say so instead of claiming a distinct model.
37
48
  - For `session`, run `node <poteto-mode-dir>/scripts/codex-session-effort.mjs` before dispatching, with `<poteto-mode-dir>` resolved to this skill's directory. The [helper](../scripts/codex-session-effort.mjs) reads the active turn's effort from the exact runtime log identified by `CODEX_THREAD_ID`, under `$CODEX_HOME/sessions` (default `~/.codex/sessions`). It prints only the effort. Run it again on each turn; a UI effort change must not reuse the previous turn's value.
38
49
  - The helper finds the current log through `threads.rollout_path` in `$CODEX_HOME/state_*.sqlite`, or a single `-<thread-id>.jsonl` log when no indexed path is available and no replacement exists; anything else makes effort unavailable.
39
50
  - Apply poteto-mode's task adjustment to that starting level, or to the explicit role/default effort, then pass the final level as `reasoning_effort` on `spawn_agent`, including when a model is selected explicitly. An omitted effort can use a configured subagent effort or, when a model is selected, that model's default instead of the parent's level.
@@ -50,7 +61,7 @@ Skills name Claude defaults (a single-role default for code/prose/judgment, a wo
50
61
  - Single-model roles: your primary Codex model (for example `gpt-6.2-sol`).
51
62
  - Roles that default to the Claude worker model (`feature, refactoring`): your fast Codex code model (for example `gpt-6.2-sol`).
52
63
  - Roles that default to the strongest Claude model (`strongest judgment`): your strongest Codex model (for example `gpt-6.2-astra`).
53
- - Diverse-model panels (`arena`, `interrogate`): the adversarial signal comes from model diversity, so use the distinct Codex models available to you. A good default panel on ChatGPT is `gpt-6.2-astra`, `gpt-6.2-sol`, `gpt-6.1-terra`, `gpt-6-luna`. If only one model family is reachable, vary reasoning effort and note in the verdict that diversity was reduced.
64
+ - Diverse-model panels (`arena`, `interrogate`): the adversarial signal comes from model diversity, so use the distinct Codex models available to you. A good default panel on ChatGPT is `gpt-6.2-astra`, `gpt-6.2-sol`, `gpt-6.1-terra`, `gpt-6-luna`. If only one model family is reachable, or `spawn_agent` exposes no `model` field, vary reasoning effort where the schema has `reasoning_effort`, and note in the verdict that diversity was reduced.
54
65
 
55
66
  `/setup-pstack` writes the configured model list. On Codex, set it to your Codex model slugs.
56
67
 
@@ -89,7 +100,7 @@ Affected skill entry points point here. Most skills need only the tables above.
89
100
  | `babysit` | `loop` and `AskUserQuestion` resolve through the tables above. |
90
101
  | `automate-me` | `plugin-dev:skill-development` resolves through the skills table above. |
91
102
  | `architect` | A large or contested design goes through the **arena** skill, so its `spawn_agent` fan-out and model substitution apply here too. |
92
- | `arena` | The parallel candidates and the cross-judge map to `spawn_agent`; substitute your configured Codex models for the runners and the cross-judge pool (see Model names above). |
103
+ | `arena` | The parallel candidates and the cross-judge map to `spawn_agent`; substitute your configured Codex models for the runners and the cross-judge pool (see Model names above). Run Phase C only when the effective judge and provisional winner are known to be different families. If the judge's family is unknown or repeats the winner's family, report the skipped cross-family check and continue with Phase D scoring. |
93
104
  | `how` | The one read-only subagent maps to `spawn_agent`. |
94
105
  | `reflect` | The transcript finder reads Claude Code's layout under `${CLAUDE_CONFIG_DIR:-$HOME/.claude}/projects/`, so work from the conversation in your context, as the skill allows when the finder finds nothing. For a pstack skill, never edit the installed plugin under `${CODEX_HOME:-~/.codex}/plugins/cache/`. Codex does not discover `.claude/skills/` or Claude Code's personal skills folder, so before approval show the destination in Codex's skill folders, and after approval copy the skill folder there: the repository's `.agents/skills/<skill>/` for a project copy, or `${CODEX_HOME:-~/.codex}/skills/<skill>/` for a personal one. In a skills-only install `~/.agents/skills/<skill>` is a link into a pstack checkout, so do not copy to or edit through it. Edit a project or personal skill where it already lives. Codex lists the plugin's copy as `pstack:<skill>` and the edited copy as `<skill>`, both enabled, and does not merge them. |
95
106
  | `recall` | Search this workspace's Codex rollouts (see Tool actions). Do not list or read `${CLAUDE_CONFIG_DIR:-$HOME/.claude}/projects/`. It holds Claude Code transcripts, not this session's history. In a rollout, chat messages are the `response_item` records whose `payload.type` is `message`, with the speaker in `payload.role`. Skip `developer` records, which are injected instructions. |
@@ -55,4 +55,4 @@ Role defaults, stamped from `plugins/pstack/models.json` (edit there, rerun `too
55
55
 
56
56
  ## Reasoning effort
57
57
 
58
- A role value in the override sheet may name a reasoning effort after its model, as in `opus @xhigh`. Levels on Claude Code: `low`, `medium`, `high`, `xhigh`, `max`. Which ones apply depends on the model. A value without `@` takes the sheet's `default effort` line, a level or `session`, and `session` when the sheet has no such line. On Claude Code, `session` sets no effort. On other runtimes, follow the platform mapping for `session`. Strip the suffix before reading the model: `inherit-parent` or `auto` still omits `model` at every level, and a model name is passed as `model`. Pass the level as the dispatch's effort field and keep the `subagent_type` you would otherwise use. That is `effort` on the Claude Code `Agent` call and `reasoning_effort` on Codex's `spawn_agent`. On Muse it is `effort` on a Workflow child; a `subagent_spawn` dispatch keeps the session's effort.
58
+ A role value in the override sheet may name a reasoning effort after its model, as in `opus @xhigh`. Levels on Claude Code: `low`, `medium`, `high`, `xhigh`, `max`. Which ones apply depends on the model. A value without `@` takes the sheet's `default effort` line, a level or `session`, and `session` when the sheet has no such line. On Claude Code, `session` sets no effort. On other runtimes, follow the platform mapping for `session`. Strip the suffix before reading the model: `inherit-parent` or `auto` still omits `model` at every level, and a model name is passed as `model`. Pass the level as the dispatch's effort field and keep the `subagent_type` you would otherwise use. That is `effort` on the Claude Code `Agent` call and `reasoning_effort` on Codex's `spawn_agent`. On Codex, pass `model` and `reasoning_effort` only as the platform mapping's schema check allows. On Muse it is `effort` on a Workflow child; a `subagent_spawn` dispatch keeps the session's effort.
@@ -37,4 +37,4 @@ Role defaults, stamped from `plugins/pstack/models.json` (edit there, rerun `too
37
37
 
38
38
  ## Reasoning effort
39
39
 
40
- A role value in the override sheet may name a reasoning effort after its model, as in `opus @xhigh`. Levels on Claude Code: `low`, `medium`, `high`, `xhigh`, `max`. Which ones apply depends on the model. A value without `@` takes the sheet's `default effort` line, a level or `session`, and `session` when the sheet has no such line. On Claude Code, `session` sets no effort. On other runtimes, follow the platform mapping for `session`. Strip the suffix before reading the model: `inherit-parent` or `auto` still omits `model` at every level, and a model name is passed as `model`. Pass the level as the dispatch's effort field and keep the `subagent_type` you would otherwise use. That is `effort` on the Claude Code `Agent` call and `reasoning_effort` on Codex's `spawn_agent`. On Muse it is `effort` on a Workflow child; a `subagent_spawn` dispatch keeps the session's effort.
40
+ A role value in the override sheet may name a reasoning effort after its model, as in `opus @xhigh`. Levels on Claude Code: `low`, `medium`, `high`, `xhigh`, `max`. Which ones apply depends on the model. A value without `@` takes the sheet's `default effort` line, a level or `session`, and `session` when the sheet has no such line. On Claude Code, `session` sets no effort. On other runtimes, follow the platform mapping for `session`. Strip the suffix before reading the model: `inherit-parent` or `auto` still omits `model` at every level, and a model name is passed as `model`. Pass the level as the dispatch's effort field and keep the `subagent_type` you would otherwise use. That is `effort` on the Claude Code `Agent` call and `reasoning_effort` on Codex's `spawn_agent`. On Codex, pass `model` and `reasoning_effort` only as the platform mapping's schema check allows. On Muse it is `effort` on a Workflow child; a `subagent_spawn` dispatch keeps the session's effort.