fix(buzz-acp): deliver complete Pi system prompts - #7500
Conversation
Signed-off-by: Salman Mohammed <smohammed@squareup.com>
🔐 Codex Security Review
|
|
🤖 Review: changes required
Verification: I inspected the complete diff and Pi restore path, and ran the full |
|
doesn't look like a clean solution so closing it |
Summary
Managed Pi agents now receive Buzz's complete, framed system prompt:
<base>,<agent-instructions>, fetched<core-memory>, and any team, huddle, or canvas instructions. Their first ordinary user message starts with<context>through the existing system-prompt capability gate. Other adapters keep their existing transport and fallback behavior.Each Pi adapter owns a private launcher. Session creation writes one immutable prompt file; subprocess restoration selects that same file by Pi's session ID. This prevents concurrent sessions from sharing memory and preserves the prompt through reload. Session invalidation removes the files. Native launch and snapshot failures propagate instead of silently using an incomplete prompt.
Install the updated harness and restart managed Pi agents to use the new transport. Existing transcript history is not rewritten. The change is limited to native
pi-acp; custom Pi harnesses still use their existing behavior.Related issue
Follow-up to #7335, which moved only the unframed base into Pi's native prompt. No duplicate open issue or PR found for the complete Pi system-prompt transport.
Testing
cargo test -p buzz-acp --test pi_native_launcher -- --ignoredpassed against the installed Pi CLI. It exports Pi's live state and asserts exactly one framed base, profile, and core-memory section, using a synthetic transcript and no model calls.target/debug/buzz-acp models --agent-command /path/to/pi-acp --agent-args '' --jsonpassed withpi-acp0.0.33 and Pi 0.84.4 in an isolated working directory and Pi settings directory. This exercises the real adapter, generated launcher, and native Pi startup.Live checks ran on macOS. The package testing guide also explains why reopening a transcript with a profile-only prompt cannot recover the original system prompt.
Generated with Codex