Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Takhoffman
Copy link
Contributor

@Takhoffman Takhoffman commented Jan 24, 2026

Agents: remove redundant bash tool alias

Why

  • In this session, the bash tool definition was showing up in the request to the provider even though it is just an alias of exec, which is redundant and confusing.
  • Removing the alias from tool registration avoids advertising a duplicate tool and saves tokens on every request.
  • Example of what was being sent to the provider (duplicate exec/bash definitions):
{
  "name": "exec",
  "description": "Execute shell commands with background continuation. Use yieldMs/background to continue later via process tool. Use pty=true for TTY-required commands (terminal UIs, coding agents).",
  "input_schema": {
    "type": "object",
    "properties": {
      "command": { "description": "Shell command to execute", "type": "string" },
      "workdir": { "description": "Working directory (defaults to cwd)", "type": "string" },
      "env": { "type": "object" },
      "yieldMs": { "description": "Milliseconds to wait before backgrounding (default 10000)", "type": "number" },
      "background": { "description": "Run in background immediately", "type": "boolean" },
      "timeout": { "description": "Timeout in seconds (optional, kills process on expiry)", "type": "number" },
      "pty": { "description": "Run in a pseudo-terminal (PTY) when available (TTY-required CLIs, coding agents)", "type": "boolean" },
      "elevated": { "description": "Run on the host with elevated permissions (if allowed)", "type": "boolean" },
      "host": { "description": "Exec host (sandbox|gateway|node).", "type": "string" },
      "security": { "description": "Exec security mode (deny|allowlist|full).", "type": "string" },
      "ask": { "description": "Exec ask mode (off|on-miss|always).", "type": "string" },
      "node": { "description": "Node id/name for host=node.", "type": "string" }
    },
    "required": ["command"]
  }
},
{
  "name": "bash",
  "description": "Execute shell commands with background continuation. Use yieldMs/background to continue later via process tool. Use pty=true for TTY-required commands (terminal UIs, coding agents).",
  "input_schema": {
    "type": "object",
    "properties": {
      "command": { "description": "Shell command to execute", "type": "string" },
      "workdir": { "description": "Working directory (defaults to cwd)", "type": "string" },
      "env": { "type": "object" },
      "yieldMs": { "description": "Milliseconds to wait before backgrounding (default 10000)", "type": "number" },
      "background": { "description": "Run in background immediately", "type": "boolean" },
      "timeout": { "description": "Timeout in seconds (optional, kills process on expiry)", "type": "number" },
      "pty": { "description": "Run in a pseudo-terminal (PTY) when available (TTY-required CLIs, coding agents)", "type": "boolean" },
      "elevated": { "description": "Run on the host with elevated permissions (if allowed)", "type": "boolean" },
      "host": { "description": "Exec host (sandbox|gateway|node).", "type": "string" },
      "security": { "description": "Exec security mode (deny|allowlist|full).", "type": "string" },
      "ask": { "description": "Exec ask mode (off|on-miss|always).", "type": "string" },
      "node": { "description": "Node id/name for host=node.", "type": "string" }
    },
    "required": ["command"]
  }
}

What

  • Stop registering the bash alias tool in the tool list.
  • Remove the bash entry from tool display metadata.
  • Trim bash from the runtime tool group and adjust the test expectation.

Notes

  • The bash -> exec alias normalization remains so existing configs using bash continue to work.

Testing

  • Not run (tool alias removal only).

@steipete steipete self-assigned this Jan 24, 2026
@steipete
Copy link
Contributor

Ahh great find, missed that when i renamed it. Thanks Tak!

@steipete steipete merged commit ff52aec into openclaw:main Jan 24, 2026
21 of 22 checks passed
@steipete
Copy link
Contributor

Landed via temp rebase onto main.\n\n- Gate: pnpm lint && pnpm build && pnpm test\n- Land commit: aae9a7f\n- Merge commit: ff52aec\n\nThanks @Takhoffman!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants