feat: auto-background timed-out foreground bash commands#1591
feat: auto-background timed-out foreground bash commands#1591liruifengv wants to merge 4 commits into
Conversation
🦋 Changeset detectedLatest commit: f2cd847 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5ea94be2b5
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f2cd8472ed
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Related Issue
N/A — no linked issue; the problems are explained below.
Problem
Two related issues around background tasks:
Bashcommand that hits its timeout (default 60s, max 300s) is killed outright, losing all progress on long-running commands.TaskOutputwithblock=trueto wait for background task results, which re-blocks the main thread and defeats the purpose of background execution.What changed
[background] bash_auto_background_on_timeout(defaulttrue; set tofalseto restore kill-on-timeout). Agents without background tooling keep the kill behavior, since a detached task would be unobservable there.blockparameter description carries the discouragement, the Bash tool description steers away from blocking on just-launched tasks, and a blocking wait that times out now appends an in-resultnext_stepnudge telling the agent not to block again.docs/enanddocs/zh; changesets included (minorfor the timeout behavior,patchfor the prompt tuning).Checklist
gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.