Repository navigation
Add onctl claude: Claude Code on a box, ported from boxctl - #1173
Merged
Merged
Conversation
Rollout step 3 of docs/plans/boxes-provider.md. boxctl's claude command and everything under it -- --task worktrees and --own-box, --handoff of a local session, ls, fetch/push with box/wip, login/logout for the Claude token, and --github forward|store|off -- moves here with its tests, running on the boxes provider through onctl's providerboxes client and onctl ssh-proxy. onctl claude always uses boxes (it needs the claude-agent image's tools and the tunnel); another -p is refused. --prompt lost its -p shorthand, which is onctl's global --provider. Local state moves to ~/.onctl/claude and keeps reading boxctl's: its ssh key (also the Claude Code plugin's), its Claude token file and Keychain entry, and BOXCTL_GITHUB_TOKEN beside the new ONCTL_GITHUB_TOKEN. Logging out clears both. Everything on the box -- /root/.boxctl, /run/boxctl, refs/boxctl/wip, BOXCTL_GH_SOCKET -- is unchanged, so existing boxes and the current claude-agent image keep working. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U8g3mHkS6JmtYVYc4AjcV4
cdalar
enabled auto-merge
October 4, 2026 22:05
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1173 +/- ##
==========================================
- Coverage 39.83% 39.07% -0.76%
==========================================
Files 61 68 +7
Lines 6384 7296 +912
==========================================
+ Hits 2543 2851 +308
- Misses 3841 4445 +604 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rollout step 3 of
docs/plans/boxes-provider.md. boxctl'sclaudecommand moves here with its tests, running on the boxes provider:What changed in the port
Boxes only:
onctl claudealways uses boxes, since it needs theclaude-agentimage's tools and the tunnel. Any other-pis refused.--promptlost its-pshorthand, which is onctl's global--provider. Cobra would otherwise panic at startup.New local state, with boxctl's still read: state now lives in
~/.onctl/claude, and boxctl's is still read, so nothing has to be redone:BOXCTL_GITHUB_TOKEN, next to the newONCTL_GITHUB_TOKEN.onctl claude logoutclears both.Nothing changes on the box:
/root/.boxctl,/run/boxctl,refs/boxctl/wipandBOXCTL_GH_SOCKETkeep their names, so existing boxes and the currentclaude-agentimage keep working.Uses onctl's own pieces: the
providerboxesclient (plusSetIdleTTL) andonctl ssh-proxy -p boxes.sshProxyHostis now shared withssh-proxy.Tests
go test -race -shuffle=on ./...passed 3 times in a row; golangci-lint is clean.Live, against boxctl.io (throwaway project and box, destroyed afterwards):
onctl claude --detachcreated the box, copied the project, installed Claude Code 2.1.289 and started Claude in tmux:.envwas left out.onctl claude lsshowed the session.box/mainviaonctl claude fetch.--task t1made its own worktree and branch;lsshowed both sessions.onctl claude push featuresent a local branch to the box.Not exercised live: interactive attach with GitHub forwarding,
--handoff, andonctl claude login. These need a terminal and your Claude token. Their code paths are unchanged from boxctl and covered by its unit tests.Next: step 4, moving the Claude Code plugin here (
/onctl:on…), then step 5, retiring boxctl.🤖 Generated with Claude Code
https://claude.ai/code/session_01U8g3mHkS6JmtYVYc4AjcV4