Skip to content

Visualize ACP tool calls#2162

Merged
simonrosenberg merged 2 commits intomainfrom
feat/acp-tool-call-visualization
Feb 23, 2026
Merged

Visualize ACP tool calls#2162
simonrosenberg merged 2 commits intomainfrom
feat/acp-tool-call-visualization

Conversation

@simonrosenberg
Copy link
Collaborator

@simonrosenberg simonrosenberg commented Feb 20, 2026

Summary

  • New ACPToolCallEvent — surfaces ACP ToolCallStart/ToolCallProgress notifications as OpenHands events, rendered in the visualizer before the final agent message
  • Fix nested session launch — strip CLAUDECODE env var so the official @zed-industries/claude-code-acp server can start when running inside Claude Code
  • Remove misleading system prompt — ACP agents no longer emit SystemPromptEvent with "Tools Available: 0" since the ACP server manages its own prompt and tools
  • Skip empty input/output — tool call visualization omits Input: {} when raw_input is an empty dict

Test plan

  • uv run pytest tests/sdk/agent/test_acp_agent.py -v — 53 tests pass (7 new)
  • uv run pytest tests/sdk/ -q — no regressions
  • uv run ruff check && uv run ruff format --check — lint clean
  • uv run python examples/01_standalone_sdk/40_acp_agent_example.py — verify tool calls render before final message

🤖 Generated with Claude Code


Agent Server images for this PR

GHCR package: https://github.com/OpenHands/agent-sdk/pkgs/container/agent-server

Variants & Base Images

Variant Architectures Base Image Docs / Tags
java amd64, arm64 eclipse-temurin:17-jdk Link
python amd64, arm64 nikolaik/python-nodejs:python3.12-nodejs22 Link
golang amd64, arm64 golang:1.21-bookworm Link

Pull (multi-arch manifest)

# Each variant is a multi-arch manifest supporting both amd64 and arm64
docker pull ghcr.io/openhands/agent-server:e4beaf0-python

Run

docker run -it --rm \
  -p 8000:8000 \
  --name agent-server-e4beaf0-python \
  ghcr.io/openhands/agent-server:e4beaf0-python

All tags pushed for this build

ghcr.io/openhands/agent-server:e4beaf0-golang-amd64
ghcr.io/openhands/agent-server:e4beaf0-golang_tag_1.21-bookworm-amd64
ghcr.io/openhands/agent-server:e4beaf0-golang-arm64
ghcr.io/openhands/agent-server:e4beaf0-golang_tag_1.21-bookworm-arm64
ghcr.io/openhands/agent-server:e4beaf0-java-amd64
ghcr.io/openhands/agent-server:e4beaf0-eclipse-temurin_tag_17-jdk-amd64
ghcr.io/openhands/agent-server:e4beaf0-java-arm64
ghcr.io/openhands/agent-server:e4beaf0-eclipse-temurin_tag_17-jdk-arm64
ghcr.io/openhands/agent-server:e4beaf0-python-amd64
ghcr.io/openhands/agent-server:e4beaf0-nikolaik_s_python-nodejs_tag_python3.12-nodejs22-amd64
ghcr.io/openhands/agent-server:e4beaf0-python-arm64
ghcr.io/openhands/agent-server:e4beaf0-nikolaik_s_python-nodejs_tag_python3.12-nodejs22-arm64
ghcr.io/openhands/agent-server:e4beaf0-golang
ghcr.io/openhands/agent-server:e4beaf0-java
ghcr.io/openhands/agent-server:e4beaf0-python

About Multi-Architecture Support

  • Each variant tag (e.g., e4beaf0-python) is a multi-arch manifest supporting both amd64 and arm64
  • Docker automatically pulls the correct architecture for your platform
  • Individual architecture tags (e.g., e4beaf0-python-amd64) are also available if needed

@simonrosenberg simonrosenberg force-pushed the feat/acp-tool-call-visualization branch from e8e9207 to df4e1b5 Compare February 20, 2026 22:10
@simonrosenberg simonrosenberg self-assigned this Feb 21, 2026
ACPAgent previously discarded all tool call data from the ACP server,
emitting only a single MessageEvent with the final text. This change
surfaces the complete execution trajectory through the event system.

- Add ACPToolCallEvent (extends Event, not LLMConvertibleEvent) with
  fields: tool_call_id, title, status, tool_kind, raw_input, raw_output
- Accumulate ToolCallStart/ToolCallProgress in _OpenHandsACPBridge
- Emit ACPToolCallEvent for each tool call before the final MessageEvent
- Register in EVENT_VISUALIZATION_CONFIG for visualizer rendering
- Remove misleading SystemPromptEvent ("Tools Available: 0") from ACP
- Strip CLAUDECODE env var so official ACP server works inside Claude Code
- Switch example to official @zed-industries/claude-code-acp package

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@simonrosenberg simonrosenberg force-pushed the feat/acp-tool-call-visualization branch from df4e1b5 to fa69108 Compare February 21, 2026 09:59
@github-actions
Copy link
Contributor

github-actions bot commented Feb 21, 2026

API breakage checks (Griffe)

Result: Passed

Action log

@github-actions
Copy link
Contributor

github-actions bot commented Feb 21, 2026

Coverage

Coverage Report •
FileStmtsMissCoverMissing
openhands-sdk/openhands/sdk/agent
   acp_agent.py2945581%113–115, 169–172, 174–175, 202, 204, 208, 214, 225–226, 231, 298, 359–360, 397, 407, 412, 423–426, 432–434, 437–439, 441, 443–444, 446, 448, 453, 461–462, 466–467, 471, 478, 481–482, 484, 486–488, 523, 527–528, 652–653
openhands-sdk/openhands/sdk/conversation/visualizer
   default.py1451688%80–81, 83–88, 90, 119, 139, 150, 161, 265, 302, 339
openhands-sdk/openhands/sdk/event
   acp_tool_call.py462839%39–40, 43–49, 52–57, 60–65, 67, 70–75
TOTAL18747566169% 

ACP agent output now shows a "System Prompt" section explaining
that the prompt and tools are managed by the ACP server, giving
visual parity with regular agent conversations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@simonrosenberg
Copy link
Collaborator Author

Screenshot 2026-02-23 at 14 13 03

@simonrosenberg simonrosenberg changed the title Visualize ACP tool call trajectories in conversation output Visualize ACP tool calls Feb 23, 2026
@simonrosenberg simonrosenberg merged commit 5b1ae83 into main Feb 23, 2026
29 of 30 checks passed
@simonrosenberg simonrosenberg deleted the feat/acp-tool-call-visualization branch February 23, 2026 17:50
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.

2 participants