Skip to content

Make RPC auto-review fail closed when unmanned - #31

Open
love-lena wants to merge 1 commit into
yonilerner:mainfrom
love-lena:rpc-unmanned-fail-closed
Open

Make RPC auto-review fail closed when unmanned#31
love-lena wants to merge 1 commit into
yonilerner:mainfrom
love-lena:rpc-unmanned-fail-closed

Conversation

@love-lena

@love-lena love-lena commented Jun 29, 2026

Copy link
Copy Markdown

gpt5.5 suggested and wrote this, consider it slop draft.
- Lena


Make RPC auto-review fail closed when unmanned

Summary

  • treat RPC sessions as unmanned for reviewer fallback prompts and circuit-breaker overrides
  • ignore per-project .agents/pi-auto.json in RPC unless the project is trusted
  • allow trusted RPC jobs (--approve / saved project trust) to continue using per-project settings

Why

Pi RPC mode exposes extension UI through JSON, so ctx.hasUI is true even when no human is attached. The previous fallback paths could block indefinitely waiting for extension_ui_response. For unmanned RPC, the safer behavior is to fail closed.

Per-project pi-auto config can also weaken a global safety posture. In RPC, only trusted projects should be able to contribute that layer.

Verification

  • npm run typecheck
  • npm test

@love-lena
love-lena force-pushed the rpc-unmanned-fail-closed branch from cce36d3 to a1650e0 Compare June 29, 2026 20:46
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