Skip to content

fix(pstack): preload poteto-mode in Claude poteto-agent (#49) - #114

Merged
mergify[bot] merged 5 commits into
mainfrom
fix/issue-49-poteto-preload
Oct 5, 2026
Merged

mergify[bot] merged 5 commits into
mainfrom
fix/issue-49-poteto-preload

Conversation

@ericlitman

@ericlitman ericlitman commented Oct 3, 2026 •

Copy link
Copy Markdown
Owner

Closes #49

What changed

This PR lands the change from closed PR #50 by @RomiSinghio (approved 2026-09-08), rebased on current main. Romi Singh is the author of commit 653fb7f.

  • plugins/pstack/agents/poteto-agent.md preloads pstack:poteto-mode through Claude Code's skills frontmatter. The shared skill tree and the Codex path do not change.
  • tests/skill-collision-repro.sh adds a static invariant that fails if the preload binding disappears. It also adds a live check: the packaged poteto-agent must name the first Core principle (Laziness Protocol) without Skill or file reads.
  • CHANGES.md, NOTICE.md and docs/reference.md record the port edit, as in fix(pstack): preload poteto-mode in Claude agent #50.

One addition to #50 (commit 39828ef): the live check's claude call ends in || true. This applies the LOW finding from #50's review. Under set -e, a failing CLI aborted the script before check printed the error.

Greptile review: P2 "Preload check can pass without preload" is not acted on. The point is valid: the child could read SKILL.md instead of using the preload, and the marker check would still pass. #49's acceptance gate is the installed-candidate live run, and that run must show no Read or Skill call in the child transcript. The script check stays as #50 wrote it.

Verification

  • Bun tests, strict typecheck, static invariants, and plugin validation pass.
  • The exact candidate is installed in every affected harness.
  • The changed behavior passes from each real user surface.
  • The installed version, action, and observed result appear below.

Local gate on 0c1263b (main merged in): bun install --frozen-lockfile, bun run test, bun run typecheck, manifest JSON parse, PSTACK_STATIC_ONLY=1 bash tests/skill-collision-repro.sh, claude plugin validate plugins/pstack and claude plugin validate . all exit 0. Negative check: with - pstack:poteto-mode deleted, the static run prints FAIL: Claude poteto-agent does not preload poteto-mode.

Live evidence: an agent ran verify.sh run --pr 114 --feature claude:agent-preload:poteto-agent from this PR's head 0c1263b. That is the targeted check from #138 (PR #139). The verifier exited 0 and set live-gate=success with this evidence comment. It ran three sessions:

  • claude/agent-preload:poteto-agent (Claude Code 2.1.289, candidate via --plugin-dir). The parent dispatched pstack:poteto-agent. The child made no tool calls, and its own reply named Laziness Protocol. The assertions were exit-0 agent-dispatched child-no-tools principle-named.
  • project-skill in Claude Code and in Codex CLI 0.160.0. These are required because this PR edits tests/skill-collision-repro.sh.

Before #139 merged, the same check failed against main 2c19967, which has no preload. It failed with principle-missing:Laziness Protocol: the child said poteto-mode was not preloaded.

🤖 Generated with Claude Code

RomiSinghio and others added 2 commits October 3, 2026 08:36
Reapplies closed PR #50 by @RomiSinghio, approved 2026-09-08, on current main.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Applies the non-blocking finding from the PR #50 review: under set -e a failing
claude run aborted the script before check printed its output.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@mergify

mergify Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Merge Protections

🟢 All 2 merge protections satisfied — ready to merge.

Show 2 satisfied protections

🟢 Queue ready pull requests

Automatically queue non-draft pull requests targeting main after verify, Unfret, and live-gate pass on the head.

  • -draft
  • check-success=Unfret
  • check-success=live-gate
  • check-success=verify

🟢 🚦 Auto-queue

When all merge protections are satisfied and these conditions match, this pull request will be queued automatically.

  • -files~=^\.github/
  • base = main

@greptile-apps

greptile-apps Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium risk] Adds skill preloading to a subagent definition.

The PR appears safe to merge with the live script check's accepted limitation.

Summary

Claude Code now preloads pstack:poteto-mode for the poteto-agent, so the child starts with the skill in its own context. The PR adds static and live checks for that behavior and updates the port documentation.

  • Keeps the preload attached to the Claude agent, without changing the shared skill tree or Codex path.
  • Checks both the frontmatter binding and the child’s answer from the packaged agent.

Reviews (2) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..."

Comment thread tests/skill-collision-repro.sh Resolved
andrewfree pushed a commit to andrewfree/open-pstack that referenced this pull request Oct 4, 2026
…clitman#134)

NOTICE.md, README-UPSTREAM.md and the two preserved upstream license files
ship nowhere; both marketplaces ship only ./plugins/pstack. Unmapped, they
blocked any PR or upstream sync that edits them (first seen on ericlitman#114).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@ericlitman

Copy link
Copy Markdown
Owner Author

Live evidence: Open Pstack

  • Candidate SHA: 0c1263bfe6d414ec8dc79e539c6882dd352a4791
  • Base SHA: a03414a03d1c02a1ff904481944104d3890875f0
  • Result: PASSED — named features verified
  • Self-test: not requested
  • Publisher revision: 0c1263bfe6d414ec8dc79e539c6882dd352a4791
  • Evidence-set SHA-256: 4a01c4df81a7d2d404f858c629d0e81d08c628fe9b42c88d74f2a1c7b59ee455
  • Installation (claude): CLI 2.1.289 (Claude Code), plugin 1.5.0, candidate 0c1263bfe6d414ec8dc79e539c6882dd352a4791, tree 84479114bb3e7cba5114fa75415a4c648e27099eefb6ce47e4c514fb6a057b28.
  • Installation (codex): CLI codex-cli 0.160.0, plugin 1.5.0, candidate 0c1263bfe6d414ec8dc79e539c6882dd352a4791, tree 84479114bb3e7cba5114fa75415a4c648e27099eefb6ce47e4c514fb6a057b28.
  • Observation (claude / agent-preload:poteto-agent): surface claude -p stream-json with the candidate plugin-dir; action recipe agent-preload:poteto-agent: dispatch; result passed: dispatch:exit-0 dispatch:agent-dispatched dispatch:child-no-tools dispatch:principle-named; 4 assertions machine-checked; transcript SHA-256 dfaf1b627daadfc72b828f8b4d42d7ade2e5d83e66158e221a0ed1d60913f246; artifact-set SHA-256 1815080939c09364f8d539d950ec70abd302e4aaa8336dd82690245ed594bbc4.
  • Observation (claude / project-skill): surface claude -p stream-json with the candidate plugin-dir; action recipe project-skill: doctor; result passed: doctor:exit-0 doctor:skill-loaded doctor:doctor-ran doctor:doctor-canonical-pass; 4 assertions machine-checked; transcript SHA-256 0324b3daf57640618ebab6e00cd1dd4e38596df794fd7a5dc49e42793012e00a; artifact-set SHA-256 d47f9beb873ac77e7c215dd8d20edfec55d2670ac6792c6df3b7e823ad269829.
  • Observation (codex / project-skill): surface codex exec --json with the run-owned candidate installation; action recipe project-skill: doctor; result passed: doctor:exit-0 doctor:skill-loaded doctor:doctor-ran doctor:doctor-canonical-pass; 4 assertions machine-checked; transcript SHA-256 a36889f3f5621a4a893a0fc04e0584c0bd204557d59fadbdb86f7c410530fe69; artifact-set SHA-256 22066189150578e0ca4a9cfa0e5def9bb743a7413c75a2b0d4f6740c882926d9.
  • Policy: every new head requires a fresh run; this verifier does not change PR state, queue, or merge.

@ericlitman
ericlitman marked this pull request as ready for review October 5, 2026 03:31
@unfret-eal

unfret-eal Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

✅ Accepted risk

Accepted by ericlitman: GH-49 (authority 48fa77b)

🟡 Medium · Candidate run does not disable the installed pstack plugin

Advisories (2)
  • Behavioral preload check can false-pass
    Not blocking because: Discarding the exit status can mislabel this supplemental smoke run as successful. The live block is excluded from CI, and the independent live verifier supplies the actual dispatch and child-behavior acceptance checks rather than consuming this marker result.
  • Marker-only assertion permits a fallback file read
    Not blocking because: The confirmed consequence is an overpermissive supplemental smoke-test result. CI skips this live block, and the separate live-verification recipe rejects child tool calls and checks the child's own reply, so this assertion does not replace the acceptance check.
Details

Run: GET /unfret/run/panel:0c1263bfe6d414ec8dc79e539c6882dd352a4791:FkQgblDV6h7:SnIPV3AYblE.

@unfret review · @unfret status · @unfret help

@unfret-eal unfret-eal Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛑 1 blocking finding
🟡 Medium · Candidate run does not disable the installed pstack plugin
Check

preloaded_agent_output="$(
claude -p \
'Use the Agent tool once with subagent_type pstack:poteto-agent. Give it this task verbatim: "Without invoking Skill or reading files, reply with the first Core principle named in the preloaded poteto-mode skill." Return only the child response.' \
--plugin-dir "$plugin" \

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Medium · Candidate run does not disable the installed pstack plugin

When the operator already has pstack@open-pstack enabled, this invocation loads the checkout with --plugin-dir without the required session-only setting that disables the installed copy. Claude may reject the duplicate namespace or resolve pstack:poteto-agent from the installed revision, causing the check either to fail spuriously or validate something other than the candidate.

@ericlitman

Copy link
Copy Markdown
Owner Author

Unfret waiver for head 0c1263b. Ticket GH-49 is GitHub issue #49.

Finding Class Basis
Candidate run does not disable the installed pstack plugin inert The finding is about the live block in tests/skill-collision-repro.sh, which an operator runs by hand. CI runs that script with PSTACK_STATIC_ONLY=1 (.github/workflows/ci.yml:34), which exits before the live block, so it gates nothing. The merge gate is live-gate, published by the verifier. The verifier launches Claude with --settings '{"enabledPlugins":{"pstack@open-pstack":false}}' (.claude/skills/verify-open-pstack/scripts/harness.ts:17). On this head the verifier's agent-preload:poteto-agent check passed against the candidate with that setting.

@mergify

mergify Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-10-05 03:43 UTC · Rule: default · triggered by merge protections
  • ✅ Checks skipped · PR is already up-to-date
  • ✅ Merged — 2026-10-05 03:43 UTC · at 1b03678171f6f400ae2cc9dc4e7a4a6a13e4bb43 · merge

This pull request spent 11 seconds in the queue, including 2 seconds running CI.

Required conditions to merge
  • github-review-approved [🛡 GitHub repository ruleset rule Protect main]
  • all of [🛡 Merge Protections rule Queue ready pull requests]:
  • any of [🛡 GitHub repository ruleset rule Protect main]:
    • check-success = @github-actions/verify
    • check-neutral = @github-actions/verify
    • check-skipped = @github-actions/verify
  • any of [🛡 GitHub repository ruleset rule Protect main]:
    • check-success = live-gate
    • check-neutral = live-gate
    • check-skipped = live-gate
  • any of [🛡 GitHub repository ruleset rule Review gate]:
    • check-success = @unfret-eal/Unfret
    • check-neutral = @unfret-eal/Unfret
    • check-skipped = @unfret-eal/Unfret

@mergify
mergify Bot merged commit 1b03678 into main Oct 5, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Preload poteto-mode in the Claude poteto-agent

2 participants