[Feature] Lazy ACP extension activation and process lifecycle management
Description
Change the VS Code extension activation from eager startup (onStartupFinished) to lazy activation, spawning the ACP CLI process only when a user interacts with the Nanocoder view or invokes a Nanocoder command.
Use Case
Currently, plugins/vscode/package.json activates on onStartupFinished, and extension.ts:51 immediately spawns nanocoder --acp on every VS Code launch. For users who open VS Code for tasks unrelated to Nanocoder, this consumes memory and CPU unnecessarily.
Proposed Solution
- Remove
onStartupFinishedfromactivationEventsinplugins/vscode/package.json. - VS Code automatically handles activation for contributed views and commands; ensure ACP process spawning in
AcpProcessManageris deferred untilresolveWebviewViewis called or a Nanocoder command is executed. - Preserve explicitly enabled legacy autoConnect / companion behavior, while avoiding ACP spawning for commands that only open configuration or logs.
Alternatives Considered
- Leaving it eager: causes unnecessary background process spawning and resource consumption on every VS Code launch.
Additional Context
- [x] No matching open issue found in issue search performed on 2026-10-12
- [x] This feature aligns with the project's goals (local-first AI assistance)
hey @akramcodez @addyCooks , would like to work on this could you please assign this to me.
plan -
remove onStartupFinished from the extension's activation events and only spawn nanocoder --acp when the Nanocoder view opens or a command that needs it runs (keeping the existing autoConnect behavior)
Hey @karthikponna, thanks for your interest! I've already assigned you a few issues. Once those PRs are done and reviewed, I'll assign this one to you too.
hey @addyCooks , i've raised PRs for the last two issues that i got assigned. if no one is currently working on this would like to take this one.