From 42c56ade17f82e67881d22cb706771d80a10956d Mon Sep 17 00:00:00 2001 From: baxyz Date: Sun, 8 Nov 2026 23:44:41 +0000 Subject: [PATCH 1/2] =?UTF-8?q?feat(claude-dev):=20=E2=9C=A8=20add=20remot?= =?UTF-8?q?eControlModel,=20the=20sessions'=20default=20model?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit claude remote-control has no --model flag, and its sessions inherit the server's environment: claude-rc exports the option as ANTHROPIC_MODEL before starting it. claude-rc status shows the model. Co-Authored-By: Claude Opus 5.5 --- AGENTS.md | 2 +- src/claude-dev/README.md | 3 +++ src/claude-dev/claude-rc | 5 +++++ src/claude-dev/devcontainer-feature.json | 7 ++++++- src/claude-dev/install.sh | 2 ++ test/claude-dev/scenarios.json | 3 ++- test/claude-dev/with_remote_control.sh | 9 +++++++++ 7 files changed, 28 insertions(+), 3 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 5bdfafc..3582299 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -64,7 +64,7 @@ version bump" below. | `github-dev` | 1.0.7 | gh CLI, Copilot Chat, PR/Issues/Actions extensions | | `graphite-dev` | 1.0.0 | Graphite CLI (`gt`, via npm) + Graphite VS Code extension, `gt auth` from `GRAPHITE_TOKEN` on start (dependsOn node) | | `copilot-dev` | 1.0.4 | Copilot Chat + AI instructions (commits, PRs, code review) | -| `claude-dev` | 1.4.1 | Claude Code extension + CLI + `~/.claude` named-volume persistence (credentials + memory) + optional Remote Control server (`claude-rc`) | +| `claude-dev` | 1.5.0 | Claude Code extension + CLI + `~/.claude` named-volume persistence (credentials + memory) + optional Remote Control server (`claude-rc`) | | `mistral-dev` | 1.3.2 | Mistral Vibe extension + `~/.vibe` named-volume persistence | | `cline-dev` | 1.1.0 | Cline extension (`saoudrizwan.claude-dev`) + optional CLI + `~/.cline` named-volume persistence | | `kimi-dev` | 1.0.0 | Kimi Code extension (`moonshot-ai.kimi-code`) + optional CLI + `~/.kimi-code` named-volume persistence | diff --git a/src/claude-dev/README.md b/src/claude-dev/README.md index 5afbc2f..fd87fb5 100644 --- a/src/claude-dev/README.md +++ b/src/claude-dev/README.md @@ -147,6 +147,7 @@ convention would silently share one memory/settings bucket under that model. | `remoteControlSpawn` | `same-dir` \| `worktree` | `same-dir` | How the server creates sessions. | | `remoteControlAutoTrust` | boolean | `false` | Answer yes to "Trust this folder?" for the server's folder — see [Trusting the folder](#remote-control-drive-this-devcontainer-from-your-phone-or-another-computer). Without it, run `claude` once in the folder and accept. | | `remoteControlPermissionMode` | string | `""` | Starting permission mode for the server's sessions (e.g. `acceptEdits`, `plan`). Empty: Claude Code's default. | +| `remoteControlModel` | string | `""` | Default model of the server's sessions (`sonnet`, `opus`, or a full model id), exported as `ANTHROPIC_MODEL` to the server; its sessions inherit it. Empty: Claude Code's default. | ## IDE support @@ -197,6 +198,8 @@ without depending on that user's shell profile already including ## Version History +- **v1.5.0**: `remoteControlModel` option: default model of the Remote Control sessions + (`claude remote-control` has no `--model`, so `claude-rc` exports it as `ANTHROPIC_MODEL`). - **v1.4.0**: `CLAUDE_CONFIG_DIR` now points at the volume, so `~/.claude.json` (account, trust) persists too. Added `remoteControl` (off by default) and its `remoteControlName`, `remoteControlDir`, `remoteControlSpawn` and `remoteControlPermissionMode` options: keeps a diff --git a/src/claude-dev/claude-rc b/src/claude-dev/claude-rc index cf55205..c36ce98 100755 --- a/src/claude-dev/claude-rc +++ b/src/claude-dev/claude-rc @@ -31,9 +31,13 @@ RC_NAME_OPTION="" RC_DIR_OPTION="" RC_SPAWN_OPTION="same-dir" RC_PERMISSION_MODE_OPTION="" +RC_MODEL_OPTION="" RC_AUTO_TRUST_OPTION="false" # shellcheck source=/dev/null [ -f "${OPTIONS_FILE}" ] && . "${OPTIONS_FILE}" +# `claude remote-control` has no --model flag: the sessions it spawns inherit the server's +# environment, so the default model goes through ANTHROPIC_MODEL. +if [ -n "${RC_MODEL_OPTION}" ]; then export ANTHROPIC_MODEL="${RC_MODEL_OPTION}"; fi log() { echo "[claude-rc] $*"; } warn() { echo "[claude-rc] ⚠️ $*" >&2; } @@ -303,6 +307,7 @@ cmd_attach() { cmd_status() { echo "remoteControl option: ${RC_ENABLED}" + echo "model: ${ANTHROPIC_MODEL:-default}" if running; then # shellcheck source=/dev/null [ -f "${STATE_FILE}" ] && . "${STATE_FILE}" diff --git a/src/claude-dev/devcontainer-feature.json b/src/claude-dev/devcontainer-feature.json index 2c44b27..086d221 100644 --- a/src/claude-dev/devcontainer-feature.json +++ b/src/claude-dev/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "claude-dev", - "version": "1.4.1", + "version": "1.5.0", "name": "Claude Code Development Environment", "description": "Installs the Claude Code IDE extension (anthropic.claude-code) for VS Code and Cursor, and optionally the claude CLI. Persists ~/.claude (credentials, config, memory) across rebuilds and Codespaces via a Docker named volume, dedicated to this devcontainer. Also self-heals your devcontainer setup.", "documentationURL": "https://github.com/helpers4/devcontainer/tree/main/src/claude-dev", @@ -56,6 +56,11 @@ "type": "string", "default": "", "description": "Starting permission mode for the server's sessions (e.g. acceptEdits, plan). Empty means Claude Code's default." + }, + "remoteControlModel": { + "type": "string", + "default": "", + "description": "Default model of the server's sessions (e.g. sonnet, opus, or a full model id), exported as ANTHROPIC_MODEL to the server. Empty means Claude Code's default." } }, "containerEnv": { diff --git a/src/claude-dev/install.sh b/src/claude-dev/install.sh index bd634a3..8af3844 100755 --- a/src/claude-dev/install.sh +++ b/src/claude-dev/install.sh @@ -20,6 +20,7 @@ REMOTE_CONTROL_NAME="${REMOTECONTROLNAME:-}" REMOTE_CONTROL_DIR="${REMOTECONTROLDIR:-}" REMOTE_CONTROL_SPAWN="${REMOTECONTROLSPAWN:-same-dir}" REMOTE_CONTROL_PERMISSION_MODE="${REMOTECONTROLPERMISSIONMODE:-}" +REMOTE_CONTROL_MODEL="${REMOTECONTROLMODEL:-}" REMOTE_CONTROL_AUTO_TRUST="${REMOTECONTROLAUTOTRUST:-false}" # shellcheck source=/dev/null @@ -155,6 +156,7 @@ install -m 0755 "$(dirname "$0")/claude-rc" /usr/local/bin/claude-rc printf 'RC_DIR_OPTION=%q\n' "${REMOTE_CONTROL_DIR}" printf 'RC_SPAWN_OPTION=%q\n' "${REMOTE_CONTROL_SPAWN}" printf 'RC_PERMISSION_MODE_OPTION=%q\n' "${REMOTE_CONTROL_PERMISSION_MODE}" + printf 'RC_MODEL_OPTION=%q\n' "${REMOTE_CONTROL_MODEL}" printf 'RC_AUTO_TRUST_OPTION=%q\n' "${REMOTE_CONTROL_AUTO_TRUST}" } > /usr/local/share/claude-dev/remote-control.env echo " ✅ Installed /usr/local/bin/claude-rc" diff --git a/test/claude-dev/scenarios.json b/test/claude-dev/scenarios.json index 7725af6..3f8da82 100644 --- a/test/claude-dev/scenarios.json +++ b/test/claude-dev/scenarios.json @@ -13,7 +13,8 @@ "claude-dev": { "remoteControl": true, "remoteControlName": "h4 test", - "remoteControlAutoTrust": true + "remoteControlAutoTrust": true, + "remoteControlModel": "sonnet" } } } diff --git a/test/claude-dev/with_remote_control.sh b/test/claude-dev/with_remote_control.sh index a8b854c..cdeb322 100755 --- a/test/claude-dev/with_remote_control.sh +++ b/test/claude-dev/with_remote_control.sh @@ -43,6 +43,15 @@ if ! pgrep -f 'claude-rc loop$' >/dev/null 2>&1; then fi echo "✅ PASS: Remote Control loop running" +# remoteControlModel: claude-rc exports it as ANTHROPIC_MODEL before starting the server (whose +# sessions inherit it). /proc//environ can't show a later export, so read claude-rc's view. +if ! grep -q '^RC_MODEL_OPTION=sonnet$' "${ENV_FILE}" \ + || ! claude-rc status 2>/dev/null | grep -qE '^model: +sonnet$'; then + echo "❌ FAIL: remoteControlModel=sonnet not applied (options file or claude-rc status)" + exit 1 +fi +echo "✅ PASS: remoteControlModel applied as the server's model" + # ~/.claude.json lives in the volume (login, trust and the Remote Control confirmation survive). if [ "${CLAUDE_CONFIG_DIR:-}" != "/mnt/h4claude" ]; then echo "❌ FAIL: CLAUDE_CONFIG_DIR is '${CLAUDE_CONFIG_DIR:-unset}', expected /mnt/h4claude" From 07b329fa789f4f714e9db5f525075b7b812bfdbf Mon Sep 17 00:00:00 2001 From: baxyz Date: Sun, 8 Nov 2026 23:47:11 +0000 Subject: [PATCH 2/2] =?UTF-8?q?chore(claude-dev):=20=F0=9F=94=96=20version?= =?UTF-8?q?=20the=20model=20option=20as=201.4.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- AGENTS.md | 2 +- src/claude-dev/README.md | 2 +- src/claude-dev/devcontainer-feature.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 3582299..302098d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -64,7 +64,7 @@ version bump" below. | `github-dev` | 1.0.7 | gh CLI, Copilot Chat, PR/Issues/Actions extensions | | `graphite-dev` | 1.0.0 | Graphite CLI (`gt`, via npm) + Graphite VS Code extension, `gt auth` from `GRAPHITE_TOKEN` on start (dependsOn node) | | `copilot-dev` | 1.0.4 | Copilot Chat + AI instructions (commits, PRs, code review) | -| `claude-dev` | 1.5.0 | Claude Code extension + CLI + `~/.claude` named-volume persistence (credentials + memory) + optional Remote Control server (`claude-rc`) | +| `claude-dev` | 1.4.2 | Claude Code extension + CLI + `~/.claude` named-volume persistence (credentials + memory) + optional Remote Control server (`claude-rc`) | | `mistral-dev` | 1.3.2 | Mistral Vibe extension + `~/.vibe` named-volume persistence | | `cline-dev` | 1.1.0 | Cline extension (`saoudrizwan.claude-dev`) + optional CLI + `~/.cline` named-volume persistence | | `kimi-dev` | 1.0.0 | Kimi Code extension (`moonshot-ai.kimi-code`) + optional CLI + `~/.kimi-code` named-volume persistence | diff --git a/src/claude-dev/README.md b/src/claude-dev/README.md index fd87fb5..c7239fb 100644 --- a/src/claude-dev/README.md +++ b/src/claude-dev/README.md @@ -198,7 +198,7 @@ without depending on that user's shell profile already including ## Version History -- **v1.5.0**: `remoteControlModel` option: default model of the Remote Control sessions +- **v1.4.2**: `remoteControlModel` option: default model of the Remote Control sessions (`claude remote-control` has no `--model`, so `claude-rc` exports it as `ANTHROPIC_MODEL`). - **v1.4.0**: `CLAUDE_CONFIG_DIR` now points at the volume, so `~/.claude.json` (account, trust) persists too. Added `remoteControl` (off by default) and its `remoteControlName`, diff --git a/src/claude-dev/devcontainer-feature.json b/src/claude-dev/devcontainer-feature.json index 086d221..2945007 100644 --- a/src/claude-dev/devcontainer-feature.json +++ b/src/claude-dev/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "claude-dev", - "version": "1.5.0", + "version": "1.4.2", "name": "Claude Code Development Environment", "description": "Installs the Claude Code IDE extension (anthropic.claude-code) for VS Code and Cursor, and optionally the claude CLI. Persists ~/.claude (credentials, config, memory) across rebuilds and Codespaces via a Docker named volume, dedicated to this devcontainer. Also self-heals your devcontainer setup.", "documentationURL": "https://github.com/helpers4/devcontainer/tree/main/src/claude-dev",