Skip to content

fix(core): background long-running shell commands - #50276

Closed
taka6745 wants to merge 2 commits into
anomalyco:devfrom
taka6745:shell-auto-background
Closed

taka6745 wants to merge 2 commits into
anomalyco:devfrom
taka6745:shell-auto-background

Conversation

@taka6745

@taka6745 taka6745 commented Sep 21, 2026 •

Copy link
Copy Markdown

Issue for this PR

Fixes #50278. Related to #34366 and #47350.

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Starting a foreground server such as Uvicorn leaves the agent waiting indefinitely while the server runs. Move shell commands to the existing background job system after five seconds so the agent can continue. Keeps output, completion notifications and explicit timeouts.

How did you verify your code works?

bun run check and both new tests pass. Shell suite: 83 passed, 19 skipped. Six existing macOS Bash failures also reproduce on unchanged v2.

Screenshots / recordings

No UI changes.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

@taka6745
taka6745 marked this pull request as ready for review September 21, 2026 04:15
@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Sep 21, 2026
@taka6745

taka6745 commented Sep 21, 2026 •

Copy link
Copy Markdown
Author

@rekram1-node could you review this? It moves shell commands to the background after five seconds while preserving explicit timeouts.

Added Fixes #50278, but needs:issue remains because the check uses closingIssuesReferences and this PR targets v2 rather than the default branch. Could you link the issue manually or clear the label?

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Sep 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@thdxr
thdxr changed the base branch from v2 to dev October 10, 2026 19:12
@github-actions

Copy link
Copy Markdown
Contributor

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:

  • The PR was created more than 1 month ago
  • The PR had fewer than 2 positive reactions
  • Positive reactions are counted as thumbs-up, heart, celebration, or rocket reactions on the PR

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

V2: starting a foreground server blocks the agent indefinitely

1 participant