Repository navigation
fix(pi-arc): bind Arc commands to the current Pi session - #15
Merged
Merged
Conversation
This was referenced Sep 6, 2026
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.
The Arc extension sent session-start data without
session_id, and subprocess commands could inherit another session's identity.Bind each invocation to the current Pi session manager. Register canonical
session_id,cwd, andtranscript_pathusing one captured identity; reject an empty identity before spawning; use invocation-scopedARC_SESSION_IDfor ordinary commands and explicit--session-idfor prime. Preserve caller-supplied flags and clear stale cached prime context after a failed refresh.Packaged claim and manual prime commands now pass guarded, quoted
PI_SESSION_ID. Update source adaptation so Claude's binding becomes Pi's binding during migration, while preserving existing Pi workflows.Validation:
npm run checkpassed independently onf36afd7, including 81 pi-arc tests, other workspace tests/type checks, and package dry runs. Subprocess tests cover registration payloads, inherited identity conflicts, session switches, in-memory sessions, empty identity, caller flags, and shell-sensitive packaged command arguments. Targeted synthetic source adaptation tests pass.Full regeneration against the current Claude source has pre-existing unrelated migration-overlay drift; this fix preserves the existing generated workflows and changes only session bindings. Full-sync repair is tracked as
arc-0d80.023jby.Requires the CLI interface in SentioLabs/arc#81; registration companion SentioLabs/arc#82. Tracks
arc-0d80.051c29and the earlierarc-0d80.01f3uawork.Independent final acceptance: 15 packaged command checks across Claude/Codex/Pi and 15 Pi subprocess checks passed. The command-generation regression was also validated by deleting only its identity transform in a disposable copy and observing the expected failure.