Skip to content

fix(sandbox): hand Pi its instructions on the command line - #5495

Open
yannickmonney wants to merge 1 commit into
mainfrom
fix/pi-instructions-argument
Open

yannickmonney wants to merge 1 commit into
mainfrom
fix/pi-instructions-argument

Conversation

@yannickmonney

Copy link
Copy Markdown
Contributor

The Pi wrapper stages the platform's instructions outside Pi's config dir and names the file with --append-system-prompt, so the append Pi uses is exactly the platform's. The text stays off argv, and a resumed turn reads the current exec's instructions. The harness comments, the sandbox runtime README and the wrapper's automation row now describe it.

How it was verified

  • With the pinned Pi 1.0.1 run through the wrapper against a loopback model, on a fresh turn and on a resumed one whose instructions changed, every model request carried the exec's instructions.
  • harness-wrapper-exec.test.ts checks the file the command line names, on a fresh and a resumed turn, and that no flag is passed when a turn carries no instructions. The first two cases fail against the previous wrapper.
  • The image check now asserts the exec's instructions in every model request.
  • Locally green: the daemon suite (a first run hit an unrelated flake in process-reaper.test.ts, which passes alone and on the rerun), the platform's harness tests, typecheck and lint of both workspaces, oxfmt, ruff, opengrep and lint:manual.

The Pi wrapper staged the platform's instructions in Pi's config dir
for Pi to discover there. It now stages them outside that dir and
names the file with --append-system-prompt, so the append Pi uses is
exactly the platform's. The text stays off argv, and a resumed turn
reads the current exec's instructions.

Observed with the pinned Pi 1.0.1 against a loopback model, on a fresh
turn and a resumed one whose instructions changed. The wrapper test
checks the file the command line names, and the image check asserts
the exec's instructions in every model request.
@yannickmonney
yannickmonney enabled auto-merge (squash) November 23, 2026 08:03
auto-merge was automatically disabled November 23, 2026 10:34

Pull request was closed

@yannickmonney yannickmonney reopened this Nov 23, 2026
@yannickmonney
yannickmonney enabled auto-merge (squash) November 23, 2026 10:34

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant