Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"name": "t3-pstack",
"source": "./plugins/pstack",
"description": "pstack for T3 Code: rigorous agent workflows whose panels and fan-outs run across model families through T3. Original pstack by Lauren Tan (poteto).",
"version": "2.2.5"
"version": "2.2.6"
}
]
}
21 changes: 21 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,27 @@

This file is the release changelog, with one `## <version> - <title>` entry per release, newest first. The Cursor-to-T3 rewrite rules live in [`tools/substitutions.json`](tools/substitutions.json), and the [sync boundary](CONTRIBUTING.md#the-sync-boundary) in `CONTRIBUTING.md` defines how a change to upstream's skill content is declared.

## 2.2.6 - Writing delegates get T3's worktree isolation, PR owners are child tasks, and a child is a leaf

**A writing child gets T3's worktree isolation ([#50](https://github.com/chhoumann/t3-pstack/issues/50)).** poteto-mode's Dispatch on T3 told the parent to make each writing child's worktree itself, with `git worktree add` from `HEAD`, and to remove it and its branch after the result. No T3 thread is bound to such a worktree. As #50 reports, T3's cleanup therefore never reaches it, and a run that stops early leaves it behind. The child's commits also stayed on a branch no thread owned, so the PR came from that branch while the thread's own branch stayed empty. A writer now gets `delegate_task`'s `isolation: "worktree"`, and T3 makes its worktree and branch from the thread checkout's `HEAD` commit. One writer may instead stay in the parent's checkout while the parent writes nothing. The brief asks the child to end its reply with its branch and commit, because T3 can rename that branch during the run and `task_status` does not report it. The parent then brings the commits onto its own branch with `git merge`, and a PR opens only from a T3 thread's branch. `delegate_task` refuses the worktree with `Unable to resolve the parent checkout commit` when the thread's project is not a git checkout or has no commit yet. So the rule says to commit first in a repo with no commit. It keeps `git worktree add` for a thread whose project is not a git checkout, for work that lives in a checkout other than the thread's own, and for a child whose worktree gets uncommitted changes copied in, as interrogate's adversaries do, because isolation leaves those changes out. Isolation always starts at the parent's `HEAD`. So a child that must start from another commit, such as a PR head or fresh trunk, gets its own worktree even when it only reads, and its first step is `git fetch` and `git reset --hard` of its own branch to that commit. That covers a Shipping verifier, which also names the commit in its verdict, an Autopilot-full owner, and a swarm worker on another branch, and none of them moves the parent's checkout. A child sent into a worktree it does not own, such as a finished Orchestrate worker's, runs shared with that path as the only place it writes and runs its commands. A child ends its reply with its path, branch, and commit, which is how an arena candidate in an isolated worktree reports its output location, since the parent cannot name it at spawn. swarm, arena, Orchestrate, Shipping, Feature step 4, and Opening a PR point at the same rule.

These runs used T3 0.1.8-nightly.20261106 on macOS, with throwaway repositories and threads that are deleted since:

- From a thread whose project is not a git checkout, `delegate_task` with `isolation: "worktree"` failed with `invalid_request: Unable to resolve the parent checkout commit.`
- From a thread in a git repository with no commit, the same call failed with the same message. After one commit it succeeded, and the child ran in a worktree under `~/.t3/worktrees/<repo>/`.
- A thread in a T3 worktree made a local commit and left one file uncommitted. Its worktree child started at that commit without the file, committed, and its branch showed in the parent's checkout. `git merge --ff-only` brought the commit onto the parent's branch. The child's branch was `t3/3098eef5` at its first command and `scripted-git-test` after its commit, and `task_status` had no branch field. A `shared` child committed straight onto the parent's branch.
- A thread on a local `feature` branch, behind an origin whose `main` and `pr-head` had moved since it cloned, started two worktree children. Both began at the parent's `feature` commit. One ran `git fetch origin main` and `git reset --hard origin/main`, landed on the new trunk commit the parent had never fetched, and committed on top. The other lacked the PR head commit until `git fetch origin pr-head`, and then `git reset --hard <sha>` put it on exactly that commit. The parent's checkout stayed on its commit and clean, and T3 renamed both children's branches during the run.

**Autopilot-full's PR owners are child tasks ([#47](https://github.com/chhoumann/t3-pstack/pull/47)).** Each PR owner was a top-level thread that `t3_thread_launch` started. T3's own instructions reserve `t3_thread_launch` for a new thread the user asks for, and a top-level thread is out of reach of `task_status` and `task_cancel`, which the root's audit uses to probe and replace a stuck agent. Each owner is now a `delegate_task` child with `isolation: "worktree"` that resets its own branch to fresh trunk before it writes, so it opens its PR from its own thread's branch whatever the root has checked out. Its brief names the playbook and the root's thread ID, so it still reports each head with `t3_thread_send`, and it lets the owner delegate as the playbooks say. T3 tells a child that it never watches a PR, and a child's own T3 server offers it no `watch_pull_request`, so the owner babysits in `drive` mode and reports a wait for a person to the root, which watches that PR. A worktree child's `t3_thread_send` to its parent started a new run in the parent before the child's completion arrived. This redoes the T3 part of @pb3975's #47 as substitutions. Its rule that each review round is a fresh `delegate_task` is left out, because Lauren's "Fresh subagents by default" and T3's own instructions already say so.

**A `delegate_task` child is a leaf ([#21](https://github.com/chhoumann/t3-pstack/issues/21)).** The session-start routing text told every session, children included, "This chat runs the playbook itself. A step it says to delegate goes through `delegate_task`". So a child whose task met a routing trigger ran the playbook and started children of its own. The routing text and Dispatch on T3 now say that a `delegate_task` child is a leaf, which does the work itself and starts no subagent unless its brief names one. Autopilot-full's owner brief lifts that, as above. In this Mac's T3 store, 6 of the 456 `delegate_task` children started before 2026-10-30 started children their brief did not ask for, and one design child started 8. Since 2026-10-30, T3 itself tells each session "If you are a subagent or child, do the work yourself. Start no subagents unless your task says to.", which all 14 T3 Codex sessions since then carry, and none of the 32 children since then started a child unasked. The new line ends the routing text's contradiction of that rule. No grandchild in the store started children, so the five-level nesting that #21 reports from 2.0.0-rc.3 did not recur here.

**Not in this release ([#19](https://github.com/chhoumann/t3-pstack/issues/19)).** #19 asks the parent to settle each child's thread after reading its result, so that finished children stop filling the sidebar. On T3 0.1.8-nightly.20261106 the sidebar leaves out every thread whose lineage has `relationshipToParent: "subagent"`, which every `delegate_task` child has. So a finished child never shows there, settled or not, though 842 child threads on this Mac are unsettled.

This release syncs nothing from Lauren's pstack, so all three components stay pinned at cursor/plugins `c742dd6`. At that pin each component's dry run reports no undeclared fork and no substitution that matches nothing, and each fork changes as many lines as before. Neither hooks file changes. This is a patch release, and no setting or workflow has to change. On Codex, run `npx -y github:chhoumann/t3-pstack update` after it, as after every release.

Thanks to @phob for #50, @Sunsilkk for #21, @harepus for #19, and @pb3975 for #47.

## 2.2.5 - The installer pins each Codex home to the release tag, so Codex's own updates no longer turn the hook off

On Codex 0.164 and later, a plugin hook's trust covers every file in the installed plugin, as 2.2.3 described. Each time a Codex app-server starts, such as the one T3 runs, Codex's marketplace auto-upgrade moved each home's `t3-pstack` marketplace to the latest commit on `main` and reinstalled the plugin from it. So each release, and each other commit that changed the plugin's files, turned the session-start hook off with `plugin contents changed; hook approval required` until someone reran the installer. 2.2.3 left this as it was.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ npx -y github:chhoumann/t3-pstack update
npx -y github:chhoumann/t3-pstack doctor
```

`npx -y github:chhoumann/t3-pstack` runs the installer from the latest commit on `main`. Each Claude Code home's marketplace auto-updates from `main` too, and each Codex home's marketplace stays on the release tag the installer pinned. To run one release's installer, name its tag, as in `npx -y github:chhoumann/t3-pstack#v2.2.5 doctor`.
`npx -y github:chhoumann/t3-pstack` runs the installer from the latest commit on `main`. Each Claude Code home's marketplace auto-updates from `main` too, and each Codex home's marketplace stays on the release tag the installer pinned. To run one release's installer, name its tag, as in `npx -y github:chhoumann/t3-pstack#v2.2.6 doctor`.

`install` and `update` are the same command, and a second run changes nothing. With Node 20 or later, it installs or updates the `t3-pstack@t3-pstack` plugin in every Claude Code and Codex config home T3 can run: `~/.claude` and `~/.codex`, `$CLAUDE_CONFIG_DIR` and `$CODEX_HOME`, and the home of each `claudeAgent` and `codex` instance in T3's settings, disabled ones included. Name any other home with `--claude-home <dir>` or `--codex-home <dir>`. Each home's `t3-pstack` marketplace must come from `chhoumann/t3-pstack`, or from `--source <owner/repo|git URL|dir>` on the same run, and a home whose marketplace has another source is left as it is. A run never switches a home's source, so a home already on `chhoumann/t3-pstack` stays on it under another `--source`, and `doctor` warns and prints the commands that move it. A local directory needs a path such as `./t3-pstack`, since `owner/repo` always means GitHub. On Codex it also trusts t3-pstack's session-start hook, once its hooks file is the one this release pins. Codex runs a plugin's hook only once it is trusted, and T3's Codex sessions never ask, so without this step the hook never runs. Codex 0.164 and later tie that trust to every file in the installed plugin, so each release turns the hook off until the installer trusts it again. So the installer pins each Codex home's `t3-pstack` marketplace to the release's tag, such as `v2.2.5`, and Codex's own auto-upgrade leaves that tag where it is. A release reaches a Codex home only when `update` runs, and that run trusts the hook again. A local directory has no tag, so a marketplace from one stays unpinned. Run `update` after each release.
`install` and `update` are the same command, and a second run changes nothing. With Node 20 or later, it installs or updates the `t3-pstack@t3-pstack` plugin in every Claude Code and Codex config home T3 can run: `~/.claude` and `~/.codex`, `$CLAUDE_CONFIG_DIR` and `$CODEX_HOME`, and the home of each `claudeAgent` and `codex` instance in T3's settings, disabled ones included. Name any other home with `--claude-home <dir>` or `--codex-home <dir>`. Each home's `t3-pstack` marketplace must come from `chhoumann/t3-pstack`, or from `--source <owner/repo|git URL|dir>` on the same run, and a home whose marketplace has another source is left as it is. A run never switches a home's source, so a home already on `chhoumann/t3-pstack` stays on it under another `--source`, and `doctor` warns and prints the commands that move it. A local directory needs a path such as `./t3-pstack`, since `owner/repo` always means GitHub. On Codex it also trusts t3-pstack's session-start hook, once its hooks file is the one this release pins. Codex runs a plugin's hook only once it is trusted, and T3's Codex sessions never ask, so without this step the hook never runs. Codex 0.164 and later tie that trust to every file in the installed plugin, so each release turns the hook off until the installer trusts it again. So the installer pins each Codex home's `t3-pstack` marketplace to the release's tag, such as `v2.2.6`, and Codex's own auto-upgrade leaves that tag where it is. A release reaches a Codex home only when `update` runs, and that run trusts the hook again. A local directory has no tag, so a marketplace from one stays unpinned. Run `update` after each release.

`doctor` reports on the same homes and changes nothing itself: each marketplace's source, each Codex marketplace's pin, the installed version, whether its files are all there, whether it is enabled, the Codex hook's trust, Claude Code records that pin an old version, plain copies of the plugin's skills, and the model sheet. It exits 1 on any problem and prints a fix for each.

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.2.5
2.2.6
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "t3-pstack",
"private": true,
"version": "2.2.5",
"version": "2.2.6",
"description": "The installer and development tooling for t3-pstack, Lauren Tan's pstack rewritten in place for T3 Code. The plugin itself lives in plugins/pstack.",
"author": {
"name": "Christian Bager Bach Houmann",
Expand Down
2 changes: 1 addition & 1 deletion plugins/pstack/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "t3-pstack",
"displayName": "t3-pstack (pstack for T3 Code)",
"version": "2.2.5",
"version": "2.2.6",
"description": "pstack for T3 Code: Lauren Tan's pstack with its Cursor mechanics rewritten in place for T3, so subagents, panels, schedules, and PR watches dispatch through T3's orchestration and panels mix Claude, GPT, and Grok.",
"author": {
"name": "Christian Bager Bach Houmann",
Expand Down
2 changes: 1 addition & 1 deletion plugins/pstack/.codex-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "t3-pstack",
"version": "2.2.5",
"version": "2.2.6",
"description": "pstack for T3 Code on a Codex host: Lauren Tan's pstack with its Cursor mechanics rewritten in place for T3, so subagents, panels, schedules, and PR watches dispatch through T3's orchestration.",
"author": {
"name": "Christian Bager Bach Houmann",
Expand Down
2 changes: 1 addition & 1 deletion plugins/pstack/hooks/session-start-context.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ It routes to the right pstack skill from there. On Codex, open its SKILL.md whol

When the intent is already specific, such as TDD, a design sketch, how or why something works, an arena, or an adversarial review, still enter through `t3-pstack:poteto-mode` and open that skill from the bundled path it names. The other pstack skills run only from poteto-mode or when the user types them.

This runs on T3: before the first subagent or panel in a session, read the model sheet, `~/.config/t3-pstack/models.md` (`$XDG_CONFIG_HOME/t3-pstack/models.md` when that is set), or `t3-pstack-models.md` in this host's config directory when that file is missing. This chat runs the playbook itself. A step it says to delegate goes through `delegate_task` to that role's sheet entry, and the reply lists which provider and model ran each step.
This runs on T3: before the first subagent or panel in a session, read the model sheet, `~/.config/t3-pstack/models.md` (`$XDG_CONFIG_HOME/t3-pstack/models.md` when that is set), or `t3-pstack-models.md` in this host's config directory when that file is missing. This chat runs the playbook itself. A step it says to delegate goes through `delegate_task` to that role's sheet entry, and the reply lists which provider and model ran each step. A `delegate_task` child is a leaf instead. It does the work itself and starts no subagent unless its brief names one.

User instructions (CLAUDE.md, AGENTS.md, direct requests) take precedence. Other session-start mandates, such as superpowers, still apply. Their skill checks run as before, and when a task meets the criteria above they route implementation through poteto-mode.
</EXTREMELY_IMPORTANT>
2 changes: 1 addition & 1 deletion plugins/pstack/skills/arena/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
name: arena
description: "Spawn N parallel candidates at the same task, pick a base, graft the strongest parts of the losers into it. Use for /arena, 'arena this', 'throw it in the arena', or when one attempt at a non-trivial artifact would lock in the wrong shape."
Expand All @@ -15,7 +15,7 @@
1. State the artifact each candidate is producing.
2. Derive the rubric, 3-6 concrete gradeable criteria for what success looks like on *this* task. It is the picker's tool in Phase D. Candidates only see the task.
3. Pick the runners. Use the `arena runners` line in the model sheet. If the sheet or that line is missing, run one each on the defaults in [Models](#models). An `auto` or `inherit-parent` entry in this line means the parent model, so omit `target` for it. If `delegate_task` rejects a configured entry, run that seat on another target of the same family from `orchestrator_capabilities` and say so. A model's family is the first segment of its ID's last `/` part, such as `claude`, `gpt`, or `grok`, whatever provider instance serves it. If the family has no other target, or `delegate_task` rejects that one too, drop the seat and say so. If dropped seats leave fewer than two runners, add runners until there are two, or one when the line has one entry. Run each added runner on a remaining runner's model, or omit `target` so it runs on the parent model when none remain, and say so. Spawn more runners when the arena covers multiple design directions. Use the same model N times when the work is generation-bound rather than judgment-sensitive. Pick each subagent's reasoning level and fast or standard speed for the job, per the Subagents section of the **poteto-mode** skill.
4. Give each candidate its own output location (a git worktree where possible, otherwise `/tmp/arena-<slug>/candidate-<n>/`), per the **separate-before-serializing-shared-state** principle skill.
4. Give each candidate its own output location (a git worktree where possible, otherwise `/tmp/arena-<slug>/candidate-<n>/`), per the **separate-before-serializing-shared-state** principle skill. On T3 that worktree comes from `isolation: "worktree"`, or from `git worktree add` where poteto-mode's Dispatch on T3 says so. T3 makes an isolated worktree only once the candidate starts, so its brief names its own worktree as its output location, and its reply names the path.

## Phase B: Fan out

Expand Down
Loading
Loading