Skip to content

[agents, examples] feat: support Claude Code on OpenYuanRong - #170

Open
Mengyuyang wants to merge 1 commit into
verl-project:mainfrom
Mengyuyang:codex/claude-code-openyuanrong-main
Open

[agents, examples] feat: support Claude Code on OpenYuanRong#170
Mengyuyang wants to merge 1 commit into
verl-project:mainfrom
Mengyuyang:codex/claude-code-openyuanrong-main

Conversation

@Mengyuyang

@Mengyuyang Mengyuyang commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Add an opt-in OpenYuanRong task configuration for running the existing Claude Code agent in SWE-Bench and SWE-ReBench sandboxes. The configuration mounts a prebuilt Claude Code sidecar and uses its explicit CLI path, so OpenYuanRong rollouts do not install or upgrade Claude Code inside each sandbox.

The standalone verl inference runner also propagates resolved editable package roots and the existing OpenYuanRong environment to Ray workers. This prevents driver/worker vllm import mismatches before expensive rollout actors are created.
PixPin_2026-09-07_19-44-20

Changes

Add examples/quickstart/training/task_config_claude_code_openyuanrong.yaml.

Configure swe_bench and swe_rebench with the openyuanrong sandbox provider, OpenYuanRong registry image mapping, sidecar mount, tunnel proxy port, rollout timeout, and Claude Code prompt/model defaults.

Add optional agent.executable to ClaudeCodeConfig, defaulting to claude for backward compatibility.

When agent.executable is an explicit path such as /opt/claude-code/bin/claude, validate it with test -x before rollout execution.

Fail explicitly when the configured sidecar executable is unavailable. The explicit-path mode never falls back to npm or native Claude Code installation.

Keep the existing PATH-based claude discovery and installation fallback unchanged when no explicit executable path is configured.

Add Ray runtime-environment helpers that resolve physical package roots for vllm, verl, and uni_agent, then forward them to Ray workers through the first ray.init() call.

Forward already configured OpenYuanRong environment variables to nested rollout workers and validate the worker-side engine import before creating the rollout worker group.

Configuration and API

- name: swe_bench
  sandbox:
    provider: openyuanrong
    image_map:
      - from: "swebench/**"
        to: "swr.cn-east-3.myhuaweicloud.com/openyuanrong/swe-bench-verified/**:v2"
    sandbox_kwargs:
      proxy_port: 38197
      mounts:
        - target: /opt/claude-code
          image_url: swr.cn-east-3.myhuaweicloud.com/openyuanrong/claude-code-tool:latest
  agent:
    name: claude_code
    executable: /opt/claude-code/bin/claude

@codecov-commenter

codecov-commenter commented Sep 3, 2026

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@Mengyuyang
Mengyuyang force-pushed the codex/claude-code-openyuanrong-main branch from e6d1b89 to ecc94b7 Compare September 3, 2026 12:13
@Mengyuyang Mengyuyang changed the title feat: support Claude Code on OpenYuanRong [agents, examples] feat: support Claude Code on OpenYuanRong Sep 3, 2026
Comment on lines +70 to +76
_OPENYUANRONG_RUNTIME_ENV_KEYS = (
"OPENYUANRONG_SERVER_ADDRESS",
"OPENYUANRONG_TOKEN",
"OPENYUANRONG_TUNNEL_SSL_VERIFY",
"USE_OPENYUANRONG_SDK",
"SANDBOX_NAME_PREFIX",
)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Do not modify this file; inject these envs into the ray env.

Comment thread uni_agent/agents/claude_code/agent.py Outdated
Comment on lines +69 to +73
executable: str = Field(
default="claude",
min_length=1,
description="Claude Code executable name or explicit sidecar path.",
)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The real execution path should be injected into the env during sandbox start. This file is not expected to modify, too.

Comment thread uni_agent/runtime_env.py Outdated
@@ -0,0 +1,34 @@
"""Helpers for constructing Ray worker runtime environments."""

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

what's the purpose of this file?

@Mengyuyang
Mengyuyang force-pushed the codex/claude-code-openyuanrong-main branch 2 times, most recently from a078d0b to 2af2d18 Compare September 7, 2026 03:05
@Mengyuyang
Mengyuyang force-pushed the codex/claude-code-openyuanrong-main branch from 2af2d18 to 1b3f756 Compare September 7, 2026 11:00
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