feat(shell): add managed background mode - #32675
Conversation
|
The following comment was made by an LLM, it may be inaccurate: Based on my search, I found one potentially related PR: Related PR:
The search primarily returned the current PR itself (#32675). The other results don't appear to be duplicates of the background shell execution feature you're implementing. |
|
Hey @adamdotdevin , could you approve the workflow runs on this PR? Thanks! |
|
Hona @Hona Brendonovich @Brendonovich adamdotdevin @adamdotdevin - ready for review! |
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Closes #29822, #28654, #24658
Type of change
What does this PR do?
Adds managed background shell execution across the core bash tool and the opencode shell tool surface.
In
packages/corethis introduces managed shell jobs, background status/log/wait/cancel tools, auto background mode, and process handling hardening so long-runningcommands can detach cleanly while still being observable.
In
packages/opencodethis exposes the managed background shell tools in the registry, updates shell prompting/schema to support the new mode, and registers the CLIspinner earlier so background shell activity reports correctly.
How did you verify your code works?
cd packages/core && bun typecheckcd packages/core && bun test test/shell-background.test.ts test/shell-job.test.ts test/tool-bash.test.tscd packages/opencode && bun typecheckcd packages/opencode && bun test test/tool/registry.test.tscd packages/opencode && bun test test/session/prompt.test.tsstill had 3 local timeout failures around queued callers / shell coordination.cd packages/opencode && bun test test/tool/shell.test.tsis not green locally on this machine; several Windows cases assumeWINDIRis set and multiple legacyshell cases timed out.
Screenshots / recordings
N/A
Checklist