Skip to content

acp_thread: Preserve waiting tool call status on updates - #58537

Merged
benbrandt merged 6 commits into
mainfrom
fix-permission-acp
Jun 11, 2026
Merged

acp_thread: Preserve waiting tool call status on updates#58537
benbrandt merged 6 commits into
mainfrom
fix-permission-acp

Conversation

@benbrandt

@benbrandt benbrandt commented Jun 4, 2026

Copy link
Copy Markdown
Member

Allows contents to update without dropping the permission (caused by
claude subagents)

Closes
agentclientprotocol/claude-agent-acp#708

Self-Review Checklist:

  • I've reviewed my own diff for quality, security, and reliability
  • Unsafe blocks (if any) have justifying comments
  • The content is consistent with the UI/UX checklist
  • Tests cover the new/changed behavior
  • Performance impact has been considered and is acceptable

Release Notes:

  • acp: Fix failed permissions requests for external agents

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Jun 4, 2026
@zed-community-bot zed-community-bot Bot added the staff Pull requests authored by a current member of Zed staff label Jun 4, 2026
@benbrandt benbrandt changed the title acp_thread: reserve waiting tool call status on updates acp_thread: Preserve waiting tool call status on updates Jun 4, 2026
@benbrandt
benbrandt requested a review from bennetbo June 4, 2026 12:16
@benbrandt benbrandt closed this Jun 5, 2026
@benbrandt benbrandt reopened this Jun 9, 2026
@benbrandt

Copy link
Copy Markdown
Member Author

@bennetbo I dug in to the issue you were worried about and I think we are actually ok, because we replace once we send the response:

let new_status =
if is_action_choice {
ToolCallStatus::InProgress
} else {
match outcome.option_kind {
acp::PermissionOptionKind::RejectOnce
| acp::PermissionOptionKind::RejectAlways => ToolCallStatus::Rejected,
acp::PermissionOptionKind::AllowOnce
| acp::PermissionOptionKind::AllowAlways => ToolCallStatus::InProgress,
_ => ToolCallStatus::InProgress,
}
};
let curr_status = mem::replace(&mut call.status, new_status);
if let ToolCallStatus::WaitingForConfirmation { respond_tx, .. } = curr_status {
respond_tx.send(outcome).ok();
}

@benbrandt
benbrandt force-pushed the fix-permission-acp branch from 6ccafcc to 4791ebc Compare June 9, 2026 09:32
@benbrandt
benbrandt added this pull request to the merge queue Jun 11, 2026
Merged via the queue into main with commit d7ac5e6 Jun 11, 2026
32 checks passed
@benbrandt
benbrandt deleted the fix-permission-acp branch June 11, 2026 10:21
This was referenced Jun 18, 2026
jonx pushed a commit to jonx/zed-aros that referenced this pull request Jul 17, 2026
…ies#58537)

Allows contents to update without dropping the permission (caused by
claude subagents)

Closes
agentclientprotocol/claude-agent-acp#708

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- acp: Fix failed permissions requests for external agents
jolutz pushed a commit to jolutz/zed that referenced this pull request Aug 8, 2026
…ies#58537)

Allows contents to update without dropping the permission (caused by
claude subagents)

Closes
agentclientprotocol/claude-agent-acp#708

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- acp: Fix failed permissions requests for external agents
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement staff Pull requests authored by a current member of Zed staff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants