Skip to content

Commit ed924a3

Browse files
Revert PR #2190: Enable ACPAgent on RemoteRuntime API (#2451)
Co-authored-by: openhands <openhands@all-hands.dev>
1 parent 463006b commit ed924a3

File tree

10 files changed

+54
-777
lines changed

10 files changed

+54
-777
lines changed

.github/workflows/run-eval.yml

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -97,18 +97,6 @@ on:
9797
- gemini
9898
- gpt5
9999
- planning
100-
agent_type:
101-
description: >-
102-
Agent type: 'default' for standard Agent,
103-
'acp-claude' for ACPAgent with Claude Code,
104-
'acp-codex' for ACPAgent with Codex.
105-
required: false
106-
default: default
107-
type: choice
108-
options:
109-
- default
110-
- acp-claude
111-
- acp-codex
112100

113101

114102
env:
@@ -331,7 +319,6 @@ jobs:
331319
ENABLE_CONVERSATION_EVENT_LOGGING: ${{ github.event.inputs.enable_conversation_event_logging || false }}
332320
MAX_RETRIES: ${{ github.event.inputs.max_retries || '3' }}
333321
TOOL_PRESET: ${{ github.event.inputs.tool_preset || 'default' }}
334-
AGENT_TYPE: ${{ github.event.inputs.agent_type || 'default' }}
335322
TRIGGERED_BY: ${{ github.actor }}
336323
run: |
337324
echo "Dispatching evaluation workflow with SDK commit: $SDK_SHA (benchmark: $BENCHMARK, eval branch: $EVAL_BRANCH, benchmarks branch: $BENCHMARKS_BRANCH, tool preset: $TOOL_PRESET)"
@@ -350,9 +337,8 @@ jobs:
350337
--argjson enable_conversation_event_logging "$ENABLE_CONVERSATION_EVENT_LOGGING" \
351338
--arg max_retries "$MAX_RETRIES" \
352339
--arg tool_preset "$TOOL_PRESET" \
353-
--arg agent_type "$AGENT_TYPE" \
354340
--arg triggered_by "$TRIGGERED_BY" \
355-
'{ref: $ref, inputs: {sdk_commit: $sdk, eval_limit: $eval_limit, models_json: ($models | tostring), trigger_reason: $reason, pr_number: $pr, benchmarks_branch: $benchmarks, benchmark: $benchmark, instance_ids: $instance_ids, num_infer_workers: $num_infer_workers, num_eval_workers: $num_eval_workers, enable_conversation_event_logging: $enable_conversation_event_logging, max_retries: $max_retries, tool_preset: $tool_preset, agent_type: $agent_type, triggered_by: $triggered_by}}')
341+
'{ref: $ref, inputs: {sdk_commit: $sdk, eval_limit: $eval_limit, models_json: ($models | tostring), trigger_reason: $reason, pr_number: $pr, benchmarks_branch: $benchmarks, benchmark: $benchmark, instance_ids: $instance_ids, num_infer_workers: $num_infer_workers, num_eval_workers: $num_eval_workers, enable_conversation_event_logging: $enable_conversation_event_logging, max_retries: $max_retries, tool_preset: $tool_preset, triggered_by: $triggered_by}}')
356342
RESPONSE=$(curl -sS -o /tmp/dispatch.out -w "%{http_code}" -X POST \
357343
-H "Authorization: token $PAT_TOKEN" \
358344
-H "Accept: application/vnd.github+json" \

examples/01_standalone_sdk/40_acp_agent_example.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
88
Prerequisites:
99
- Node.js / npx available
10-
- ANTHROPIC_BASE_URL and ANTHROPIC_API_KEY set (can point to LiteLLM proxy)
10+
- Claude Code CLI authenticated (or CLAUDE_API_KEY set)
1111
1212
Usage:
1313
uv run python examples/01_standalone_sdk/40_acp_agent_example.py
@@ -38,9 +38,6 @@
3838
"Based on what you just saw, which agent class is the newest addition?"
3939
)
4040
print(f"ask_agent response: {response}")
41-
# Report cost (ACP server reports usage via session_update notifications)
42-
cost = agent.llm.metrics.accumulated_cost
43-
print(f"EXAMPLE_COST: {cost:.4f}")
4441
finally:
4542
# Clean up the ACP server subprocess
4643
agent.close()

examples/02_remote_agent_server/09_acp_agent_with_remote_runtime.py

Lines changed: 0 additions & 87 deletions
This file was deleted.

openhands-agent-server/openhands/agent_server/api.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,6 @@
3838
from openhands.agent_server.tool_router import tool_router
3939
from openhands.agent_server.vscode_router import vscode_router
4040
from openhands.agent_server.vscode_service import get_vscode_service
41-
from openhands.sdk.agent import (
42-
ACPAgent, # noqa: F401 — register in DiscriminatedUnionMixin
43-
)
4441
from openhands.sdk.logger import DEBUG, get_logger
4542

4643

openhands-agent-server/openhands/agent_server/docker/Dockerfile

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -85,22 +85,7 @@ RUN set -eux; \
8585
chown -R ${USERNAME}:${USERNAME} /workspace; \
8686
rm -rf /var/lib/apt/lists/*
8787

88-
# Pre-install ACP servers for ACPAgent support (Claude Code + Codex)
89-
# Install Node.js/npm if not present (SWE-bench base images may lack them)
90-
RUN set -eux; \
91-
if ! command -v npm >/dev/null 2>&1; then \
92-
curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && \
93-
apt-get install -y --no-install-recommends nodejs && \
94-
rm -rf /var/lib/apt/lists/*; \
95-
fi; \
96-
npm install -g @zed-industries/claude-agent-acp @zed-industries/codex-acp
97-
98-
# Configure Claude Code managed settings for headless operation:
99-
# Allow all tool permissions (no human in the loop to approve).
100-
RUN mkdir -p /etc/claude-code && \
101-
echo '{"permissions":{"allow":["Edit","Read","Bash"]}}' > /etc/claude-code/managed-settings.json
102-
103-
# NOTE: we should NOT include UV_PROJECT_ENVIRONMENT here,
88+
# NOTE: we should NOT include UV_PROJECT_ENVIRONMENT here,
10489
# since the agent might use it to perform other work (e.g. tools that use Python)
10590
COPY --from=ghcr.io/astral-sh/uv /uv /uvx /bin/
10691

openhands-agent-server/openhands/agent_server/event_service.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
StoredConversation,
1212
)
1313
from openhands.agent_server.pub_sub import PubSub, Subscriber
14-
from openhands.sdk import LLM, AgentBase, Event, Message, get_logger
14+
from openhands.sdk import LLM, Agent, AgentBase, Event, Message, get_logger
1515
from openhands.sdk.conversation.impl.local_conversation import LocalConversation
1616
from openhands.sdk.conversation.secret_registry import SecretValue
1717
from openhands.sdk.conversation.state import (
@@ -429,8 +429,7 @@ async def start(self):
429429
workspace = self.stored.workspace
430430
assert isinstance(workspace, LocalWorkspace)
431431
Path(workspace.working_dir).mkdir(parents=True, exist_ok=True)
432-
agent_cls = type(self.stored.agent)
433-
agent = agent_cls.model_validate(
432+
agent = Agent.model_validate(
434433
self.stored.agent.model_dump(context={"expose_secrets": True}),
435434
)
436435

0 commit comments

Comments
 (0)