Skip to content

fix(pi): confirm ask decisions and deliver skills, instructions, and settings - #223

Merged
furedea merged 2 commits into
mainfrom
fix/handle-pi-ask-decisions
Nov 11, 2026
Merged

furedea merged 2 commits into
mainfrom
fix/handle-pi-ask-decisions

Conversation

@furedea-agent

@furedea-agent furedea-agent Bot commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Closes #220

概要

  • Pi の hook bridge が permissionDecision: "ask" を無視し,確認が必要なコマンドが無確認で実行されていた.UI ありなら ctx.ui.select で確認し,No / キャンセル / UI なしは block にする.複数 hook の判定は deny > ask > allow で合成する.既存の deny(exit 2 / decision: block)の挙動は変えない.
  • Pi に Claude と同じ skills(~/.pi/agent/skills)と共通 instructions(~/.pi/agent/AGENTS.md)を配布する.
  • ~/.pi/agent/settings.json へ defaultProvider / defaultModel / defaultThinkingLevel だけをマージし,既存のキーは保つ.ソースは任意の pi/settings.json.

補足

  • skills は SkillSource::RenderClaude(disable-model-invocation を保つため).
  • テスト: tests/pi_provider.rs,tests/pi_bridge_smoke.mjs(cargo test から実行).Nix の check で node と python3 を使うため nativeCheckInputs に追加.
  • sync-config --provider pi は失敗しなくなったため,旧テスト pi_sync_fails_without_writing_files を削除.
  • 範囲外: srt sandbox(Sandbox Pi shell commands with srt and confine Pi file tools to the worktree #221).

🤖 Generated with Claude Code

furedea and others added 2 commits November 12, 2026 00:31
… them

The Pi bridge only recognized deny, so commands that guards escalate with
permissionDecision "ask" ran without confirmation. Ask now prompts through
ctx.ui.select, and blocks when the user declines or no UI is available.
Decisions combine as deny > ask > allow.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…keys

Install Claude-rendered skills to ~/.pi/agent/skills and shared instructions
to ~/.pi/agent/AGENTS.md. Merge only defaultProvider, defaultModel, and
defaultThinkingLevel from the optional pi/settings.json source into
~/.pi/agent/settings.json, keeping user-owned keys.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@furedea

furedea commented Nov 11, 2026

Copy link
Copy Markdown
Owner

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-11T15:35:23.488142Z 3b517a8 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown
Contributor

Automated review: no blocking findings.

Checked:

  • hook_bridge.ts: decisions combine as deny > ask > allow. Exit 2 and decision/action: block still deny. hookSpecificOutput.permissionDecision: deny is now honored, where before it was silently ignored. An ask blocks unless the answer is exactly "Yes", and blocks when there is no UI. Asks on input events are ignored, matching the previous behavior.
  • pi_config.rs: only defaultProvider, defaultModel and defaultThinkingLevel are merged. A missing source or target is treated as empty. A target that isn't a JSON object fails without being rewritten.
  • Install path: the installed ~/.pi/agent/settings.json is carried into staging before rendering, so user keys survive install. The Home Manager activation uses sync-config --provider pi, and the module passes the multi-word command through unchanged.
  • Tests cover sync idempotence, invalid sources and targets, install merge with and without pi/settings.json, skill and instruction delivery, and the bridge decision matrix.

Minor note, not blocking: if a key is later removed from pi/settings.json, its last synced value stays in the user's settings, because managed values can't be told apart from user values. I didn't run the test suite in this environment.

🤖 Generated with Claude Code

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 3b517a8c6c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@furedea
furedea merged commit 2e755af into main Nov 11, 2026
21 checks passed
@furedea
furedea deleted the fix/handle-pi-ask-decisions branch November 11, 2026 15:43
furedea pushed a commit that referenced this pull request Nov 12, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.9.13](agent-harness-v0.9.12...agent-harness-v0.9.13)
(2026-11-12)


### Features

* **codex:** apply the secret path policy to the guarded filesystem
([#233](#233))
([0830fd9](0830fd9))
* **pi:** run Pi shell and file tools inside srt
([#228](#228))
([37de3ac](37de3ac))


### Bug Fixes

* dedupe the Nix socket in Pi's srt policy and name the failed sidecar
write ([#237](#237))
([1ccafe0](1ccafe0))
* fail on missing HOME, bound GitHub API waits, reject unknown hook keys
([#218](#218))
([c0b936d](c0b936d))
* **install:** publish atomically and keep Claude settings keys the
harness does not own
([#219](#219))
([c914c76](c914c76))
* **pi:** confirm ask decisions and deliver skills, instructions, and
settings ([#223](#223))
([2e755af](2e755af))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: furedea-release[bot] <353651101+furedea-release[bot]@users.noreply.github.com>
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.

Handle ask decisions and deliver skills, instructions, and model settings to Pi

1 participant