Files
fusion/packages/droid-cli
gsxdsm 6032b900a4 fix(engine,droid-cli): stop subagents with parent task and harden droid-cli probes
engine: reviewer subagents previously kept running after the parent task
was moved out of in-progress, paused, or globally paused — they spawn
their own AgentSession outside `activeSessions`/`activeStepExecutors`,
so the existing kill paths never reached them. Track them in a per-task
`activeSubagentSessions` map (mirrored in TriageProcessor) and dispose
on the same triggers as the main session. ReviewOptions gains
`onSessionCreated` / `onSessionEnded` callbacks the executor and triage
processor wire to register/unregister.

droid-cli: probe timeouts (`validateCliPresence`, `validateCliAuth`,
`runDroidProbe`) raised from 5s to 45s — observed cold-start is ~20s,
so 5s reported the binary as missing even when present. Provider gains
a `FIRST_LINE_TIMEOUT_MS` (60s) cold-start guard so a hung droid binary
is reported with an actionable error instead of being indistinguishable
from a slow-thinking turn. Fix the await race in `streamViaCli`: when
SIGKILL destroys stdout mid-buffer, `rl` may never emit "close", so the
promise also resolves on `proc.close` and forces `rl.close()` — prevents
the engine's "executor did not unwind within 60s — hung subprocess".

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 06:44:07 -07:00
..

@fusion/droid-cli

First-party Fusion pi extension package that routes pi provider requests through the droid CLI subprocess using stream-json NDJSON.

Provider

  • Provider ID: droid-cli
  • Binary: droid (must be installed and authenticated on PATH)
  • Registration: package extension entrypoint in index.ts

Capabilities

  • Subprocess streaming bridge for text/thinking/tool events
  • Model auto-discovery from Droid CLI at provider startup with in-process caching
  • Session resume support (--resume / --session-id) to avoid replaying prior turns
  • MCP schema bridge for exposing pi custom tools as schema-only definitions
  • Tool mapping and break-early control so pi remains the tool executor
  • Thinking effort mapping from pi reasoning options to Droid CLI flags

Development

pnpm --filter @fusion/droid-cli test
pnpm --filter @fusion/droid-cli exec tsc --noEmit