Skip to content

[BUG] KillShell asks for approval to stop a background shell the agent started #1808

Closed

Description

@edenreich

Summary

KillShell asks the user for approval, although it can only stop a background shell the agent itself started.

An agent may start a background shell with Bash without approval when its command is allowed, read it with BashOutput and wait on it with Wait, both of which never ask. Stopping that same shell with KillShell suspends the run on an approval card. The tool takes nothing but a shell_id, and the only ids that exist are the ones of this session's own background shells, so it cannot reach a process the agent did not start.

The cause is in the tool manifests: internal/tools/BashOutput.yaml and internal/tools/Wait.yaml set require_approval: false, and internal/tools/KillShell.yaml sets nothing, so it falls back to asking.

It matters most on a long unattended run. On a workspace computer where every Bash command is allowed (INFER_TOOLS_BASH_ALLOW_APPEND: ".*"), an agent editing video noticed that a render it had started was no longer needed and went to stop it. The run sat on the approval card until someone looked (inference-gateway/desktop#535). The agent could have stopped the same process with Bash and kill without asking, which shows the gate protects nothing.

Steps to Reproduce

  1. Run an agent with Bash commands allowed, for example a workspace with INFER_TOOLS_BASH_ALLOW_APPEND: ".*"
  2. Ask it to start a long command in the background, such as sleep 600, and then to stop it
  3. The agent calls KillShell with the shell's id

Expected Behavior

KillShell runs without approval, like BashOutput and Wait, because it only acts on a background shell of the same session. A user who wants to be asked can still turn that on in the configuration.

Actual Behavior

The run suspends with "Tool requires approval - KillShell {"shell_id":"shell-..."}" and waits for the user.

Activity

  1. added
    bug
    on Nov 11, 2026
  2. added theissue type on Nov 11, 2026
  3. moved this from Todo to QA in 2026on Nov 11, 2026
  4. inference-gateway-releaser commented on Nov 11, 2026

    @inference-gateway-releaser
    Contributor

    🎉 This issue has been resolved in version 0.255.0 🎉

    The release is available on:

    Your semantic-release bot 📦🚀

  5. moved this from QA to Done in 2026on Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugreleased

    Type

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions