Role#
The sidecar is a Bun and TypeScript process that wraps coding agent SDKs. The Rust backend starts it, sends requests, and reads structured events from stdout.
What it handles#
- Session lifecycle for supported agent providers.
- Request parsing and provider-specific options.
- Streaming event emission back to Rust.
- Abort handling, logging, images, and session titles.
Why it exists#
Provider SDKs and CLI behavior change more often than the desktop shell. Keeping them in the sidecar reduces coupling and keeps the Rust backend focused on app state, persistence, and orchestration.
Development habit#
Run sidecar tests when changing provider behavior. If an SDK event shape changes, also run the Rust pipeline tests because stored messages depend on that contract.