Repository navigation
feat(harness-ops): resolve account.mjs values from the driven session's holder - #13802
Conversation
When `claude auth status --json` reports authMethod api_key with no email and no organization, cli/account.mjs prints `none: API-key auth has no signed-in account` and exits 0, so drive's mask post-check can resolve the values: source to no values. Every other case keeps its exit 1. The spawn-and-parse moves into an exported authStatus helper; accountValues still returns the array the driver masks with at capture. Adds account.mjs tests against a stub claude and a key-auth /status fixture, rewritten from a real 2.1.319 screen with every value invented, with a maskCells test over it. Refs: #13757 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ned in Drive runs cli/account.mjs from the outer capture leg, whose scrubbed shell holds no credential, so `claude auth status` reports loggedIn false and authMethod none there, never api_key. Treat that state as no account to mask. A missing login that names any auth method still exits 1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ned in account.mjs may not read the config the driven session signs in with, so a missing login is no proof there is nothing to mask. Only explicit API-key auth prints none:. CI gained nothing from the no-login case anyway: the capture's narrowed Bash allowlist does not run cli/account.mjs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ode-key-auth-none
cli/account.mjs ran `claude auth status` in the caller's environment. In the pr-verify capture the caller is the outer leg and the driven session runs in the sibling sandbox, so the values source described the wrong account. The session holder now answers an `account` request by running `claude auth status --json` in that session's own launch environment, the same status its capture masks read. account.mjs asks the one session running (or `--session <name>`) and checks the reply: the `none:` line alone, or one-line values; anything else, no session, or several sessions exits 1 with nothing on stdout. The `none:` line also needs the launch to have kept ANTHROPIC_API_KEY. Refs: #11364 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
claude-security-review reviewed Security review: PR #13802 (head d44d729)No security issues found. I read every hunk of all 5 changed files. No changed file matches a trusted-path glob, and the PR changes no plugin manifest. What I checked
Not checked here
critical-findings: 0 |
|
claude-review reviewed Code review: PR #13802, the driven session's account from its holderNo findings. I read every hunk of all 5 changed files. I also read the unchanged code the changed lines call: What I checked:
Notes, not counted as findings:
This is a whole review, not blocking-only: the prior-findings file shows no earlier head reviewed. |
Refs: #11364
session: App Driven PR Verify
Summary
Drive's mask post-check resolves control-claude-code's
values:source by runningcli/account.mjs. Today that runsclaude auth statusin the caller's process. In the CI capture the caller is the outer leg, which never reads the driven session's config, so the answer describes the wrong process.cli/account.mjsnow asks the running session holder, which already runsclaude auth statusin the driven session's own launch environment to mask captures (maskedFrame). The holder serves a newaccountrequest from that status, cached once per session.Output:
none: API-key auth has no signed-in account, only when that session is on key auth and its launch keptANTHROPIC_API_KEY;--sessionnames one), or any other reply.Fix
driver/driver.mjs: the holder'saccountrequest,accountLines, anddrivenAccount().cli/account.mjs: now a thin wrapper arounddrivenAccount(). It accepts only thenone:line alone or single-line values.cli/README.mdand a changelog fragment (bump: minor).## Maskvalues:line in SKILL.md is unchanged, so no skill body changes.Verification
node --test plugins/harness-ops/skills/control-claude-code/driver/driver.test.mjs: 89 pass. 8 newaccountcases fail on the old implementation.Remaining
node <abs>/cli/account.mjsrule to the capture's Bash allowlist.claude auth statusreportsapi_keyinside the sibling sandbox, and that drive types the exact allowed command.Related
🤖 Generated with Claude Code