Skip to content

fix: show command as description for shell escape (!) tool calls#22113

Open
leoleoasd wants to merge 1 commit intoanomalyco:devfrom
leoleoasd:fix/shell-escape-description
Open

fix: show command as description for shell escape (!) tool calls#22113
leoleoasd wants to merge 1 commit intoanomalyco:devfrom
leoleoasd:fix/shell-escape-description

Conversation

@leoleoasd
Copy link
Copy Markdown

Issue for this PR

Closes #22112

Type of change

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

What does this PR do?

When using ! shell escape, the tool part is created with input: { command } but no description. The agent-invoked bash tool always provides a description (a required parameter in the schema) which shows as the subtitle in the Shell tool header. Shell escape commands show nothing.

One-line fix in packages/opencode/src/session/prompt.ts -- sets description to the command text itself so the user can see what command was run in the tool header.

How did you verify your code works?

Ran bun run dev web, used !sleep 1s shell escape, confirmed the command text now appears as the subtitle in the Shell tool header after completion.

Checklist

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

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.

[BUG] Shell escape (!) commands show no description in tool header

1 participant