Skip to content

Kill timed-out Kiro/Augment/Vertex CLI children - #404

Open
btsouth wants to merge 1 commit into
mainfrom
cursor/kill-cli-children-on-timeout-691a
Open

Kill timed-out Kiro/Augment/Vertex CLI children#404
btsouth wants to merge 1 commit into
mainfrom
cursor/kill-cli-children-on-timeout-691a

Conversation

@btsouth

@btsouthbtsouth commented Aug 23, 2026

Copy link
Copy Markdown
Owner

Summary

Desktop refresh wraps Provider::fetch_usage in tokio::time::timeout. Kiro, Augment, and Vertex spawned tokio::process::Command without kill_on_drop, so a cancelled fetch dropped the Child (default false) and left kiro-cli / auggie / gcloud running.

Those fetch-path commands now go through rust/src/host/tokio_cli.rs, which sets kill_on_drop(true). Augment's inner 15s deadline also kill+waits like command_runner::finish_child.

Related issue

Closes SBS-1078.

Affected areas

  • Tray panel
  • Settings UI
  • Config file / settings persistence
  • CLI
  • Provider-specific behavior
  • Installer / release packaging
  • Startup / background behavior
  • Documentation
  • Other: shared tokio CLI helper used by Kiro / Augment / Vertex fetch paths

Validation

Hosted CI is the merge gate. scripts\local-check.ps1 is Windows-only and was not run in this Linux agent.

Hosted CI (commit a0c18940)

Workflow CI #32670530359success (5m6s)

JobResultEvidence
Frontend (required)pass, 1m17sworker.test.mjs: 10 pass / 0 fail; check-tauri-version-sync: OK; pnpm test: 93 files / 741 tests passed; pnpm run build: ✓ built in 1.71s
Rust / sharedpass, 3m27scargo fmt --all --check; cargo test --manifest-path rust/Cargo.toml: 1222 + 25 passed, 0 failed; cargo clippy --all-targets -- -D warnings
Rust / desktoppass, 3m21scargo test --manifest-path apps/desktop-tauri/src-tauri/Cargo.toml: 631 passed, 0 failed; cargo clippy --all-targets -- -D warnings
Rust (required)pass, 2saggregator: "Rust checks passed."

CodeQL Analyze (actions / javascript-typescript / rust) also passed.

github-advanced-security / "Code scanning AI findings" failed with SessionModelError: You are not licensed to use Copilot (run 32670531160). That is a Copilot Autofind license error, not a code finding, and it is not a required check.

Local (Linux, rustc 1.98.0)

cargo fmt --all --check # exit 0
cargo test --manifest-path rust/Cargo.toml --lib host::tokio_cli # 4 passed
cargo test --manifest-path rust/Cargo.toml # 1189 + 32 passed
node --test worker.test.mjs
pnpm --dir apps/desktop-tauri test # 93 files / 741 tests
pnpm --dir apps/desktop-tauri run build # exit 0

Linux clippy -D warnings on the shared crate hits two pre-existing Windows-only unused items (secure_file.rs:824, updater.rs:514). Hosted Rust / shared on windows-latest is the clippy gate and passed.

UI / tray proof

  • Not applicable

Notes for reviewers

  • Sweep covered every tokio::process::Command in provider fetch paths (Kiro whoami + /usage, Augment account status, Vertex gcloud auth print-access-token). Sync std::process::Command probes (Kiro --version, Codex/Claude path checks) are unchanged.
  • Do not merge unless a human asks.
Open in WebOpen in Cursor

Note

Kill timed-out Kiro, Augment, and Vertex CLI child processes via tokio_cli helpers

  • Adds crate::host::tokio_cli with output and output_with_timeout async helpers that set kill_on_drop(true) on spawned processes; on timeout the helper force-kills and reaps the child
  • Switches Augment's account-status fetch to output_with_timeout with its existing 15s deadline, mapping Error::TimedOut to ProviderError::Timeout and Error::Io to ProviderError::Other
  • Switches Kiro login/usage and Vertex gcloud auth print-access-token fetches to tokio_cli::output, so canceled futures kill the child instead of leaving it running
  • Behavioral Change: timed-out or canceled CLI child processes are now terminated and reaped instead of being orphaned; callers of tokio_cli must handle the new Error::TimedOut variant

Macroscope summarized a0c1894.

tokio::process::Command defaults kill_on_drop to false, so desktop refresh
timeouts dropped Child handles and left kiro-cli, auggie, and gcloud running.
Route those fetch-path spawns through a helper that opts into kill_on_drop
and kill+waits on an inner deadline like command_runner.
Co-authored-by: Tyler <tyler@southboundsoftware.com>
@coderabbitai

coderabbitaiBot commented Aug 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 48 minutes.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 17f63447-96d7-4fc0-a72b-2ed9027b1a72

📥 Commits

Reviewing files that changed from the base of the PR and between 5bae231 and a0c1894.

📒 Files selected for processing (6)
  • CHANGELOG.md
  • rust/src/host/mod.rs
  • rust/src/host/tokio_cli.rs
  • rust/src/providers/augment/mod.rs
  • rust/src/providers/kiro/mod.rs
  • rust/src/providers/vertexai/mod.rs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cloudflare-workers-and-pages

Copy link
Copy Markdown
Contributor

Deploying with Cloudflare Workers Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

StatusNameLatest CommitPreview URLUpdated (UTC)
✅ Deployment successful!
View logs
ceilinga0c1894Commit Preview URL

Branch Preview URL
Aug 23 2026, 10:25 PM

@btsouth
btsouth marked this pull request as ready for review August 23, 2026 22:31
@cursor

cursorBot commented Aug 23, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_96e55574-aa2e-4ab6-a800-d2b9f59bb563)

Sign up for freeto 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.

2 participants

@btsouth@cursoragent