Repository navigation
Upgrade Aiden desktop and CLI to Pi 1.0.3 - #357
Conversation
…305-2) Every MCP HTTP request read the MCP configuration and decrypted the grant twice, so a connect (about three requests) cost six config reads and six secret decrypts. The operation-scoped fetch now verifies the grant on both sides of its first credential resolution only. Later requests keep the assertCurrent fence, which the configuration lease fails synchronously when a grant or connection change is published, and still resolve the bearer token per request so provider rotation applies. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… (PR-307-1) The call guard compiled every advertised output schema eagerly, each in its own Ajv, and the bot catalog, attended inspection and status paths also let Client.listTools compile the same schemas into an SDK cache they never read. Schemas now compile on first use, before dispatch, in one Ajv per guard; a schema that declares $id keeps its own instance so reused ids cannot make one tool validate against another's schema. Those three paths list through a raw tools/list request. 100 schemas: 48.5 ms per-tool vs 22.2 ms shared, and 0.2 ms when one tool is used. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nces a change (PR-307-2) Every attended turn re-listed and re-guarded each cached connection's tools. A cached client's inventory and call guard are now kept per client when the server advertises tools.listChanged; notifications/tools/list_changed (watched before connect) drops the entry and failed reads are never retained. A new connection generation is a new client, so it never inherits an entry. Provider-authenticated operations still list per operation. The shared read is fenced by generation, and each caller still stops on its own lease and re-checks lease and generation after a hit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Preserve lazy CLI startup and shared worker chunks, adapt chat-fork summaries through the legacy harness, and defer the unused desktop codemode dependency to its integration consumer. Verified clean-install npm test, focused suites, types, lint, builds and Electron chat-fork smoke.
There was a problem hiding this comment.
Caution
Image-generation approval can authorize prompt text the user never sees. The disclosure gap, Unicode MCP discovery failure, and deterministic branding-test failure need correction before merge.
Reviewed changes Reviewed the full desktop/CLI Pi upgrade against main, including the Azure collision-hardening commit pushed during this review.
- Runtime and journals: Pins live Pi packages to
1.0.3, retains the isolated0.87.1journal/compaction adapter, and adapts fork summaries and child execution to current Models. - Provider migration and authentication: Migrates Azure credentials, catalogs, preferences and historical selections; preserves custom aliases and encrypted collision recovery; adds OpenAI installation identity and bounded per-thinking-level sampling.
- Tool scripts and MCP discovery: Adds permissioned nested codemode execution, deferred admitted schemas, bounded complete MCP pagination, full-inventory output validation, and structured/raster resource results.
- MCP authorization: Adds metadata/client-name configuration, callback issuer/state checks, and exact-endpoint device-local provider grants with attended-operation lifetimes.
- Model operations and context: Adds approved image generation/reference inputs, inspectable classification and opt-in local classifiers, once-per-call usage, model-specific compaction budgets, and opt-in foreground cache warming.
- CLI and client integration: Packages the standalone sandbox worker, separates native/Aiden MCP configuration with recoverable migration, updates onboarding/settings and native Azure artwork aliases, and extends behavioral coverage.
- Verification: Clean installs, desktop type-check, CLI build and
79/79CLI tests passed; MCP174/174, focused model/migration/settings196/196, and runtime/journal/compaction203/203passed. Branding tests reproduced one deterministic failure; behavioral probes reproduced both runtime findings. Native/Electron/signed-package acceptance was not rerun in this Linux review.
gpt-6.1-sol | 𝕏
Hermes Review BotConfidence: 5 Engine: SummaryThis pull request updates Aiden Agent desktop and CLI from Confidence Score: 5/5Full tracing was conducted across the package lockfiles, runtime harness, codemode sandbox execution, MCP tool invocation and pagination, provider grant bindings, configuration migrations, and cross-platform native client assets (iOS/Android). All APIs, types, and channel registrations were verified against runtime callers and behavioral test suites without uncovering any P0/P1/P2 regressions. 📁 Important Files Changed
FindingsNo findings. 📊 Sequence DiagramsequenceDiagram
autonumber
actor User as Desktop User
participant Model as LLM (Pi Agent Core)
participant Harness as PiAgentRuntimeHarness
participant Codemode as CodemodeSandbox (QuickJS)
participant MCP as McpClientService
Model->>Harness: tool_call: codemode(script)
Harness->>Codemode: execute(script)
activate Codemode
Note over Codemode: Sandboxed execution (32MB, 120s limit)
Codemode->>Harness: nested tool call (e.g. mcp__server__query)
Harness->>User: beforeToolCall approval request
User-->>Harness: Approve tool execution
Harness->>MCP: callMcpTool(name, args)
activate MCP
Note over MCP: client.request("tools/call") avoids SDK #1943
MCP-->>Harness: Tool result
deactivate MCP
Harness-->>Codemode: Nested execution result
Codemode-->>Harness: Final script output
deactivate Codemode
Harness-->>Model: Tool result to LLM
Machine-Readable Findings[]
|
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes Re-reviewed the follow-up commits from c3d7599e through 883324e9, with the complete current PR diff as context.
- Disclosed complete image prompts: Replaced the truncated preview with the full JSON-quoted prompt in the keyboard-scrollable desktop approval, and blocked Remote Allow where the complete payload cannot be inspected.
- Aligned Unicode discovery limits: Reused saved MCP description validation while retaining independent serialized byte budgets; added coverage for multibyte descriptions and unrelated admitted tools.
- Corrected the branding oracle: Updated the version-rejection assertion to the exact
1.0.3pin without weakening drift detection. - Preserved main integration: Retained Remote model/provider coverage and classifier opt-in reset behavior in the relocated provider controls; extended save/reopen coverage for API-format and deployment changes.
- Verified the follow-up: After a clean install, passed 120 focused consent/discovery/Remote tests, 80 provider/fork/settings integration tests, three branding tests, 26 CI policy/registry tests, and desktop/E2E type-checks. The Android invocation returned
Tool 'shell' timed out after 120000ms; iOS and actual Electron UI execution were not rerun on this Linux runner. Exact-head hosted CI remains the merge gate.
gpt-6.1-sol | 𝕏

Change
Upgrade the desktop and standalone CLI live runtime from Pi 0.87.1 to exact 1.0.3, integrating the complete parity stack with current main. Existing Azure accounts, preferences, catalogs, chats and schedules resolve
azure-openai-responses→azure, while the API ID, environment variables and explicit custom connections stay intact. Credential collisions retain encrypted recovery data; different CLI endpoint collisions stop for reconciliation. Cross-file endpoint/credential collisions also fail closed under the auth writer lease, including retained recovery credentials.This replaces #299, #302, #301, #304, #303, #306, #305 and #307 with one acceptance boundary, preserving their commit ancestry. #300 stays closed. Main
5c094875c(#349 Remote forks and #352 provider settings/native provider creation) is merged; no shared branches were rebased or force-pushed.Included: permissioned codemode and deferred MCP discovery, bounded complete MCP inventories, image/classifier tools and opt-in local classification, foreground-only cache warming, per-model compaction budgets, provider MCP grants, and bounded per-thinking-level custom sampling. Image approvals show the full quoted prompt on desktop and are deny-only on Remote; Unicode MCP descriptions use the saved metadata character limit while discovery results retain byte budgets. The CLI codemode worker is self-contained for Pi 1.0.3's data-URL loader. Desktop/iOS/Android Azure artwork aliases remain compatible.
Validation
Clean root and CLI lockfile regeneration and
npm ci; live package versions align at 1.0.3.Root/e2e/CLI types and lint passed. Final
npm testpassed all three unit lanes (6,991 cases: 6,989 pass, 2 skip), all preserved browser/generative-UI/terminal/native/Rust modes and CLI 78/78 after merging main6a12fdc35. The final CLI-only collision hardening then passed its extended 79-test suite and CLI types.Desktop build; final extended CLI 79/79, compaction 22 VCC plus 463 cases, MCP 174/174, subagent scripts, CI policy, OAuth cancellation/approval tests.
Behavioral coverage for Azure restart/collisions/logout, custom alias precedence, CLI config/auth migration, actual sampling request payloads, runaway sandbox output, and encrypted OAuth rotation after cancellation.
Focused Android model/chat/protocol suites and iOS chat/protocol simulator suites passed. Signed-device-only cases were skipped by design.
Electron: 19/20 passed initially.
tests/e2e/guided-setup.spec.ts:113(“feature gallery reveals complete descriptions through keyboard focus at narrow widths”) passed its assertions but hit a 35-second Electron teardown timeout for PID 17589. Its one permitted rerun passed in 4 seconds. This remains a known local flake; no timeout, retry or--fail-on-flaky-testsweakening. Local logs:/tmp/pi103-e2e.logand/tmp/pi103-e2e-gallery-rerun.log; no hosted run was involved in that failure.React Doctor: 82/100, 13 warnings reviewed (test JSON-roundtrip oracles, intentionally ordered authority/tool operations, bounded lookup and mixed export); no additional confirmed defect.
Review follow-up: branding suite, 161 focused discovery/model/approval/Remote checks, root types and lint, and iOS chat suite passed. Android model-approval coverage passed; the existing
AidenChatTest.heldTurnReceiptPreservesOtherOwnerAndCannotCrossRemovalfailed locally at line 512 waiting five seconds forgetArrived. Its one isolated rerun passed. Logs:/tmp/pi103-review-android-first-failure.log,/tmp/pi103-review-android-rerun.log. No hosted run was involved; no timeout/retry policy changed. This remains a recorded local flake alongside Electron teardown.Final focused rerun: 91/92 passed;
main/services/coding-tools.test.ts:1539(“read/search outputs have explicit collection and text bounds”) reached the 5,000 ms deadline before the expected 200-match cap. Its one isolated rerun passed in 515 ms. Logs:/tmp/pi103-review-final-tests.log,/tmp/pi103-review-coding-rerun.log; no hosted run was involved. All new tests passed; no timeout, retries, or flaky-test policy changes.Boundaries and follow-ups
The explicit
@aiden/pi-legacy-harness@0.87.1dependency remains for journal/summary/compaction compatibility. Removing it is separate debt. Existing Bot grants are never silently retargeted to a new identity; unavailable Azure bindings require owner reauthorization.Desktop keeps validated inline images/private artifacts; CLI inherits Pi's image temp files. Aiden-managed CIMD is deferred until an Aiden client metadata document and registered callbacks exist; native
aiden pi-mcpinherits Pi 1.0.3. Project MCP overrides remain native CLI functionality because desktop server authority is owner-managed. pi-env was evaluated only, with no dependency or execution integration.No models.dev background calls, native port replacement, Chord transport or pi-durable migration. No signed installed-candidate, physical-device, live paid-provider or rollout advancement is claimed. See
docs/pi-1.0.3-release-notes.md, the active execution plan, and.memory/pi-env-evaluation.md.Merge only after exact-head CI is green and local final validation is complete. Use a merge commit to preserve the replacement stack ancestry.
Hosted runner incident (2026-10-05)
At head
7f9c4d65e2675a6953b21f1e2ef2fc0cbe9cb001, release consumer attempt 1 and Pullfrog attempt 1 failed before any steps ran: “The job was not acquired by Runner of type hosted even after multiple attempts.” GitHub Status reports an active hosted-runner assignment incident. Neither failed run has been rerun; reserve its one allowed rerun until service recovers. Main CI has not been cancelled. Exact-head CI attempt 1 also failed runner acquisition for Detect changed areas (job 111955928730) and CI policy (job 111955928633), before any steps executed. Its dependent suites were skipped and the aggregate job is queued. No rerun has been used; wait for runner-service recovery before the single permitted rerun. Auto-merge remains gated on required checks.Main integration after runner recovery
GitHub resolved the hosted-runner incident at 22:49 UTC on October 5. Before retrying obsolete checks, main advanced; merge commit
883324e9now integrates5c094875cnormally. The older runner-allocation failures above are preserved, with no reruns spent. New acceptance must use this merge head.The merge retains both sets of remote model tests, main's provider-settings layout, and the classifier opt-in reset handlers in the relocated API/deployment controls. The existing classifier Electron case verifies opt-in persistence and clearing when either authority setting changes. The root test scripts retain both sides; protocol revision 22 and native/fixture contracts match main.
Validation: 222 focused remote/provider/fork tests; CLI 79/79 plus CLI types; root/e2e types; scoped lint; desktop build; CI policy 55/55; Android remote client/protocol/Bot contracts; iOS remote client/protocol simulator tests. React Doctor reports 81/100 with 22 advisory warnings and no errors; added warnings are imported test serialization fixtures, bounded provider lookup and an Intl allocation.
Electron: 6/7 passed initially.
tests/e2e/providers-settings.spec.ts:26(“a failed provider removal stays open with the error, then succeeds on retry”) passed its assertions but PID50915 exceeded the 35-second shutdown timeout. Its one isolated rerun passed in 31.7 seconds. This remains an additional local flake; the original gallery teardown, Android held-turn and search-bounds flakes above remain recorded. Logs:/tmp/pi103-main-merge-e2e.log,/tmp/pi103-main-merge-e2e-rerun.log; original trace:/tmp/pi103-main-merge-provider-removal-trace.zip. No hosted run for this failure; no timeout/retry weakening.Verified merge
Merged 2026-10-06 00:28:44 UTC (October 5, 8:28 PM America/New_York) as
14289dd6db6f9975c1b9b76316c8a0c53126f7cb. All checks passed on exact head883324e99545433e210e0fdb5266d2e3c66e63b5; CI run 37390835068 passed on attempt 1. All three Electron shards, native suites, CLI, Linux packaging and review checks passed. GitHub marked #299, #302, #301, #304, #303, #306, #305 and #307 merged through preserved ancestry. No manual branch/worktree deletion, release publication or rollout advancement was performed. Historical local flakes and runner-allocation failures above remain recorded.