Skip to content

feat(vscode): promote timed out commands to background jobs - #1930

Open
zhanba wants to merge 3 commits into
mainfrom
feat/execute-command-timeout-background-20260902-174427
Open

feat(vscode): promote timed out commands to background jobs#1930
zhanba wants to merge 3 commits into
mainfrom
feat/execute-command-timeout-background-20260902-174427

Conversation

@zhanba

@zhanba zhanba commented Sep 2, 2026

Copy link
Copy Markdown
Member

Summary

  • run supported foreground commands through a single interactive PTY and adopt that same process into a background terminal on timeout
  • preserve replayed/live output, lifecycle cleanup, terminal input and resize handling, and background job metadata across the VS Code WebUI bridge
  • retain shell-integration fallbacks for unsupported hosts and add lifecycle, promotion, UI, and packaged node-pty coverage

Test plan

  • bun check
  • TypeScript checks for packages/vscode, packages/common, and packages/vscode-webui
  • VS Code Mocha suite: 226 passing
  • WebUI suite: 520 passing
  • Tools suite: 118 passing
  • bun turbo test:integration (three attempts failed before E2E execution while downloading VS Code 1.108.0 with TLS ECONNRESET)

Notes

  • The existing unrelated bun.lock modification is intentionally excluded from this PR.

🤖 Generated with Pochi | Task

Keep long-running commands alive and interactive after foreground timeout by adopting the original PTY into a background terminal, while preserving output and UI metadata.

🤖 Generated with [Pochi](https://getpochi.com) | [Task](https://app.getpochi.com/share/p-59931c0d563a44bcbfd37fb93d8271a4)

Co-Authored-By: Pochi <noreply@getpochi.com>
@zhanba zhanba changed the title Promote timed out commands to background jobs feat(vscode): promote timed out commands to background jobs Sep 2, 2026
@codecov-commenter

codecov-commenter commented Sep 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 81.65503% with 184 lines in your changes missing coverage. Please review.
✅ Project coverage is 33.65%. Comparing base (ab3dc4d) to head (8e18611).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...s/vscode/src/integrations/terminal/terminal-job.ts 71.95% 99 Missing ⚠️
...es/vscode/src/integrations/terminal/pty-process.ts 81.49% 42 Missing ⚠️
packages/cli/src/tools/execute-command.ts 90.27% 14 Missing ⚠️
packages/cli/src/lib/background-job-manager.ts 91.78% 6 Missing ⚠️
.../integrations/terminal/execute-command-with-pty.ts 91.78% 6 Missing ⚠️
packages/tools/src/execute-command.ts 0.00% 3 Missing ⚠️
...rc/features/chat/lib/batched-tool-call-adapters.ts 0.00% 3 Missing ⚠️
...ebui/src/features/chat/lib/tool-call-life-cycle.ts 0.00% 3 Missing ⚠️
...scode-webui/src/lib/vscode-running-task-adaptor.ts 0.00% 3 Missing ⚠️
packages/vscode/src/tools/execute-command.ts 92.30% 3 Missing ⚠️
... and 2 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1930      +/-   ##
==========================================
+ Coverage   33.32%   33.65%   +0.33%     
==========================================
  Files         778      780       +2     
  Lines       83120    83628     +508     
  Branches     4897     4861      -36     
==========================================
+ Hits        27696    28144     +448     
- Misses      55304    55364      +60     
  Partials      120      120              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

zhanba and others added 2 commits September 3, 2026 18:20
Keep promoted commands visually distinct from commands started in the background while presenting the transition as one concise, durable status.

🤖 Generated with [Pochi](https://getpochi.com) | [Task](https://app.getpochi.com/share/p-59931c0d563a44bcbfd37fb93d8271a4)

Co-Authored-By: Pochi <noreply@getpochi.com>
Keep the original non-interactive process running after the foreground wait expires and clarify timeout behavior across CLI and VS Code.

🤖 Generated with [Pochi](https://getpochi.com) | [Task](https://app.getpochi.com/share/p-59931c0d563a44bcbfd37fb93d8271a4)

Co-Authored-By: Pochi <noreply@getpochi.com>
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.

2 participants