Skip to content

fix(bash): make description optional for tool calls#13288

Open
ymylive wants to merge 1 commit intoanomalyco:devfrom
ymylive:fix/issue-13146-bash-description
Open

fix(bash): make description optional for tool calls#13288
ymylive wants to merge 1 commit intoanomalyco:devfrom
ymylive:fix/issue-13146-bash-description

Conversation

@ymylive
Copy link

@ymylive ymylive commented Feb 12, 2026

Fixes #13146

Summary

  • Make description optional in BashTool input schema
  • Add a fallback description (Run shell command) when callers omit it
  • Add regression test to verify bash.execute({ command }) works without description

Why

Some clients/tool-call paths invoke bash with only command. Requiring description causes schema validation errors and makes bash effectively unusable in those flows.

Scope

  • packages/opencode/src/tool/bash.ts
  • packages/opencode/test/tool/bash.test.ts

@github-actions
Copy link
Contributor

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

No duplicate PRs found

@SeanThomasWilliams
Copy link

We're seeing this issue in production with NVIDIA Nemotron-3-Nano (30B-A3B, AWQ variant) served via vLLM on DGX Spark hardware. The model was trained without the description parameter and omits it in ~78% of multi-turn bash tool calls, causing validation failures.

Validation evidence from our testing:

  • Single-turn bash calls: 100% include description when prompted via system message, but this breaks down in multi-turn agentic workflows where context depth increases.
  • Multi-turn agentic exercises (Bug Hunt, TDD, Spec-to-Code): ~22% bash call success rate without this fix.
  • Temperature sweep (0.0-0.6): Does not affect schema adherence — the issue is structural, not sampling-related.
  • Cross-model: This affects multiple open-weight models (confirmed in issue discussion), not just Nemotron.

Our workaround: Custom tool override via .opencode/tools/bash.ts that makes description optional with a fallback string. Works but shouldn't be necessary for a core tool parameter that many models weren't trained with.

This fix would significantly improve opencode's compatibility with open-weight models. The approach in this PR (optional schema + fallback) is exactly right.

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.

Bash(ls -la) tool description parameter is required but not exposed in tool schema — breaks all bash calls

3 participants