Skip to content

docs: align ACP agent example#384

Closed
enyst wants to merge 1 commit intomainfrom
feat/acp-agent
Closed

docs: align ACP agent example#384
enyst wants to merge 1 commit intomainfrom
feat/acp-agent

Conversation

@enyst
Copy link
Collaborator

@enyst enyst commented Mar 6, 2026

Summary

  • Align ACPAgent guide example with examples/01_standalone_sdk/40_acp_agent_example.py

Related

Co-authored-by: openhands <openhands@all-hands.dev>
Copy link
Contributor

@all-hands-bot all-hands-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Needs improvement - This PR diverges from the upstream example file instead of aligning with it.

Verdict:Needs rework

Key Insight: The actual example file in software-agent-sdk uses a different package name and includes ask_agent() functionality that this PR removes.



agent = ACPAgent(acp_command=["npx", "-y", "@zed-industries/claude-code-acp"])
agent = ACPAgent(acp_command=["npx", "-y", "claude-code-acp"])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Critical: Wrong package name. The actual example file uses @zed-industries/claude-agent-acp (verified at https://github.com/OpenHands/software-agent-sdk/blob/main/examples/01_standalone_sdk/40_acp_agent_example.py#L22).

The package you changed to (claude-code-acp) is a different, less maintained package (last updated Sept 2025 at v0.1.1), while @zed-industries/claude-agent-acp is actively maintained (updated Mar 4, 2026 at v0.20.2).

Suggested change
agent = ACPAgent(acp_command=["npx", "-y", "claude-code-acp"])
agent = ACPAgent(acp_command=["npx", "-y", "@zed-industries/claude-agent-acp"])

@@ -106,9 +106,7 @@ This example is available on GitHub: [examples/01_standalone_sdk/40_acp_agent_ex
"""Example: Using ACPAgent with Claude Code ACP server.

This example shows how to use an ACP-compatible server (claude-code-acp)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Critical: The docstring in the upstream example file still mentions and demonstrates ask_agent(). This is a real feature that was added in PR #2145 and is actively used in the example.

Removing this documentation diverges from the source file. The upstream docstring says: "It also demonstrates ask_agent() — a stateless side-question that forks the ACP session and leaves the main conversation untouched."

"List the Python source files under openhands-sdk/openhands/sdk/agent/, "
"then read the __init__.py and summarize what agent classes are exported."
)
conversation.run()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Critical: The upstream example file includes the ask_agent() demonstration (lines 35-40). This PR removes it, which contradicts the goal of "aligning" with the example.

The removed code demonstrates an important feature:

# --- ask_agent: stateless side-question via fork_session ---
print("\n--- ask_agent ---")
response = conversation.ask_agent(
    "Based on what you just saw, which agent class is the newest addition?"
)
print(f"ask_agent response: {response}")

This should be kept to match the actual example file.

@enyst enyst closed this Mar 6, 2026
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.

3 participants