Skip to content

[chore] Add Claude harness on Daytona sandbox#5048

Draft
junaway wants to merge 2 commits into
big-agentsfrom
chore/add-claude-daytona
Draft

[chore] Add Claude harness on Daytona sandbox#5048
junaway wants to merge 2 commits into
big-agentsfrom
chore/add-claude-daytona

Conversation

@junaway

@junaway junaway commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Context

Claude was the one harness x sandbox cell missing from the matrix on Daytona (it already worked on local and, in a sibling branch, on E2B). Both Codex-style credential modes needed a Daytona-side provisioning path analogous to the existing Pi one.

Changes

Adds prepareDaytonaClaudeAssets / uploadClaudeAuthToSandbox in daytona.ts. Own-login credential upload uses an explicit allow-list of exactly [".credentials.json"] (never a directory scan) sourced from process.env.CLAUDE_CONFIG_DIR || join(homedir(), ".claude"), written to DAYTONA_CLAUDE_DIR (defaults to /home/sandbox/.claude, overridable via AGENTA_AGENT_SANDBOX_CLAUDE_DIR). Managed-credential mode is also supported.

Tests / notes

  • New coverage in sandbox-agent-daytona.test.ts covering both credential modes and the allow-list behavior.
  • Note: chore/add-remote-tools-gate in this same batch means Claude-on-Daytona runs with tools will hit the new loud-refuse gate rather than silently dropping tools, until the relay-client shim lands.

jp-agenta and others added 2 commits July 2, 2026 15:10
…t test

The heartbeat contract dropped the status field (the API derives ended
server-side when the heartbeat stops); the test still asserted it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…tial modes)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 2, 2026 21:41
@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jul 2, 2026
@vercel

vercel Bot commented Jul 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agenta-documentation Ready Ready Preview, Comment Jul 2, 2026 9:42pm

Request Review

@dosubot dosubot Bot added documentation Improvements or additions to documentation tests labels Jul 2, 2026
@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 5624a208-9378-427d-87ca-dcdd40001f45

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/add-claude-daytona

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds the missing Claude × Daytona cell to the runner’s sandbox matrix by provisioning Claude “own-login” credentials into Daytona sandboxes (with a strict allow-list), wiring the provisioning into the Daytona run flow, and extending unit coverage to cover both managed and runtime-provided credential modes.

Changes:

  • Add Daytona Claude asset preparation (prepareDaytonaClaudeAssets) and host → sandbox credential upload (uploadClaudeAuthToSandbox) with an explicit allow-list for .credentials.json.
  • Wire Claude Daytona preparation into runSandboxAgent alongside existing Pi Daytona preparation.
  • Extend unit tests to cover Claude Daytona credential behavior (including env overrides and best-effort error handling) and update the alive-heartbeat test to reflect the current heartbeat contract.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
services/runner/tests/unit/session-alive.test.ts Updates the release-heartbeat assertion to match the heartbeat payload contract (no status field).
services/runner/tests/unit/sandbox-agent-daytona.test.ts Adds unit coverage for Claude-on-Daytona credential upload behavior and env override handling.
services/runner/src/engines/sandbox_agent/daytona.ts Implements Claude credential upload + Daytona Claude asset preparation, including destination-dir override support.
services/runner/src/engines/sandbox_agent.ts Invokes the new Daytona Claude preparation during Daytona runs.
docs/design/agent-workflows/projects/add-claude-daytona/tasks.md Adds project task checklist for Claude-on-Daytona work.
docs/design/agent-workflows/projects/add-claude-daytona/specs.md Adds detailed specs/acceptance criteria for Claude-on-Daytona credential provisioning behavior.
docs/design/agent-workflows/projects/add-claude-daytona/research.md Documents investigation findings and rationale for the chosen implementation shape.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jp-agenta jp-agenta marked this pull request as draft July 2, 2026 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size:L This PR changes 100-499 lines, ignoring generated files. tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants