I Have Five Claude Accounts and No Idea Which One This Terminal Is Spending
Description and use
Termexo lets users view and switch the active Claude account per terminal, preventing accidental subscription use, restoring the correct environment after restarts, and avoiding login prompts for already‑signed‑in accounts.
Problem
Users running multiple Claude Code or Codex terminals cannot easily identify which account a terminal is using, leading to accidental subscription usage and confusion.
Outcome
Termexo allows users to see and switch the active Claude account per terminal without risking accidental usage, restores the correct environment after restarts, and prevents the first‑run wizard from prompting for login on already‑signed‑in accounts.
Workflow
- 1. Prepare launch spec with desired accountProfileId, profileId, and mcpProfileId using prepareLaunch()
- 2. Close the running terminal with terminalGateway.close()
- 3. Restart the terminal with restartTerminalWithProfile() using the prepared command and profile information
- 4. On app restart, relaunch_environment() rebuilds the terminal’s environment from stored account data
Evidence
Termexo gives every managed account its own directory. "Switching accounts" therefore means changing an environment variable — and a running process cannot be told to change its own environment.
If preparation fails — the account directory cannot be created, a credential is gone — the error is thrown before close(), and the running session is untouched.
- Record date: 2026-09-08T01:53:09.496Z