Repository navigation
feat(claude-as): --check notes a home whose new sessions start in Code Mode instead of Remote Control - #88
Merged
Conversation
…e Mode instead of Remote Control Code Mode turns Remote Control off, so a session started in it never appears in other machines' ListAgents and SendMessage cannot reach it. On 2026-11-18 a hand-written CLAUDE_CODE_EXPERIMENTAL_CODE_MODE=1 in the shared settings did that quietly on two hosts. #86 keeps Code Mode opt-in, but nothing said when it was on where Remote Control is meant to start. --check now prints a note, not a failure, for each home where remoteControlAtStartup is on and Code Mode is on for new sessions. It reuses remote_control_on and code_mode_on, the helpers the start and resume paths use, so the check cannot drift from what a start does. The note names the fix: setup.sh --no-code-mode when the settings turn it on, or the environment variable when only the environment does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01M28j9ttBe7qZEaTtpVCKe3
Owner
Author
|
Self-review, no code change:
|
…variable, not the host Cross-review from the devbox session: when only the environment turns Code Mode on, the variable usually came from a session started while the settings had the key, which passes it to its child shells. Those keep it after the key is removed. So the note is true of sessions started from this shell, not of the host's new sessions, and now says so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01M28j9ttBe7qZEaTtpVCKe3
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.
Why
Code Mode turns Remote Control off. A session started in Code Mode never appears in other machines'
ListAgents, soSendMessagecannot reach it. On 2026-11-18 a hand-writtenCLAUDE_CODE_EXPERIMENTAL_CODE_MODE=1in the shared settings did this on the devbox and the M4 without anyone noticing. #86 made Code Mode opt-in, but nothing reported it when it was on where Remote Control is meant to start.What changes
bin/claude-as--check: for each home whereremoteControlAtStartupis on and Code Mode is on for new sessions, it prints:note new sessions here start in Code Mode, without Remote Control: setup.sh --no-code-mode turns it off, or...: CLAUDE_CODE_EXPERIMENTAL_CODE_MODE in this environment turns it onwhen only the environment sets it.It is a note, not a failure, because Code Mode can be the person's choice; the exit status doesn't change. The check reuses
remote_control_onandcode_mode_on, the helpers the start and resume paths already use, so it can't drift from what a start does. An off in the environment, the user settings or managed settings beats any on, so a kept0stays quiet.tests/claude-as.bats: three tests. (1) Code Mode on together with Remote Control at startup gives the note once per home. (2) No note when Remote Control isn't meant to start, when a0in the environment keeps Code Mode off, or when the settings have a0. (3) When only the environment sets it, the note names the environment and doesn't send you tosetup.sh.docs/how-to-use-multiple-accounts.md: one sentence in the Code Mode note.Checks
bats tests/claude-as.bats: 141/141. The 3 new tests are load-bearing: with the note disabled, tests 1 and 3 fail.just lint(shellcheck): pass.bin/claude-as: clean.just format-checkwith a local shfmt 3.14.1 also flags.claude/scripts/lib/statusline/data.shandlib/setup/mcp.sh. It does the same onmain, so this PR didn't cause it.claude-as --checkwith Code Mode off shows no note. WithCLAUDE_CODE_EXPERIMENTAL_CODE_MODE=1it shows the environment note for both homes.Stays clear of #87 and the fnox PR for #85; the files are listed by their author.
🤖 Generated with Claude Code
https://claude.ai/code/session_01M28j9ttBe7qZEaTtpVCKe3