Skip to content

fix(core): allow agents to stop background shell commands - #48352

Open
dbpolito wants to merge 2 commits into
anomalyco:v2from
dbpolito:shell-stop
Open

fix(core): allow agents to stop background shell commands#48352
dbpolito wants to merge 2 commits into
anomalyco:v2from
dbpolito:shell-stop

Conversation

@dbpolito

@dbpolito dbpolito commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #36424

Type of change

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

What does this PR do?

Adds shell_stop so agents can cancel a background command using its returned shell ID. It reuses Job.cancel and the existing interruption cleanup (shell.remove), including removal of captured output.

Related: #46721 adds stop APIs and user-stop outcomes; this PR adds the model-callable tool using current cancellation behavior.

How did you verify your code works?

  • All 35 pre-push typecheck tasks passed.
  • Both integration tests passed: tool cancellation and interruption cleanup, including removal and cancellation notifications.
  • The earlier full shell test run had six Bash process-substitution/compound-syntax failures.

Screenshots / recordings

Not applicable (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.

@dbpolito dbpolito closed this Sep 10, 2026
@dbpolito dbpolito reopened this Sep 10, 2026
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.

1 participant