Skip to content

Forward Pi launch options for skill loading - #2

Merged
salman1993 merged 1 commit into
mainfrom
codex/forward-pi-skill-args
Sep 9, 2026
Merged

salman1993 merged 1 commit into
mainfrom
codex/forward-pi-skill-args

Conversation

@salman1993

@salman1993 salman1993 commented Sep 9, 2026 •

Copy link
Copy Markdown
Owner

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/skills loads that directory for every session. Repeated --skill options 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/load use 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_FLAGS is 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.ts passed 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.systemPrompt for 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

@salman1993
salman1993 marked this pull request as ready for review September 9, 2026 01:34
@salman1993
salman1993 merged commit 9830641 into main Sep 9, 2026
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