Skip to content

fix(acp): deduplicate tool definitions and flush after native tool loop#827

Merged
bug-ops merged 1 commit intomainfrom
fix/acp-tool-dedup-and-flush
Feb 25, 2026
Merged

fix(acp): deduplicate tool definitions and flush after native tool loop#827
bug-ops merged 1 commit intomainfrom
fix/acp-tool-dedup-and-flush

Conversation

@bug-ops
Copy link
Owner

@bug-ops bug-ops commented Feb 25, 2026

Summary

  • CompositeExecutor.tool_definitions() now deduplicates tools by id (first executor wins), fixing Claude API 400 "Tool names must be unique" when ACP wires duplicate bash executors
  • process_response_native_tools() now calls flush_chunks() on all exit paths (Text response and loop break), so the ACP session correctly emits a Flush event and transitions back to idle — fixing "prompt already in progress" on subsequent requests

Test plan

  • cargo clippy --workspace -- -D warnings passes
  • cargo nextest run --workspace --lib --bins — 2691 passed
  • Manual: send prompt via ACP, verify session accepts follow-up prompt after response

CompositeExecutor.tool_definitions() now deduplicates by tool id
(first-wins), preventing Claude API 400 "Tool names must be unique".

process_response_native_tools() now calls flush_chunks() on all exit
paths, so the ACP session correctly transitions back to idle and
accepts subsequent prompts.
@github-actions github-actions bot added bug Something isn't working size/XS rust core and removed size/XS labels Feb 25, 2026
@bug-ops bug-ops enabled auto-merge (squash) February 25, 2026 00:41
@bug-ops bug-ops merged commit 6dc29db into main Feb 25, 2026
21 checks passed
@bug-ops bug-ops deleted the fix/acp-tool-dedup-and-flush branch February 25, 2026 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working core rust

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant