Skip to content

Configuration

Yohan Marshall edited this page Oct 17, 2026 · 13 revisions

Configuration

Three JSON files in the OpenSwap directory. You rarely need to edit them by hand.

File Who uses it What it holds
settings.json CLI and extra Shared policy: autoswitch.* and CLI ui.theme. Edit with openswap config
menubar_settings.json Extra only Title, refresh, Claude/ChatGPT/Codex toggles, kickoff, whether setup finished. Edit in popover Settings
autoswitch_state.json Engine Cooldown, last switch, quarantines. Delete this file to reset

On macOS: ~/Library/Application Support/OpenSwap/ (first run moves ~/.claude-swap-backup here). Credentials are in Keychain, not that folder. Widget layout is per-widget in Edit Widget, not these files.

openswap config                 # effective values (`(default)` = not set)
openswap config get autoswitch.threshold
openswap config set autoswitch.threshold 80
openswap config set autoswitch.strategy consume-first
openswap config unset autoswitch.threshold
openswap config path
openswap config --help          # every key, range, default

Flags on openswap auto override settings.json for that process. openswap config does not edit extra display or kickoff.

autoswitch.*

Key Default Notes
autoswitch.threshold 90 Percent on the closer 5-hour or 7-day window that starts a look for a better account
autoswitch.strategy best best, consume-first (soonest weekly reset), or soonest-5h (soonest 5-hour reset)
autoswitch.intervalSeconds 60 CLI openswap auto poll interval
autoswitch.cooldownSeconds 300 Minimum gap between proactive switches (a card click in the extra starts this clock too)
autoswitch.hysteresisPct 10 Target must beat the active account by this many percent
autoswitch.model (unset) Fable, Fable,Opus, or all
autoswitch.includeApiKeyAccounts false Let unlinked sk-ant-api… slots be a last resort too (a key linked with add-token --for is one already). Never a proactive target
autoswitch.unhealthyTicks 3 Consecutive failed polls before unhealthy
autoswitch.codexEnabled true Rotate Codex CLI accounts with Claude. Extra: Auto-switch Codex CLI accounts

See Auto-switch.

ui.theme

dark, light, or auto (follow the terminal). This is the CLI color theme, not the extra’s Dark Mode (the extra follows System Settings → Appearance).

openswap config set ui.theme dark

Extra display (menubar_settings.json)

Changed from Settings in the popover (General and Automation):

  • Menu bar Show: Claude, ChatGPT, Both, or Logo only
  • Account name in the title
  • Title percentages (off / 5h / 7d / both)
  • Claude model limits in the title
  • Refresh interval (30s / 60s / 5 min)
  • Confirm before switching
  • Auto-switch Claude accounts
  • Enable ChatGPT switching (default off) and Suggest ChatGPT account switches (disabled until switching is on; you still confirm every restart)
  • Auto-switch Codex CLI accounts
  • 5-hour kickoff on/off and time

Open at login and the Claude Code status line (Settings › General › This Mac) are not stored here: they are on when the login item and the status line hook are.

There is no asterisk setting and no Advanced section. ChatGPT switching details: ChatGPT.

Other files in that directory

File Role
sequence.json Claude slot order
codex/ Codex roster, slot homes, usage cache
openswap.log Switch history (More → Switch history)
sessions/ Isolated profiles for idle-slot 5-hour kickoff
widget-snapshot.json Extra → Desktop widget
cache/api_key_health.json Last check of each API key (revoked, out of credit, at its spend limit)

Credentials live in the macOS Keychain (Claude) or codex/slots/<n>/auth.json (Codex), not as loose tokens in that folder.

Clone this wiki locally