Skip to content

fix(acp): show command in permission dialog title#32751

Closed
bcdady wants to merge 3 commits into
anomalyco:devfrom
bcdady:fix/acp-permission-reply-routing
Closed

fix(acp): show command in permission dialog title#32751
bcdady wants to merge 3 commits into
anomalyco:devfrom
bcdady:fix/acp-permission-reply-routing

Conversation

@bcdady

@bcdady bcdady commented Jun 18, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #

Type of change

  • Bug fix

What does this PR do?

Make bash command visible in permission dialog in ACP mode.

Context: PR #32304 (fix(acp): show shell command in ACP tool calls) fixed this for the running state but not the permission dialog. This change closes that gap.

When OpenCode requests permission via ACP (e.g. in Zed), the dialog title is `bash` instead of the command string.

Root cause: acp/permission.ts sends title: permission.permission ("bash") to Zed's requestPermission call. The command string is only available as rawInput, which Zed renders after user response.

Fix

Add `permissionTitle()` to extract `metadata.command` (or `metadata.cmd`) for shell tools, so the dialog shows the command string in the approval prompt.

This mirrors the `toolTitle()` logic in `tool.ts` for running/completed tool call updates (landed in #32304).

How did you verify your code works?

Running it locally as ACP in Zed editor (v1.7.2)

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.

@github-actions

Copy link
Copy Markdown
Contributor

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • No issue referenced. Please add Closes #<number> linking to the relevant issue.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Jun 18, 2026
@github-actions

Copy link
Copy Markdown
Contributor

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

I found one potentially related PR that you should be aware of:

PR #28921: fix(acp): include shell command and file path in permission prompts

The current PR #32751 is specifically addressing a gap left by PR #32304 where the permission dialog title wasn't showing the command string. PR #28921 from earlier might have different or overlapping approaches to the same problem area that are worth reviewing to ensure consistency.

@bcdady bcdady closed this Jun 18, 2026
@bcdady

bcdady commented Jun 18, 2026

Copy link
Copy Markdown
Author

Redundant with #28921

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

Labels

needs:compliance This means the issue will auto-close after 2 hours. needs:issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant