fix: pair ACP permissions, hide self-reporting tools, cap oversized event content#439
Open
AlexanderZ-Band wants to merge 3 commits into
Open
Conversation
Permission requests now emit matched tool_call and tool_result events with a shared call ID and explicit outcome. ACP narration for self-reporting Band tools (band_send_message, band_send_event, and standalone MCP message names) is suppressed so visible room output is not duplicated or ordered after its own reply. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…-1014] The Agent Events API rejects content over 16384 chars with a 422, which the ACP/GitHub Copilot backend hit when mirroring large tool_call/tool_result payloads (e.g. get_file_contents on a big file). AgentTools.send_event now truncates oversized content at the shared chokepoint, keeping both the head and tail of the string so the tail (often the informative part of a raw error dump) isn't silently dropped. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This was referenced Jul 14, 2026
…ent content
ACPCollectingClient._tool_result_chunk only read update.raw_output; agents
that report output via the content block list instead (e.g. Copilot's ACP
agent on a plain `env` run) fell through to an empty string, which the
Agent Events API rejects with a 422 ("content can't be blank") and tears
down the whole ACP session via on_message's error handler. Recover real
text from content blocks (filtered by their explicit type tag, not by
diff/terminal entries happening to lack a .content attribute), and add a
send_event placeholder for the cases with no text at all.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tool_call/tool_resultevents with a shared call ID and explicit outcome; ACP narration for self-reporting Band tools (band_send_message,band_send_event,create_agent_chat_message) is suppressed so visible room output isn't duplicated or ordered after its own reply.AgentTools.send_eventnow truncates oversized event content at the shared chokepoint (16384 char cap enforced by the Agent Events API) instead of failing the send with a 422, keeping both head and tail of the string.Combines #423 and #437 into a single branch/PR against
dev. Both source PRs will be closed as superseded.Test plan
uv run ruff check .uv run pytest tests/runtime/test_tools.py tests/integrations/acp/ -q --no-cov(352 passed, 8 skipped)🤖 Generated with Claude Code