I Have Five Claude Accounts and No Idea Which One This Terminal Is Spending
Описание и применение
Termexo позволяет пользователям видеть и переключать активный аккаунт Claude в каждом терминале, избегая случайного использования подписки, восстанавливая правильную среду после перезапуска и предотвращая запросы входа при уже авторизованных аккаунтах.
Задача
Users running multiple Claude Code or Codex terminals cannot easily identify which account a terminal is using, leading to accidental subscription usage and confusion.
Результат
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.
Рабочий процесс
- 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
Доказательства
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.
- Дата записи: 2026-09-08T01:53:09.496Z