fix(pi): isolate model credentials from agent tools - #114
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.
What changed
Why
Pi previously inherited daemon environment variables and could read the host Pi config and sibling session files through Bash. That made an exact AgentProfile non-exact at the credential and storage boundaries, and model calls made with a copied local token were not independently counted.
Proof
pnpm test: 633 passed, 7 skippedpnpm typecheck: passedpnpm verify: passedpnpm verify:fs-jail: blocked host secret files, sibling directories, and the host repo while allowing workspace writes, Node, Python, and localhostdeepseek-v4-flash: profilesha256:c544b78bd906d1e2b75a9a8b5b888b9cb59b3d802805c75ad8fc656babd941dc; second turn had 9,900 input tokens (44 fresh, 9,856 cache-read), 21 output tokens, 1/1 call accounting, 0 rejected/failed/in-flight, andcostKnown: falseOperational impact
Pi now requires
PI_EXECUTOR=host,execution.jail.mode=fs-jail, and working bubblewrap. Docker and undeclared custom executors refuse before auth rather than mounting credentials or running without read isolation.