Skip to content

Keep the agent account test from inheriting the running session's account pin - #15165

Merged
dhh merged 1 commit into
quattrofrom
fix-agent-account-home
Oct 13, 2026
Merged

dhh merged 1 commit into
quattrofrom
fix-agent-account-home

Conversation

@dhh

@dhh dhh commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

What changed

test/shell.d/agent-account-test.sh now unsets OMARCHY_AGENT_CLAUDE_HOME, OMARCHY_AGENT_CODEX_HOME and OMARCHY_AGENT_GROK_HOME along with CLAUDE_CONFIG_DIR/CODEX_HOME/GROK_HOME.

Why

omarchy-agent-account-exec exports OMARCHY_AGENT_<PROVIDER>_HOME into every session it starts. That pin is how a running session keeps its account (f964629), and omarchy-agent-account-home checks it before it reads the registry. An empty value pins Main.

When the suite runs from inside an agent session, which is how agents work on Omarchy, the test inherits OMARCHY_AGENT_CLAUDE_HOME=. Then omarchy-agent-account-use claude work followed by omarchy-agent-account-home claude prints the inherited empty pin and not the Work home, so the active account's home is what launches use fails. From a plain terminal it passes. The code is right and the test wasn't hermetic.

Testing

  • test/shell.d/agent-account-test.sh passes from inside a Claude session (OMARCHY_AGENT_CLAUDE_HOME= set) and from a clean environment.
  • Without the unset, the same run fails at the active account's home is what launches use (the baseline failure on quattro).

Human check

Nothing beyond review.

🤖 Generated with Claude Code

…ount pin

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Low impact] The PR appears safe to merge.

Summary

The account test now clears all three inherited account-home pins before checking account selection.

  • The account test checks each provider without inherited session pins.

Reviews (1) · Last reviewed commit: "Keep the agent account test from inherit..." · Reviewed by Greptile

@dhh
dhh merged commit 5b88f01 into quattro Oct 13, 2026
1 check passed
@emirb emirb added this to the 4.5 milestone Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants