Skip to content

Support live model providers and clarify subagent workspace conflicts - #100

Merged
GaganSD merged 2 commits into
mainfrom
fix/subagent-provider-workspace
Oct 26, 2026
Merged

GaganSD merged 2 commits into
mainfrom
fix/subagent-provider-workspace

Conversation

@GaganSD

@GaganSD GaganSD commented Oct 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • Make subagents use the owning session's live model-provider services while preserving isolated sessions and fixed capabilities.
  • Make workspace conflicts actionable without changing admission rules or expanding successful tool output.

What

  • Add a small, credentialless provider bridge for built-in, file-configured, and extension-provided models.
  • Revalidate model, scope, authentication, and thinking on admission/resume; reject removed, virtual, or mid-attempt metadata changes explicitly.
  • Identify conflicting tasks/runs, cwd paths, and effective workspace roots; clarify directory and Git-worktree reservations.

Why

  • Avoid stale provider catalogs, duplicated authentication/refresh state, and misleading worktree-only guidance.
  • Preserve performance and minimal context: no new dependencies, tools, output fields, or tool-description token growth.

Related issues

Testing

  • Pi 1.3.0: npm run lint --prefix pi-subagents, npm run typecheck --prefix pi-subagents, and npm test --prefix pi-subagents pass; 162 tests.
  • Pi 1.4.0: typecheck and all 162 tests pass; Pi 1.0.0: typecheck and 78 focused SDK/admission tests pass.
  • npm run build --prefix pi-subagents: packed clean-consumer registration passes.
  • npm run test:tooling: 29 tests pass; staged secret scan passes.
  • Pi 1.4.0 interactive TUI smoke with a deterministic extension-only provider: native subagent completion and same-cwd writer diagnostics pass; no external inference.
  • Local Pi package source synchronized; configured-package load passes. Offline cold-start microbenchmark: ~0.57 ms bridge versus ~2.84 ms previous runtime; tool description remains 229 o200k tokens.

Compatibility

  • Preserve stable Pi 1.x peer range, tool schemas, persisted run format, and workspace-overlap policy. No new dependencies or configuration.

Risk

  • Provider changes are live; changing selected model metadata during an active attempt now fails explicitly rather than combining stale metadata with current authentication.
  • Provider code remains trusted; parent tools, hooks, skills, and conversation are not inherited.

Checklist

  • The change is focused; unrelated changes are excluded.
  • Tests cover behavior changes.
  • Relevant documentation is updated.

@greptile-apps

greptile-apps Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

Subagents now use the owning Pi session’s live model catalog, authentication, and streaming services through a separate, credentialless runtime.

  • Sub-agents use the owning Pi session’s live model providers.
  • Workspace conflicts name the overlapping reservations and explain what to do next.

Diagram

sequenceDiagram
  participant Owner as Owning Pi session
  participant Manager as RunManager
  participant Child as Isolated child session
  participant Bridge as ProviderBridge
  participant Registry as Owning model registry
  Owner->>Manager: Launch or resume
  Manager->>Bridge: Validate selected model
  Bridge->>Registry: Check current availability
  Registry-->>Manager: Available
  Manager->>Child: Start with fixed tools
  Child->>Bridge: Stream pinned model
  Bridge->>Bridge: Check current metadata
  Bridge->>Registry: Forward request
  Registry-->>Child: Authenticated response
Loading

Reviews (1) · Last reviewed commit: "Harden policy validation and cancellatio..." · Reviewed by Greptile

@GaganSD
GaganSD merged commit b3e5295 into main Oct 26, 2026
7 checks passed
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.

pi-subagents: workspace-conflict error is misleading for same-cwd writer batches feat: support extension-provided models

1 participant