Repository navigation
Forward Pi launch options for skill loading - #2
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Clients need to load extra Pi skill directories through their adapter launch configuration. pi-acp currently ignores those launch arguments, so clients need a separate Pi wrapper.
What
Forward Pi options after an explicit
--separator. For example,pi-acp -- --skill /absolute/workspace/.agents/skillsloads that directory for every session. Repeated--skilloptions and paths with spaces are supported.How
Parse launch arguments once and pass a copy through the agent to each Pi subprocess. New sessions, automatic restoration, and
session/loaduse the same launch options. Interactive terminal login also receives them.Reject options that override ACP's mode, session selection, or system-prompt configuration. System prompts remain session-scoped; launch options are not saved in session records.
RESERVED_FLAGSis a blocklist, not an allowlist. It prevents forwarded options from overriding settings pi-acp controls—such as--mode,--session, and system prompts.Risk
Existing launches without arguments keep their behavior. Pi options now require the explicit separator, and reserved options fail at startup. Live process checks ran on macOS; Windows execution was not tested.
Testing
PI_ACP_TEST_REAL_PI=1 node --import tsx --test test/component/skill-loading.test.tspassed against Pi 0.84.4. The test launches the ACP entrypoint with two external skill directories whose paths contain spaces. It verifies both skill commands in a new session, then inspects Pi's effective system prompt after automatic restoration and explicit loading after adapter restart. Both extra skills, a normally discovered native skill, and the saved session prompt remain present. The test uses isolated settings and synthetic history, with no model calls.Bigger picture
Clients can use launch arguments for skill discovery alongside
_meta.systemPromptfor session instructions. Client configuration still needs to point at a build containing this change and pass the skill path.Related upstream proposal: svkozak#21
Generated with Codex