Skip to content
Sign in

tmux

v0.3.0

tmux as an iii worker — list, create, rename and kill sessions and windows and move windows between sessions, see which pane runs Claude Code or Codex (working, waiting for you, idle), which runs `iii compose` and every listening port by process and pane, plus a Console page whose terminal is a live tmux client.

license: Apache-2.0agentsconsolemultiplexerportssessionsterminaltmux

Install

bash
iii call compose::add worker=tmux@next

Run in your project with the iii engine running. Exact versions are immutable and digest-pinned.

Functions46

tmux::accounts::add

Function

Add a Claude Code account: a config folder of its own (CLAUDE_CONFIG_DIR) under the accounts folder, sharing with ~/.claude what `shared` names (settings, extensions, plugins, conversations; all of them by default) through links. It starts signed out: tmux::accounts::login_start signs it in.

Request
  • colorstringrequired

    `blue`, `green`, `violet`, `orange` or `pink`.

  • namestringrequired

    What people call it, e.g. `Personal`; its id is made from it.

  • sharedstring[]

    What it shares with ~/.claude: `settings` (settings.json, CLAUDE.md, keybindings.json), `extensions` (skills, agents, commands, output styles), `plugins` (plugins, and a copy of the MCP servers), `conversations` (projects, history, todos, plans). Default: all four.

Response
  • accountobjectrequired

    A Claude Code account (agent-accounts G1, G2): one sign-in, kept in the global slot while it is global and in its own folder otherwise.

    • colorstringrequired

      `blue`, `green`, `violet`, `orange` or `pink`.

    • dirstringrequired

      Its folder, absolute: `<accounts root>/<id>`. Without `accounts.json`, the one account (`default`) has none, and this is `~/.claude`.

    • dir_displaystringrequired

      Its folder with `~` for the home folder.

    • emailstring

      The signed-in email.

    • idstringrequired

      `default` for the sign-in `~/.claude` had when accounts began, else a slug of its first name.

    • is_defaultbooleanrequired

      Its id is `default`.

    • namestringrequired

      The name people gave it.

    • organizationstring

      The organization it belongs to.

    • panesinteger· uint32requiredmin 0

      Claude Code panes using it now (for the global account, every pane on the slot, its followers included).

    • planstring

      `pro`, `max`, `team`, `enterprise` or what Claude Code recorded.

    • sharedstring[]required

      The groups its folder shares with `~/.claude`: `settings`, `extensions`, `plugins`, `conversations`.

    • signed_inbooleanrequired

      It holds a Claude sign-in.

    • tierstring

      The rate-limit tier, e.g. `default_claude_max_20x`.

    • token_expiredbooleanrequired

      Its access token expired. Claude Code renews it when it runs there, and so does the worker when `tmux::accounts::credential` asks for it.

    • usageany of

      The latest usage reading.

      any of (2)
      Variant 1
      • as_of_msinteger· uint64requiredmin 0

        When this reading was taken.

      • errorstring

        Why the latest attempt to read failed: `rate_limited`, `unauthorized`, `network`, `token_expired`, `not_signed_in`, `unreadable`. The windows are then the last good reading, if any.

      • extraany of

        Usage beyond the plan.

        Show 2 nested
        any of (2)
        Variant 1
        • enabledbooleanrequired

          Extra usage is turned on for the account.

        • used_percentnumber· double

          How much of its monthly limit is used, 0 to 100, when there is one.

        Variant 2
        valuenull
      • five_hourany of

        The current 5-hour window.

        Show 2 nested
        any of (2)
        Variant 1
        • reset_since_readboolean

          The window reset after the reading, so `used_percent` is 0 until the next reading.

        • resets_at_msinteger· uint64min 0

          When the window starts again.

        • used_percentnumber· doublerequired

          How much of the window is used, 0 to 100.

        Variant 2
        valuenull
      • weekany of

        The week, all models.

        Show 2 nested
        any of (2)
        Variant 1
        • reset_since_readboolean

          The window reset after the reading, so `used_percent` is 0 until the next reading.

        • resets_at_msinteger· uint64min 0

          When the window starts again.

        • used_percentnumber· doublerequired

          How much of the window is used, 0 to 100.

        Variant 2
        valuenull
      • week_modelsobject[]

        Every per-model weekly window the account has, Opus and Sonnet included.

        Show 2 nested
        • limitall ofrequired

          The window.

          Show 1 nested
          all of (1)
          Variant 1
          • reset_since_readboolean

            The window reset after the reading, so `used_percent` is 0 until the next reading.

          • resets_at_msinteger· uint64min 0

            When the window starts again.

          • used_percentnumber· doublerequired

            How much of the window is used, 0 to 100.

        • namestringrequired

          The model's display name, e.g. `Opus`.

      • week_opusany of

        The week, Opus only.

        Show 2 nested
        any of (2)
        Variant 1
        • reset_since_readboolean

          The window reset after the reading, so `used_percent` is 0 until the next reading.

        • resets_at_msinteger· uint64min 0

          When the window starts again.

        • used_percentnumber· doublerequired

          How much of the window is used, 0 to 100.

        Variant 2
        valuenull
      • week_sonnetany of

        The week, Sonnet only.

        Show 2 nested
        any of (2)
        Variant 1
        • reset_since_readboolean

          The window reset after the reading, so `used_percent` is 0 until the next reading.

        • resets_at_msinteger· uint64min 0

          When the window starts again.

        • used_percentnumber· doublerequired

          How much of the window is used, 0 to 100.

        Variant 2
        valuenull
      Variant 2
      valuenull

tmux::accounts::credential

Function

Internal, for provider-claude-code; denied to agents and never called by the apps. Account `account`'s Claude Code access token, from where its sign-in lives now: ~/.claude for the global account, its folder for any other (the login Keychain on macOS). `account` is an account id, never `global`: resolve the global one with tmux::accounts::list first. When the token expires within five minutes, the worker renews it first, as Claude Code 2.1.332 does, and only then (a token without an expiry, or a sign-in that is not a Claude.ai one, is never renewed): under the swap gate and swap.lock (so no switch moves the sign-in under it), then Claude Code's own locks in that store (.oauth_refresh.lock, the legacy realpath(dir).lock, .storage-write.lock), it reads the sign-in again (a Claude Code may have renewed it), makes sure the store takes a write, renews it with its refresh token at Anthropic's token endpoint and writes it back to the same store, atomically; one renewal per account at a time. A renewal whose write fails is kept in memory, answered, and written again later. When the token still works, the answer waits 10 seconds at most for a renewal, which goes on. A refresh token Anthropic refused is never sent again; after any other failure the renewal is held back a minute. On macOS that write is the Keychain's, which needs the worker in the person's GUI session. While ~/.claude holds a sign-in by hand to another account, the global account answers `busy`. This is the only function that returns a token, and the worker renews no other. Errors are one JSON object `{code, message}`: `unknown_account`, `not_signed_in`, `token_expired` (Anthropic refused the refresh token, or the sign-in can't be renewed: sign in again), `busy` (Claude Code or a switch held the sign-in for more than 10 seconds, or a sign-in by hand is being taken in) or `failed` (anything else, e.g. Anthropic not reachable, or a store that takes no write, while the token no longer works). A token that still works for more than 10 seconds is answered instead of an error from the renewal.

Request
  • accountstringrequired

    An account id (never `global`).

Response
  • access_tokenstringrequired

    Its OAuth access token, for `Authorization: Bearer`.

  • accountstringrequired

    The account the token is for.

  • emailstring

    The account's email, when known.

  • expires_at_msinteger· uint64requiredmin 0

    When the token expires (milliseconds since the epoch); asked for again before then.

  • planstring

    Its plan (`pro`, `max`, `team`, …), when known.

tmux::accounts::dismiss

Function

"Not now" on a suggestion to switch the global account: no suggestion from that account for that reason until its window resets or it runs lower (week 80 % → 90 % → 5-hour window full → week limit).

Request
  • suggestionstringrequired

    The suggestion's `id`.

Response
Empty object

tmux::accounts::global

Function

Make a Claude Code account the global one (it must be signed in), like /login: its sign-in moves into ~/.claude and the old global account's goes to that account's folder. Every Claude Code on ~/.claude that isn't pinned, started by the worker or by hand, uses the new account with its next message, without a restart (`following`; within `switch_delay_s` seconds on macOS). Windows pinned to the new account are restarted on ~/.claude and windows pinned to the old one on its folder, resuming their conversations (`restarted`; working ones after their turn: `after_turn`). While a window pinned to the new account is in a turn, the switch waits (`state: waiting`, `waiting_for`, the snapshot's `pending_global`) and the worker finishes it once they are idle (a failure that may pass is tried again; one that can't calls it off, and the panes it waited for say why in `move_error`); another switch replaces it, switching to the current global account cancels it. A window pinned to the old account that can't be moved stays on ~/.claude and follows the new account from then on (counted in `following`, with a `move_error`). Errors are one JSON object `{code, message, blocked_by?}` with `code` `not_signed_in`, `busy` (Claude Code is renewing its sign-in), `blocked` (a Claude Code on that account's folder can't be restarted: `blocked_by`), `owner_check_on`, `signing_in` (a sign-in from tmux::accounts::login_start runs on ~/.claude or on either account's folder: finish or cancel it first; the rules and a waiting switch go on after it) or `failed` (anything else).

Request
  • accountstringrequired

    Account id.

Response
  • after_turnstring[]required

    Panes pinned to the old account that restart on its folder once their turn ends.

  • followinginteger· uint32requiredmin 0

    Claude Code panes on ~/.claude that aren't pinned: they use the new account with their next message.

  • globalstringrequired

    The global account now (the old one while the switch waits).

  • restartedstring[]required

    Pinned panes restarted now (the new account's on ~/.claude, the old one's on its folder).

  • statestringrequiredenum switched, waiting

    `switched` (the account is global now) or `waiting` (for `waiting_for`).

  • waiting_forstring[]required

    Panes on the new account's folder the switch waits for.

tmux::accounts::list

Function

The Claude Code accounts on this computer: each one's name, colour, config folder, email, plan, whether it is signed in, the Claude Code panes using it and its latest usage reading; which one is global (the sign-in of ~/.claude, what every Claude Code that isn't pinned uses, plain `claude` included); a switch waiting for windows to finish their turn (`pending_global`), how long a session may take to notice a switch (`switch_delay_s`), the rules for when the global account runs low, any suggestion, the latest switch and `global_history` (who was global since when: the account global before the oldest change kept, at `at_ms` 0, then the last 49 changes). Without `accounts.json` there is one account, `default`. Never a token.

Request
Empty object
Response
  • accountsobject[]required

    The default account first, then the others in the order they were added.

    • colorstringrequired

      `blue`, `green`, `violet`, `orange` or `pink`.

    • dirstringrequired

      Its folder, absolute: `<accounts root>/<id>`. Without `accounts.json`, the one account (`default`) has none, and this is `~/.claude`.

    • dir_displaystringrequired

      Its folder with `~` for the home folder.

    • emailstring

      The signed-in email.

    • idstringrequired

      `default` for the sign-in `~/.claude` had when accounts began, else a slug of its first name.

    • is_defaultbooleanrequired

      Its id is `default`.

    • namestringrequired

      The name people gave it.

    • organizationstring

      The organization it belongs to.

    • panesinteger· uint32requiredmin 0

      Claude Code panes using it now (for the global account, every pane on the slot, its followers included).

    • planstring

      `pro`, `max`, `team`, `enterprise` or what Claude Code recorded.

    • sharedstring[]required

      The groups its folder shares with `~/.claude`: `settings`, `extensions`, `plugins`, `conversations`.

    • signed_inbooleanrequired

      It holds a Claude sign-in.

    • tierstring

      The rate-limit tier, e.g. `default_claude_max_20x`.

    • token_expiredbooleanrequired

      Its access token expired. Claude Code renews it when it runs there, and so does the worker when `tmux::accounts::credential` asks for it.

    • usageany of

      The latest usage reading.

      any of (2)
      Variant 1
      • as_of_msinteger· uint64requiredmin 0

        When this reading was taken.

      • errorstring

        Why the latest attempt to read failed: `rate_limited`, `unauthorized`, `network`, `token_expired`, `not_signed_in`, `unreadable`. The windows are then the last good reading, if any.

      • extraany of

        Usage beyond the plan.

        Show 2 nested
        any of (2)
        Variant 1
        • enabledbooleanrequired

          Extra usage is turned on for the account.

        • used_percentnumber· double

          How much of its monthly limit is used, 0 to 100, when there is one.

        Variant 2
        valuenull
      • five_hourany of

        The current 5-hour window.

        Show 2 nested
        any of (2)
        Variant 1
        • reset_since_readboolean

          The window reset after the reading, so `used_percent` is 0 until the next reading.

        • resets_at_msinteger· uint64min 0

          When the window starts again.

        • used_percentnumber· doublerequired

          How much of the window is used, 0 to 100.

        Variant 2
        valuenull
      • weekany of

        The week, all models.

        Show 2 nested
        any of (2)
        Variant 1
        • reset_since_readboolean

          The window reset after the reading, so `used_percent` is 0 until the next reading.

        • resets_at_msinteger· uint64min 0

          When the window starts again.

        • used_percentnumber· doublerequired

          How much of the window is used, 0 to 100.

        Variant 2
        valuenull
      • week_modelsobject[]

        Every per-model weekly window the account has, Opus and Sonnet included.

        Show 2 nested
        • limitall ofrequired

          The window.

          Show 1 nested
          all of (1)
          Variant 1
          • reset_since_readboolean

            The window reset after the reading, so `used_percent` is 0 until the next reading.

          • resets_at_msinteger· uint64min 0

            When the window starts again.

          • used_percentnumber· doublerequired

            How much of the window is used, 0 to 100.

        • namestringrequired

          The model's display name, e.g. `Opus`.

      • week_opusany of

        The week, Opus only.

        Show 2 nested
        any of (2)
        Variant 1
        • reset_since_readboolean

          The window reset after the reading, so `used_percent` is 0 until the next reading.

        • resets_at_msinteger· uint64min 0

          When the window starts again.

        • used_percentnumber· doublerequired

          How much of the window is used, 0 to 100.

        Variant 2
        valuenull
      • week_sonnetany of

        The week, Sonnet only.

        Show 2 nested
        any of (2)
        Variant 1
        • reset_since_readboolean

          The window reset after the reading, so `used_percent` is 0 until the next reading.

        • resets_at_msinteger· uint64min 0

          When the window starts again.

        • used_percentnumber· doublerequired

          How much of the window is used, 0 to 100.

        Variant 2
        valuenull
      Variant 2
      valuenull
  • availablebooleanrequired

    A `claude` binary is on PATH or `~/.claude` exists.

  • globalstringrequired

    Id of the global account: the sign-in of the slot (`~/.claude`), what plain `claude` uses anywhere.

  • global_historyobject[]

    Which account was global when, oldest first: the account global before the oldest change kept (at 0), then the last 49 changes (`tmux::usage::claude_outside` dates the spend of sessions tmux never ran with it).

    • accountstringrequired

      The account that became global.

    • at_msinteger· uint64requiredmin 0

      When. 0 on the first entry, which names the account global before the oldest change kept.

  • last_switchany of

    The latest change of the global account.

    any of (2)
    Variant 1
    • after_turnstring[]required

      Panes pinned to the old global account that restart on its folder when their turn ends.

    • at_msinteger· uint64requiredmin 0

      When it happened.

    • autobooleanrequired

      The worker switched by itself (rules mode `switch`).

    • back_at_msinteger· uint64min 0

      With `back_after_reset`: when `from`'s window resets and the worker switches back.

    • followinginteger· uint32min 0

      Claude Code panes on the slot that switched with it, on their next message.

    • fromstringrequired

      The global account before.

    • reasonstring

      `week_80`, `week_90`, `limit`, `five_hour` or `back` for an automatic switch; `login` (someone signed in to a known account with `/login`), `login_new` (to a new one, added then), `upgrade` (the worker took the slot's sign-in for global when it was updated); null when someone switched.

    • restartedstring[]

      Pinned panes restarted: the new global account's (now on the slot) and the old one's (now on its folder).

    • tostringrequired

      The global account after.

    Variant 2
    valuenull
  • loginsobject[]

    Sign-ins under way (`tmux::accounts::login_start`), and those that ended in the last minute, oldest first.

    • accountstringrequired

      The account signing in.

    • browserone ofrequired

      Who may open the sign-in page on the computer the worker runs on.

      one of (2)
      Variant 1
      valuestringenum none
      Variant 2
      valuestringenum host
    • emailstring

      The email the sign-in page is filled with (the account's).

    • errorany of

      With `failed` and `expired`: why.

      any of (2)
      Variant 1
      • codestringrequired

        `rejected` (Anthropic didn't accept the code; Claude Code ended), `expired`, `gone` or `failed`.

      • messagestringrequired

        One sentence.

      Variant 2
      valuenull
    • expires_at_msinteger· uint64requiredmin 0

      When the link stops working and Claude Code is stopped.

    • login_idstringrequired

      Pass it to `tmux::accounts::login_code` and `login_cancel`.

    • stateone ofrequired

      Where a sign-in is.

      one of (5)
      Variant 1
      valuestringenum waiting_code
      Variant 2
      valuestringenum checking
      Variant 3
      valuestringenum done
      Variant 4
      valuestringenum failed
      Variant 5
      valuestringenum expired
    • urlstringrequired

      The sign-in page to open on any device: it shows the code to paste.

  • managedbooleanrequired

    The accounts registry exists (an account was added or a setting saved).

  • pending_globalany of

    A switch of the global account that waits for windows on the new account's folder to finish their turn.

    any of (2)
    Variant 1
    • accountstringrequired

      The account becoming global.

    • at_msinteger· uint64requiredmin 0

      When it was asked for.

    • bystringrequired

      `person` or `rule`.

    • waiting_forstring[]required

      The Claude Code panes on its folder still working or waiting.

    Variant 2
    valuenull
  • rulesall ofrequired

    The rules for the global account.

    all of (1)
    Variant 1
    • atall of

      `week_80`, `week_90` or `limit`.

      Show 1 nested
      all of (1)
      Variant 1
      one of (3)
      Variant 1
      valuestringenum week_80
      Variant 2
      valuestringenum week_90
      Variant 3
      valuestringenum limit
    • back_after_resetboolean

      After switching away by itself, switch back once that account's window resets.

    • five_hourboolean

      Also act when the 5-hour window reaches 100 %.

    • modeall of

      `off`, `suggest` or `switch`.

      Show 1 nested
      all of (1)
      Variant 1
      one of (3)
      Variant 1
      valuestringenum off
      Variant 2
      valuestringenum suggest
      Variant 3
      valuestringenum switch
    • orderstring[]

      Accounts to try first, in order; then the one with most room this week.

  • runs_as_rootbooleanrequired

    The worker runs as root, where Claude Code refuses `--dangerously-skip-permissions`.

  • suggestionany of

    Another account suggested for global, while the global one is low.

    any of (2)
    Variant 1
    • at_msinteger· uint64requiredmin 0

      When the reason was first seen.

    • followinginteger· uint32requiredmin 0

      Claude Code panes on the slot that are not pinned: they switch with the global account.

    • fromstringrequired

      The global account.

    • idstringrequired

      Pass it to `tmux::accounts::dismiss`.

    • reasonstringrequired

      `week_80`, `week_90`, `limit` or `five_hour`.

    • tostringrequired

      The account suggested.

    Variant 2
    valuenull
  • switch_delay_sinteger· uint32min 0

    How long a running Claude Code may take to notice a switch, in seconds: 0 on Linux (its next message), 30 on macOS (the Keychain).

tmux::accounts::login_cancel

Function

Stop a sign-in under way (tmux::accounts::login_start): Claude Code is stopped and the sign-in leaves the feed's `logins`; a tmux::accounts::login_code waiting on it answers `gone`. Nothing happens for one that is over or unknown.

Request
  • login_idstringrequired

    From tmux::accounts::login_start.

Response
Empty object

tmux::accounts::login_code

Function

Pass the code from the sign-in page to a sign-in under way (tmux::accounts::login_start): its whitespace is taken out, and a code without Claude Code's shape (`<code>#<state>`) is refused (`invalid_code`) without reaching Claude Code. Then waits up to a minute for Claude Code to check it with Anthropic and answers `{state: "done", account}` (the account signed in; on ~/.claude the global one, which may be another account than asked for when the person signed in to it), or an error, one JSON object `{code, message}`: `invalid_code` (the sign-in still waits), `rejected` (Anthropic didn't accept the code; Claude Code ended, so a new link is needed: a code only works with the link it came from), `expired` (the 10 minutes ran out, also for a code typed after them), `gone` (no such sign-in, cancelled, replaced, its account removed, or over) or `failed` (anything else). A second call while a code is checked waits for the same outcome; a call after the sign-in ended answers how it ended while it is listed, then `gone`. `done` means a new sign-in is where it belongs (the account's folder, or ~/.claude taken in as the global account); Claude Code saying it signed in while the one there is still the one from before is `failed`. The code is never logged or kept.

Request
  • codestringrequired

    The code the sign-in page shows (`<code>#<state>`), as copied: whitespace is taken out.

  • login_idstringrequired

    From tmux::accounts::login_start.

Response
  • accountall ofrequired

    The account signed in, as tmux::accounts::list shows it.

    all of (1)
    Variant 1
    • colorstringrequired

      `blue`, `green`, `violet`, `orange` or `pink`.

    • dirstringrequired

      Its folder, absolute: `<accounts root>/<id>`. Without `accounts.json`, the one account (`default`) has none, and this is `~/.claude`.

    • dir_displaystringrequired

      Its folder with `~` for the home folder.

    • emailstring

      The signed-in email.

    • idstringrequired

      `default` for the sign-in `~/.claude` had when accounts began, else a slug of its first name.

    • is_defaultbooleanrequired

      Its id is `default`.

    • namestringrequired

      The name people gave it.

    • organizationstring

      The organization it belongs to.

    • panesinteger· uint32requiredmin 0

      Claude Code panes using it now (for the global account, every pane on the slot, its followers included).

    • planstring

      `pro`, `max`, `team`, `enterprise` or what Claude Code recorded.

    • sharedstring[]required

      The groups its folder shares with `~/.claude`: `settings`, `extensions`, `plugins`, `conversations`.

    • signed_inbooleanrequired

      It holds a Claude sign-in.

    • tierstring

      The rate-limit tier, e.g. `default_claude_max_20x`.

    • token_expiredbooleanrequired

      Its access token expired. Claude Code renews it when it runs there, and so does the worker when `tmux::accounts::credential` asks for it.

    • usageany of

      The latest usage reading.

      Show 2 nested
      any of (2)
      Variant 1
      • as_of_msinteger· uint64requiredmin 0

        When this reading was taken.

      • errorstring

        Why the latest attempt to read failed: `rate_limited`, `unauthorized`, `network`, `token_expired`, `not_signed_in`, `unreadable`. The windows are then the last good reading, if any.

      • extraany of

        Usage beyond the plan.

        Show 2 nested
        any of (2)
        Variant 1
        • enabledbooleanrequired

          Extra usage is turned on for the account.

        • used_percentnumber· double

          How much of its monthly limit is used, 0 to 100, when there is one.

        Variant 2
        valuenull
      • five_hourany of

        The current 5-hour window.

        Show 2 nested
        any of (2)
        Variant 1
        • reset_since_readboolean

          The window reset after the reading, so `used_percent` is 0 until the next reading.

        • resets_at_msinteger· uint64min 0

          When the window starts again.

        • used_percentnumber· doublerequired

          How much of the window is used, 0 to 100.

        Variant 2
        valuenull
      • weekany of

        The week, all models.

        Show 2 nested
        any of (2)
        Variant 1
        • reset_since_readboolean

          The window reset after the reading, so `used_percent` is 0 until the next reading.

        • resets_at_msinteger· uint64min 0

          When the window starts again.

        • used_percentnumber· doublerequired

          How much of the window is used, 0 to 100.

        Variant 2
        valuenull
      • week_modelsobject[]

        Every per-model weekly window the account has, Opus and Sonnet included.

        Show 2 nested
        • limitall ofrequired

          The window.

          Show 1 nested
          all of (1)
          Variant 1
          • reset_since_readboolean

            The window reset after the reading, so `used_percent` is 0 until the next reading.

          • resets_at_msinteger· uint64min 0

            When the window starts again.

          • used_percentnumber· doublerequired

            How much of the window is used, 0 to 100.

        • namestringrequired

          The model's display name, e.g. `Opus`.

      • week_opusany of

        The week, Opus only.

        Show 2 nested
        any of (2)
        Variant 1
        • reset_since_readboolean

          The window reset after the reading, so `used_percent` is 0 until the next reading.

        • resets_at_msinteger· uint64min 0

          When the window starts again.

        • used_percentnumber· doublerequired

          How much of the window is used, 0 to 100.

        Variant 2
        valuenull
      • week_sonnetany of

        The week, Sonnet only.

        Show 2 nested
        any of (2)
        Variant 1
        • reset_since_readboolean

          The window reset after the reading, so `used_percent` is 0 until the next reading.

        • resets_at_msinteger· uint64min 0

          When the window starts again.

        • used_percentnumber· doublerequired

          How much of the window is used, 0 to 100.

        Variant 2
        valuenull
      Variant 2
      valuenull
  • stateall ofrequired

    `done`.

    all of (1)
    Variant 1
    valuestringenum done

tmux::accounts::login_start

Function

Start signing a Claude Code account in: runs `claude auth login` (with `--email` when the account has one) on the account's folder, or on ~/.claude for the global account, in a hidden terminal (no tmux window), and answers with the sign-in link (`url`) once Claude Code printed it. The page it opens shows a code to pass to tmux::accounts::login_code. `browser`: `none` (the default) keeps Claude Code from opening a browser on this computer; `host` lets it, for an app running on this computer: coming back from that page finishes the sign-in with no code (`browser_url` is the link it opened; only this answer carries it, never the feed or tmux::accounts::list). `host` fails when nothing here can open a browser (no BROWSER, and no xdg-open with a display). The link works for 10 minutes (`expires_at_ms`); then Claude Code is stopped (a code being checked, or with `host` a return from the page, gets 15 seconds more to finish). A new start for the same account cancels the one under way, and one still starting answers `gone`. While a sign-in runs (or its Claude Code is still there), switching the global account away from or to the accounts it involves is refused (`signing_in`); while a switch left half-way is being settled, no sign-in starts on ~/.claude or on its two accounts. The feed's `logins` shows every sign-in under way (`waiting_code`, `checking`) and those that ended in the last minute (`done`, `failed`, `expired`). Signing in to another account on ~/.claude makes that one global (added when it is new). On macOS, Claude Code keeps the sign-in in the login Keychain, which only a worker running in the user's GUI session (a LaunchAgent, not an SSH or background shell) can write. Errors are one JSON object `{code, message}`: `failed`, or `gone` when a later start for the account replaced this one (or the account was removed, or the worker is stopping).

Request
  • accountstringrequired

    Account id (`default` for the one `~/.claude` had at first).

  • browserany of

    `none` (the default): no browser opens on this computer; `host`: Claude Code opens it here.

    any of (2)
    Variant 1
    one of (2)
    Variant 1
    valuestringenum none
    Variant 2
    valuestringenum host
    Variant 2
    valuenull
Response
  • accountstringrequired

    The account signing in.

  • browserall ofrequired

    `none` or `host`.

    all of (1)
    Variant 1
    one of (2)
    Variant 1
    valuestringenum none
    Variant 2
    valuestringenum host
  • browser_urlstring

    With `browser: host`, the link Claude Code opened in this computer's browser, whose return finishes the sign-in with no code (it works on this computer only).

  • emailstring

    The email the page is filled with (the account's), when it has one.

  • expires_at_msinteger· uint64requiredmin 0

    When the link stops working and Claude Code is stopped (10 minutes).

  • login_idstringrequired

    Pass it to tmux::accounts::login_code and login_cancel.

  • urlstringrequired

    The sign-in page, for any device: it shows the code to paste.

tmux::accounts::move_idle

Function

Move the idle Claude Code panes using account `from` (on its folder, or on ~/.claude when it is the global one) to account `to` and pin them there, resuming their conversations: those that follow the global account, are pinned to `from` or were started by hand (never those pinned elsewhere, nor working or waiting ones).

Request
  • fromstringrequired

    Account id they run on.

  • tostringrequired

    Account id to move them to.

Response
  • movedstring[]required

    Panes moved.

tmux::accounts::remove

Function

Take a Claude Code account off the list. Not the default account, the global one, nor one a switch waits to make global. Claude Code panes on its folder keep running. A sign-in of it from the app stops. With delete_files, its folder (sign-in, history of its own) is deleted too, never what its links point at; refused while Claude Code runs on it (a pane, or a sign-in until its Claude Code is gone).

Request
  • accountstringrequired

    Account id.

  • delete_filesboolean

    Delete its folder too (default false: the folder stays where it was).

Response
Empty object

tmux::accounts::rules

Function

Change the rules for when the global Claude Code account runs low (what is left out stays): mode `off`, `suggest` (a suggestion in the feed) or `switch` (the worker makes another account global by itself, even with the app closed, and leaves `last_switch`; never one with Claude Code working on its folder); `at` `week_80`, `week_90` or `limit`; `five_hour` also acts when the 5-hour window is full; `back_after_reset` switches back once the old account's window resets; `order` the accounts to try first, then the one with most room this week.

Request
  • atany of

    `week_80`, `week_90` or `limit`.

    any of (2)
    Variant 1
    one of (3)
    Variant 1
    valuestringenum week_80
    Variant 2
    valuestringenum week_90
    Variant 3
    valuestringenum limit
    Variant 2
    valuenull
  • back_after_resetboolean

    Switch back once the old account's window resets.

  • five_hourboolean

    Also act when the 5-hour window is full.

  • modeany of

    `off`, `suggest` or `switch`.

    any of (2)
    Variant 1
    one of (3)
    Variant 1
    valuestringenum off
    Variant 2
    valuestringenum suggest
    Variant 3
    valuestringenum switch
    Variant 2
    valuenull
  • orderstring[]

    Account ids to try first, in order.

Response
  • rulesobjectrequired

    The rules for the global account (agent-accounts D14).

    • atall of

      `week_80`, `week_90` or `limit`.

      all of (1)
      Variant 1
      one of (3)
      Variant 1
      valuestringenum week_80
      Variant 2
      valuestringenum week_90
      Variant 3
      valuestringenum limit
    • back_after_resetboolean

      After switching away by itself, switch back once that account's window resets.

    • five_hourboolean

      Also act when the 5-hour window reaches 100 %.

    • modeall of

      `off`, `suggest` or `switch`.

      all of (1)
      Variant 1
      one of (3)
      Variant 1
      valuestringenum off
      Variant 2
      valuestringenum suggest
      Variant 3
      valuestringenum switch
    • orderstring[]

      Accounts to try first, in order; then the one with most room this week.

tmux::accounts::update

Function

Rename or recolour a Claude Code account, or change what it shares with ~/.claude (links are made for groups added and the worker's links removed for groups dropped; files of the account's own are never touched).

Request
  • accountstringrequired

    Account id.

  • colorstring

    New colour: `blue`, `green`, `violet`, `orange` or `pink`.

  • namestring

    New name.

  • sharedstring[]

    What it shares from now on (see tmux::accounts::add). Not for `default`.

Response
  • accountobjectrequired

    A Claude Code account (agent-accounts G1, G2): one sign-in, kept in the global slot while it is global and in its own folder otherwise.

    • colorstringrequired

      `blue`, `green`, `violet`, `orange` or `pink`.

    • dirstringrequired

      Its folder, absolute: `<accounts root>/<id>`. Without `accounts.json`, the one account (`default`) has none, and this is `~/.claude`.

    • dir_displaystringrequired

      Its folder with `~` for the home folder.

    • emailstring

      The signed-in email.

    • idstringrequired

      `default` for the sign-in `~/.claude` had when accounts began, else a slug of its first name.

    • is_defaultbooleanrequired

      Its id is `default`.

    • namestringrequired

      The name people gave it.

    • organizationstring

      The organization it belongs to.

    • panesinteger· uint32requiredmin 0

      Claude Code panes using it now (for the global account, every pane on the slot, its followers included).

    • planstring

      `pro`, `max`, `team`, `enterprise` or what Claude Code recorded.

    • sharedstring[]required

      The groups its folder shares with `~/.claude`: `settings`, `extensions`, `plugins`, `conversations`.

    • signed_inbooleanrequired

      It holds a Claude sign-in.

    • tierstring

      The rate-limit tier, e.g. `default_claude_max_20x`.

    • token_expiredbooleanrequired

      Its access token expired. Claude Code renews it when it runs there, and so does the worker when `tmux::accounts::credential` asks for it.

    • usageany of

      The latest usage reading.

      any of (2)
      Variant 1
      • as_of_msinteger· uint64requiredmin 0

        When this reading was taken.

      • errorstring

        Why the latest attempt to read failed: `rate_limited`, `unauthorized`, `network`, `token_expired`, `not_signed_in`, `unreadable`. The windows are then the last good reading, if any.

      • extraany of

        Usage beyond the plan.

        Show 2 nested
        any of (2)
        Variant 1
        • enabledbooleanrequired

          Extra usage is turned on for the account.

        • used_percentnumber· double

          How much of its monthly limit is used, 0 to 100, when there is one.

        Variant 2
        valuenull
      • five_hourany of

        The current 5-hour window.

        Show 2 nested
        any of (2)
        Variant 1
        • reset_since_readboolean

          The window reset after the reading, so `used_percent` is 0 until the next reading.

        • resets_at_msinteger· uint64min 0

          When the window starts again.

        • used_percentnumber· doublerequired

          How much of the window is used, 0 to 100.

        Variant 2
        valuenull
      • weekany of

        The week, all models.

        Show 2 nested
        any of (2)
        Variant 1
        • reset_since_readboolean

          The window reset after the reading, so `used_percent` is 0 until the next reading.

        • resets_at_msinteger· uint64min 0

          When the window starts again.

        • used_percentnumber· doublerequired

          How much of the window is used, 0 to 100.

        Variant 2
        valuenull
      • week_modelsobject[]

        Every per-model weekly window the account has, Opus and Sonnet included.

        Show 2 nested
        • limitall ofrequired

          The window.

          Show 1 nested
          all of (1)
          Variant 1
          • reset_since_readboolean

            The window reset after the reading, so `used_percent` is 0 until the next reading.

          • resets_at_msinteger· uint64min 0

            When the window starts again.

          • used_percentnumber· doublerequired

            How much of the window is used, 0 to 100.

        • namestringrequired

          The model's display name, e.g. `Opus`.

      • week_opusany of

        The week, Opus only.

        Show 2 nested
        any of (2)
        Variant 1
        • reset_since_readboolean

          The window reset after the reading, so `used_percent` is 0 until the next reading.

        • resets_at_msinteger· uint64min 0

          When the window starts again.

        • used_percentnumber· doublerequired

          How much of the window is used, 0 to 100.

        Variant 2
        valuenull
      • week_sonnetany of

        The week, Sonnet only.

        Show 2 nested
        any of (2)
        Variant 1
        • reset_since_readboolean

          The window reset after the reading, so `used_percent` is 0 until the next reading.

        • resets_at_msinteger· uint64min 0

          When the window starts again.

        • used_percentnumber· doublerequired

          How much of the window is used, 0 to 100.

        Variant 2
        valuenull
      Variant 2
      valuenull

tmux::configuration-id

Function

Returns this worker instance's effective configuration entry ID, without its value.

Request
Empty object
Response
  • idstringrequired

tmux::install

Function

Install the tmux program on this computer, in the background, and answer at once: the system's package manager when this user may run it without a password (Homebrew, MacPorts, apt, dnf, pacman, zypper, apk), otherwise tmux's official build into ~/.local/bin. Starting during a run joins it. Poll tmux::install::status.

Request
Empty object
Response
  • errorstring

    Why it failed, one sentence for people.

  • hintsstring[]required

    True facts about the step, to alternate with the label.

  • labelstring

    What to show for that step, e.g. `Downloading tmux…`.

  • logstring[]required

    Empty unless the state is `failed`: every command and its output.

  • methodany of

    The way being tried, or the one that worked. Null when tmux was already there.

    any of (2)
    Variant 1
    one of (8)
    Variant 1
    valuestringenum apt
    Variant 2
    valuestringenum dnf
    Variant 3
    valuestringenum pacman
    Variant 4
    valuestringenum zypper
    Variant 5
    valuestringenum apk
    Variant 6
    valuestringenum homebrew
    Variant 7
    valuestringenum macports
    Variant 8
    valuestringenum prebuilt
    Variant 2
    valuenull
  • pathstring

    Where tmux is, once it resolves.

  • progressnumber· double

    0 to 1, while the step knows how far it is.

  • stateall ofrequired

    `idle` also answers a worker that restarted mid-install.

    all of (1)
    Variant 1
    one of (4)
    Variant 1
    valuestringenum idle
    Variant 2
    valuestringenum running
    Variant 3
    valuestringenum succeeded
    Variant 4
    valuestringenum failed
  • stepany of

    The step a running install is on.

    any of (2)
    Variant 1
    one of (6)
    Variant 1
    valuestringenum checking
    Variant 2
    valuestringenum updating
    Variant 3
    valuestringenum downloading
    Variant 4
    valuestringenum verifying
    Variant 5
    valuestringenum installing
    Variant 6
    valuestringenum finishing
    Variant 2
    valuenull
  • versionstring

    Its version, once it resolves.

tmux::install::status

Function

Where tmux::install is: idle (nothing ran since the worker started), running with its step, label and hints, succeeded with the path and version, or failed with one sentence and the log.

Request
Empty object
Response
  • errorstring

    Why it failed, one sentence for people.

  • hintsstring[]required

    True facts about the step, to alternate with the label.

  • labelstring

    What to show for that step, e.g. `Downloading tmux…`.

  • logstring[]required

    Empty unless the state is `failed`: every command and its output.

  • methodany of

    The way being tried, or the one that worked. Null when tmux was already there.

    any of (2)
    Variant 1
    one of (8)
    Variant 1
    valuestringenum apt
    Variant 2
    valuestringenum dnf
    Variant 3
    valuestringenum pacman
    Variant 4
    valuestringenum zypper
    Variant 5
    valuestringenum apk
    Variant 6
    valuestringenum homebrew
    Variant 7
    valuestringenum macports
    Variant 8
    valuestringenum prebuilt
    Variant 2
    valuenull
  • pathstring

    Where tmux is, once it resolves.

  • progressnumber· double

    0 to 1, while the step knows how far it is.

  • stateall ofrequired

    `idle` also answers a worker that restarted mid-install.

    all of (1)
    Variant 1
    one of (4)
    Variant 1
    valuestringenum idle
    Variant 2
    valuestringenum running
    Variant 3
    valuestringenum succeeded
    Variant 4
    valuestringenum failed
  • stepany of

    The step a running install is on.

    any of (2)
    Variant 1
    one of (6)
    Variant 1
    valuestringenum checking
    Variant 2
    valuestringenum updating
    Variant 3
    valuestringenum downloading
    Variant 4
    valuestringenum verifying
    Variant 5
    valuestringenum installing
    Variant 6
    valuestringenum finishing
    Variant 2
    valuenull
  • versionstring

    Its version, once it resolves.

tmux::on-changed

Function

Live tmux overview: the full state (sessions, windows, panes with agent/compose/port status, compose stacks and listening ports), sent to each observer when it is added and called again whenever it changes. Takes no args.

Request
  • portsall ofrequired

    Listening ports and compose stacks.

    all of (1)
    Variant 1
    • composesobject[]required

      Running `iii compose` daemons.

      Show 7 nested
      • compose_filestring

        Compose file the daemon serves, when known.

      • engineany of

        The engine the daemon started, if it manages one.

        Show 2 nested
        any of (2)
        Variant 1
        • pidinteger· uint32requiredmin 0

          Engine pid.

        • portsinteger[]· uint16requiredmin 0

          Ports the engine listens on.

        • ws_portinteger· uint16min 0

          The engine WebSocket port workers connect to.

        Variant 2
        valuenull
      • locationany of

        tmux pane the daemon runs in.

        Show 2 nested
        any of (2)
        Variant 1
        • pane_idstringrequired

          Pane id.

        • sessionstringrequired

          Session name.

        • session_idstringrequired

          Session id.

        • window_idstringrequired

          Window id.

        • window_indexinteger· uint32requiredmin 0

          Window index.

        Variant 2
        valuenull
      • namespacestringrequired

        Daemon namespace (`iii:c:<namespace>`).

      • pidinteger· uint32requiredmin 0

        Daemon pid.

      • project_dirstring

        Daemon working directory.

      • workersobject[]required

        Workers the daemon started.

        Show 3 nested
        • namestringrequired

          Worker name.

        • pidinteger· uint32requiredmin 0

          Top-most pid of the worker's process tree.

        • portsinteger[]· uint16requiredmin 0

          Ports the worker's processes listen on.

    • errorstring

      Why the scan failed, if it did.

    • generated_at_msinteger· uint64requiredmin 0

      When the snapshot was taken.

    • listenersobject[]required

      Every TCP listening socket of this user's processes, sorted by port.

      Show 9 nested
      • addressstringrequired

        Bound address, e.g. `0.0.0.0` or `::1`.

      • composestring

        Compose namespace the process belongs to.

      • familyall ofrequired

        IPv4 or IPv6.

        Show 1 nested
        all of (1)
        Variant 1
        valuestringenum ipv4, ipv6
      • locationany of

        tmux pane the process descends from.

        Show 2 nested
        any of (2)
        Variant 1
        • pane_idstringrequired

          Pane id.

        • sessionstringrequired

          Session name.

        • session_idstringrequired

          Session id.

        • window_idstringrequired

          Window id.

        • window_indexinteger· uint32requiredmin 0

          Window index.

        Variant 2
        valuenull
      • pidinteger· uint32requiredmin 0

        Owning process.

      • portinteger· uint16requiredmin 0

        Port number.

      • processstringrequired

        Owning process name.

      • roleall ofrequired

        What kind of process owns the socket.

        Show 1 nested
        all of (1)
        Variant 1
        one of (4)
        Variant 1
        valuestringenum engine
        Variant 2
        valuestringenum worker
        Variant 3
        valuestringenum compose
        Variant 4
        valuestringenum other
      • workerstring

        iii worker name, when known.

    • supportedbooleanrequired

      This platform has a port scanner.

  • sessionsall ofrequired

    Sessions, windows, panes and their status.

    all of (1)
    Variant 1
    • generated_at_msinteger· uint64requiredmin 0

      When the snapshot was taken.

    • sessionsobject[]required

      Sessions sorted by name.

      Show 7 nested
      • activity_at_msinteger· uint64requiredmin 0

        Last activity in any of its windows.

      • attachedinteger· uint32requiredmin 0

        tmux clients attached, console terminals included.

      • console_attachedinteger· uint32requiredmin 0

        How many attached clients are console terminals.

      • created_at_msinteger· uint64requiredmin 0

        When the session was created.

      • idstringrequired

        Session id, e.g. `$5`.

      • namestringrequired

        Session name.

      • windowsobject[]required

        Windows sorted by index.

        Show 8 nested
        • activebooleanrequired

          This is the session's current window.

        • activity_at_msinteger· uint64requiredmin 0

          Last output in the window.

        • bellbooleanrequired

          A bell rang in the window.

        • idstringrequired

          Window id, e.g. `@3` (unique on the server).

        • indexinteger· uint32requiredmin 0

          Window index inside the session.

        • namestringrequired

          Window name.

        • panesobject[]required

          Panes sorted by index.

          Show 14 nested
          • activebooleanrequired

            The window's active pane.

          • agentany of

            The agent CLI running in this pane, if any.

            Show 2 nested
            any of (2)
            Variant 1
            • idstringrequired

              Matcher id from the configuration, e.g. `claude`.

            • labelstringrequired

              Display name, e.g. `Claude Code`.

            • pidinteger· uint32requiredmin 0

              Pid of the agent process.

            • since_msinteger· uint64requiredmin 0

              When the agent entered `state`.

            • stateall ofrequired

              What the agent is doing.

              Show 1 nested
              all of (1)
              Variant 1
              one of (3)
              Variant 1
              valuestringenum working
              Variant 2
              valuestringenum waiting
              Variant 3
              valuestringenum idle
            • subagentsobject[]

              Sub-agents working right now, oldest first. Their work keeps `state` at `working` after the agent's own turn ended. Claude Code and Codex report them; other agents always list none.

              Show 5 nested
              • depthinteger· uint32requiredmin 0

                1 for a sub-agent of the main agent, 2 for one of its sub-agents, ….

              • descriptionstringrequired

                What it was asked to do: Claude Code's task description, Codex's task path under the main agent (`review/tests`).

              • idstringrequired

                Stable within the agent's session: Claude Code's agent id, Codex's thread id.

              • kindstring

                Claude Code's agent type (`general-purpose`, `Explore`, `fork`) or Codex's agent role; null when the agent names none.

              • since_msinteger· uint64requiredmin 0

                When it started its current task.

            • titlestring

              The agent's session title: the pane title without the agent's status glyph (Claude Code's ✳ or spinner). Null when the pane only shows tmux's default title (the host name) or nothing.

            Variant 2
            valuenull
          • claudeany of

            The Claude Code account the pane runs on and how it follows the global one. Present when the pane runs Claude Code or carries an account mark; absent otherwise and from workers before 0.3.

            Show 2 nested
            any of (2)
            Variant 1
            • accountstring

              Id of the account the running Claude Code uses: the global account on the slot (`~/.claude`), else the account whose folder its `CLAUDE_CONFIG_DIR` names. Null when that folder is no registered account (see `config_dir`) or Claude Code is not running.

            • config_dirstring

              The config folder the running Claude Code uses, `~` for the home folder. Null when Claude Code is not running.

            • followall ofrequired

              `global`, `pinned` or `manual`.

              Show 1 nested
              all of (1)
              Variant 1
              one of (3)
              Variant 1
              valuestringenum global
              Variant 2
              valuestringenum pinned
              Variant 3
              valuestringenum manual
            • movablebooleanrequired

              The worker can move this pane to another account.

            • move_errorstring

              Why the last move of this pane (one that waited for its turn, or a switch of the global account) failed, in one sentence; cleared by the next account change of the pane.

            • not_movable_reasonstring

              Why it can't, in one sentence, when `movable` is false.

            • pendingstring

              The account the pane moves to when its turn ends (`global`: the slot).

            • session_idstring

              Claude Code's session id, which a move resumes.

            • skip_permissionsbooleanrequired

              Claude Code runs without permission prompts (`--dangerously-skip-permissions` or `--permission-mode bypassPermissions`).

            Variant 2
            valuenull
          • commandstringrequired

            Foreground process name.

          • composeany of

            The `iii compose` daemon running in this pane, if any.

            Show 2 nested
            any of (2)
            Variant 1
            • namespacestringrequired

              Compose daemon namespace.

            • pidinteger· uint32requiredmin 0

              Compose daemon pid.

            Variant 2
            valuenull
          • cwdstringrequired

            Current directory.

          • deadbooleanrequired

            The pane's process exited and the pane is kept.

          • heightinteger· uint32requiredmin 0

            Height in rows.

          • idstringrequired

            Pane id, e.g. `%5`.

          • indexinteger· uint32requiredmin 0

            Pane index inside the window.

          • pidinteger· uint32requiredmin 0

            Pid of the process tmux started in the pane.

          • portsobject[]required

            Listening sockets owned by processes started from this pane.

            Show 9 nested
            • addressstringrequired

              Bound address, e.g. `0.0.0.0` or `::1`.

            • composestring

              Compose namespace the process belongs to.

            • familyall ofrequired

              IPv4 or IPv6.

              Show 1 nested
              all of (1)
              Variant 1
              valuestringenum ipv4, ipv6
            • locationany of

              tmux pane the process descends from.

              Show 2 nested
              any of (2)
              Variant 1
              • pane_idstringrequired

                Pane id.

              • sessionstringrequired

                Session name.

              • session_idstringrequired

                Session id.

              • window_idstringrequired

                Window id.

              • window_indexinteger· uint32requiredmin 0

                Window index.

              Variant 2
              valuenull
            • pidinteger· uint32requiredmin 0

              Owning process.

            • portinteger· uint16requiredmin 0

              Port number.

            • processstringrequired

              Owning process name.

            • roleall ofrequired

              What kind of process owns the socket.

              Show 1 nested
              all of (1)
              Variant 1
              one of (4)
              Variant 1
              valuestringenum engine
              Variant 2
              valuestringenum worker
              Variant 3
              valuestringenum compose
              Variant 4
              valuestringenum other
            • workerstring

              iii worker name, when known.

          • titlestringrequired

            Pane title set by the program.

          • widthinteger· uint32requiredmin 0

            Width in columns.

        • zoomedbooleanrequired

          A pane is zoomed.

    • tmuxall ofrequired

      tmux availability and server.

      Show 1 nested
      all of (1)
      Variant 1
      • availablebooleanrequired

        A usable tmux binary was found.

      • errorstring

        Why tmux is unavailable, or the last listing error.

      • installableboolean

        tmux is missing and `tmux::install` can try: a supported OS, the configured binary is plain `tmux`, not a path or another name, and this processor has an official build or this computer a package manager.

      • pathstring

        Resolved tmux binary.

      • server_runningbooleanrequired

        A tmux server is running on that socket.

      • socket_pathstring

        Server socket, known while the server runs.

      • versionstring

        tmux version, e.g. `3.6`.

  • usageany of

    Claude Code accounts and the weekly usage of Claude Code and Codex. Absent from workers before 0.3.

    any of (2)
    Variant 1
    • claudeall ofrequired

      Claude Code's accounts and their usage.

      Show 1 nested
      all of (1)
      Variant 1
      • accountsobject[]required

        The default account first, then the others in the order they were added.

        Show 15 nested
        • colorstringrequired

          `blue`, `green`, `violet`, `orange` or `pink`.

        • dirstringrequired

          Its folder, absolute: `<accounts root>/<id>`. Without `accounts.json`, the one account (`default`) has none, and this is `~/.claude`.

        • dir_displaystringrequired

          Its folder with `~` for the home folder.

        • emailstring

          The signed-in email.

        • idstringrequired

          `default` for the sign-in `~/.claude` had when accounts began, else a slug of its first name.

        • is_defaultbooleanrequired

          Its id is `default`.

        • namestringrequired

          The name people gave it.

        • organizationstring

          The organization it belongs to.

        • panesinteger· uint32requiredmin 0

          Claude Code panes using it now (for the global account, every pane on the slot, its followers included).

        • planstring

          `pro`, `max`, `team`, `enterprise` or what Claude Code recorded.

        • sharedstring[]required

          The groups its folder shares with `~/.claude`: `settings`, `extensions`, `plugins`, `conversations`.

        • signed_inbooleanrequired

          It holds a Claude sign-in.

        • tierstring

          The rate-limit tier, e.g. `default_claude_max_20x`.

        • token_expiredbooleanrequired

          Its access token expired. Claude Code renews it when it runs there, and so does the worker when `tmux::accounts::credential` asks for it.

        • usageany of

          The latest usage reading.

          Show 2 nested
          any of (2)
          Variant 1
          • as_of_msinteger· uint64requiredmin 0

            When this reading was taken.

          • errorstring

            Why the latest attempt to read failed: `rate_limited`, `unauthorized`, `network`, `token_expired`, `not_signed_in`, `unreadable`. The windows are then the last good reading, if any.

          • extraany of

            Usage beyond the plan.

            Show 2 nested
            any of (2)
            Variant 1
            • enabledbooleanrequired

              Extra usage is turned on for the account.

            • used_percentnumber· double

              How much of its monthly limit is used, 0 to 100, when there is one.

            Variant 2
            valuenull
          • five_hourany of

            The current 5-hour window.

            Show 2 nested
            any of (2)
            Variant 1
            • reset_since_readboolean

              The window reset after the reading, so `used_percent` is 0 until the next reading.

            • resets_at_msinteger· uint64min 0

              When the window starts again.

            • used_percentnumber· doublerequired

              How much of the window is used, 0 to 100.

            Variant 2
            valuenull
          • weekany of

            The week, all models.

            Show 2 nested
            any of (2)
            Variant 1
            • reset_since_readboolean

              The window reset after the reading, so `used_percent` is 0 until the next reading.

            • resets_at_msinteger· uint64min 0

              When the window starts again.

            • used_percentnumber· doublerequired

              How much of the window is used, 0 to 100.

            Variant 2
            valuenull
          • week_modelsobject[]

            Every per-model weekly window the account has, Opus and Sonnet included.

            Show 2 nested
            • limitall ofrequired

              The window.

              Show 1 nested
              all of (1)
              Variant 1
              • reset_since_readboolean

                The window reset after the reading, so `used_percent` is 0 until the next reading.

              • resets_at_msinteger· uint64min 0

                When the window starts again.

              • used_percentnumber· doublerequired

                How much of the window is used, 0 to 100.

            • namestringrequired

              The model's display name, e.g. `Opus`.

          • week_opusany of

            The week, Opus only.

            Show 2 nested
            any of (2)
            Variant 1
            • reset_since_readboolean

              The window reset after the reading, so `used_percent` is 0 until the next reading.

            • resets_at_msinteger· uint64min 0

              When the window starts again.

            • used_percentnumber· doublerequired

              How much of the window is used, 0 to 100.

            Variant 2
            valuenull
          • week_sonnetany of

            The week, Sonnet only.

            Show 2 nested
            any of (2)
            Variant 1
            • reset_since_readboolean

              The window reset after the reading, so `used_percent` is 0 until the next reading.

            • resets_at_msinteger· uint64min 0

              When the window starts again.

            • used_percentnumber· doublerequired

              How much of the window is used, 0 to 100.

            Variant 2
            valuenull
          Variant 2
          valuenull
      • availablebooleanrequired

        A `claude` binary is on PATH or `~/.claude` exists.

      • globalstringrequired

        Id of the global account: the sign-in of the slot (`~/.claude`), what plain `claude` uses anywhere.

      • global_historyobject[]

        Which account was global when, oldest first: the account global before the oldest change kept (at 0), then the last 49 changes (`tmux::usage::claude_outside` dates the spend of sessions tmux never ran with it).

        Show 2 nested
        • accountstringrequired

          The account that became global.

        • at_msinteger· uint64requiredmin 0

          When. 0 on the first entry, which names the account global before the oldest change kept.

      • last_switchany of

        The latest change of the global account.

        Show 2 nested
        any of (2)
        Variant 1
        • after_turnstring[]required

          Panes pinned to the old global account that restart on its folder when their turn ends.

        • at_msinteger· uint64requiredmin 0

          When it happened.

        • autobooleanrequired

          The worker switched by itself (rules mode `switch`).

        • back_at_msinteger· uint64min 0

          With `back_after_reset`: when `from`'s window resets and the worker switches back.

        • followinginteger· uint32min 0

          Claude Code panes on the slot that switched with it, on their next message.

        • fromstringrequired

          The global account before.

        • reasonstring

          `week_80`, `week_90`, `limit`, `five_hour` or `back` for an automatic switch; `login` (someone signed in to a known account with `/login`), `login_new` (to a new one, added then), `upgrade` (the worker took the slot's sign-in for global when it was updated); null when someone switched.

        • restartedstring[]

          Pinned panes restarted: the new global account's (now on the slot) and the old one's (now on its folder).

        • tostringrequired

          The global account after.

        Variant 2
        valuenull
      • loginsobject[]

        Sign-ins under way (`tmux::accounts::login_start`), and those that ended in the last minute, oldest first.

        Show 8 nested
        • accountstringrequired

          The account signing in.

        • browserone ofrequired

          Who may open the sign-in page on the computer the worker runs on.

          Show 2 nested
          one of (2)
          Variant 1
          valuestringenum none
          Variant 2
          valuestringenum host
        • emailstring

          The email the sign-in page is filled with (the account's).

        • errorany of

          With `failed` and `expired`: why.

          Show 2 nested
          any of (2)
          Variant 1
          • codestringrequired

            `rejected` (Anthropic didn't accept the code; Claude Code ended), `expired`, `gone` or `failed`.

          • messagestringrequired

            One sentence.

          Variant 2
          valuenull
        • expires_at_msinteger· uint64requiredmin 0

          When the link stops working and Claude Code is stopped.

        • login_idstringrequired

          Pass it to `tmux::accounts::login_code` and `login_cancel`.

        • stateone ofrequired

          Where a sign-in is.

          Show 5 nested
          one of (5)
          Variant 1
          valuestringenum waiting_code
          Variant 2
          valuestringenum checking
          Variant 3
          valuestringenum done
          Variant 4
          valuestringenum failed
          Variant 5
          valuestringenum expired
        • urlstringrequired

          The sign-in page to open on any device: it shows the code to paste.

      • managedbooleanrequired

        The accounts registry exists (an account was added or a setting saved).

      • pending_globalany of

        A switch of the global account that waits for windows on the new account's folder to finish their turn.

        Show 2 nested
        any of (2)
        Variant 1
        • accountstringrequired

          The account becoming global.

        • at_msinteger· uint64requiredmin 0

          When it was asked for.

        • bystringrequired

          `person` or `rule`.

        • waiting_forstring[]required

          The Claude Code panes on its folder still working or waiting.

        Variant 2
        valuenull
      • rulesall ofrequired

        The rules for the global account.

        Show 1 nested
        all of (1)
        Variant 1
        • atall of

          `week_80`, `week_90` or `limit`.

          Show 1 nested
          all of (1)
          Variant 1
          one of (3)
          Variant 1
          valuestringenum week_80
          Variant 2
          valuestringenum week_90
          Variant 3
          valuestringenum limit
        • back_after_resetboolean

          After switching away by itself, switch back once that account's window resets.

        • five_hourboolean

          Also act when the 5-hour window reaches 100 %.

        • modeall of

          `off`, `suggest` or `switch`.

          Show 1 nested
          all of (1)
          Variant 1
          one of (3)
          Variant 1
          valuestringenum off
          Variant 2
          valuestringenum suggest
          Variant 3
          valuestringenum switch
        • orderstring[]

          Accounts to try first, in order; then the one with most room this week.

      • runs_as_rootbooleanrequired

        The worker runs as root, where Claude Code refuses `--dangerously-skip-permissions`.

      • suggestionany of

        Another account suggested for global, while the global one is low.

        Show 2 nested
        any of (2)
        Variant 1
        • at_msinteger· uint64requiredmin 0

          When the reason was first seen.

        • followinginteger· uint32requiredmin 0

          Claude Code panes on the slot that are not pinned: they switch with the global account.

        • fromstringrequired

          The global account.

        • idstringrequired

          Pass it to `tmux::accounts::dismiss`.

        • reasonstringrequired

          `week_80`, `week_90`, `limit` or `five_hour`.

        • tostringrequired

          The account suggested.

        Variant 2
        valuenull
      • switch_delay_sinteger· uint32min 0

        How long a running Claude Code may take to notice a switch, in seconds: 0 on Linux (its next message), 30 on macOS (the Keychain).

    • codexany of

      Codex's usage, when Codex recorded any.

      Show 2 nested
      any of (2)
      Variant 1
      • as_of_msinteger· uint64requiredmin 0

        When Codex recorded it.

      • creditsany of

        Credits, when the plan has them.

        Show 2 nested
        any of (2)
        Variant 1
        • balancestringrequired

          The balance as Codex reports it, e.g. `62500.0000000000`.

        • unlimitedbooleanrequired

          Credits are unlimited.

        Variant 2
        valuenull
      • five_hourany of

        The 5-hour window, when the plan has one.

        Show 2 nested
        any of (2)
        Variant 1
        • reset_since_readboolean

          The window reset after the reading, so `used_percent` is 0 until the next reading.

        • resets_at_msinteger· uint64min 0

          When the window starts again.

        • used_percentnumber· doublerequired

          How much of the window is used, 0 to 100.

        Variant 2
        valuenull
      • planstring

        The ChatGPT plan, e.g. `pro`.

      • weekany of

        The week.

        Show 2 nested
        any of (2)
        Variant 1
        • reset_since_readboolean

          The window reset after the reading, so `used_percent` is 0 until the next reading.

        • resets_at_msinteger· uint64min 0

          When the window starts again.

        • used_percentnumber· doublerequired

          How much of the window is used, 0 to 100.

        Variant 2
        valuenull
      Variant 2
      valuenull
    • generated_at_msinteger· uint64requiredmin 0

      When the snapshot was taken.

    Variant 2
    valuenull
Response
  • portsall ofrequired

    Listening ports and compose stacks.

    all of (1)
    Variant 1
    • composesobject[]required

      Running `iii compose` daemons.

      Show 7 nested
      • compose_filestring

        Compose file the daemon serves, when known.

      • engineany of

        The engine the daemon started, if it manages one.

        Show 2 nested
        any of (2)
        Variant 1
        • pidinteger· uint32requiredmin 0

          Engine pid.

        • portsinteger[]· uint16requiredmin 0

          Ports the engine listens on.

        • ws_portinteger· uint16min 0

          The engine WebSocket port workers connect to.

        Variant 2
        valuenull
      • locationany of

        tmux pane the daemon runs in.

        Show 2 nested
        any of (2)
        Variant 1
        • pane_idstringrequired

          Pane id.

        • sessionstringrequired

          Session name.

        • session_idstringrequired

          Session id.

        • window_idstringrequired

          Window id.

        • window_indexinteger· uint32requiredmin 0

          Window index.

        Variant 2
        valuenull
      • namespacestringrequired

        Daemon namespace (`iii:c:<namespace>`).

      • pidinteger· uint32requiredmin 0

        Daemon pid.

      • project_dirstring

        Daemon working directory.

      • workersobject[]required

        Workers the daemon started.

        Show 3 nested
        • namestringrequired

          Worker name.

        • pidinteger· uint32requiredmin 0

          Top-most pid of the worker's process tree.

        • portsinteger[]· uint16requiredmin 0

          Ports the worker's processes listen on.

    • errorstring

      Why the scan failed, if it did.

    • generated_at_msinteger· uint64requiredmin 0

      When the snapshot was taken.

    • listenersobject[]required

      Every TCP listening socket of this user's processes, sorted by port.

      Show 9 nested
      • addressstringrequired

        Bound address, e.g. `0.0.0.0` or `::1`.

      • composestring

        Compose namespace the process belongs to.

      • familyall ofrequired

        IPv4 or IPv6.

        Show 1 nested
        all of (1)
        Variant 1
        valuestringenum ipv4, ipv6
      • locationany of

        tmux pane the process descends from.

        Show 2 nested
        any of (2)
        Variant 1
        • pane_idstringrequired

          Pane id.

        • sessionstringrequired

          Session name.

        • session_idstringrequired

          Session id.

        • window_idstringrequired

          Window id.

        • window_indexinteger· uint32requiredmin 0

          Window index.

        Variant 2
        valuenull
      • pidinteger· uint32requiredmin 0

        Owning process.

      • portinteger· uint16requiredmin 0

        Port number.

      • processstringrequired

        Owning process name.

      • roleall ofrequired

        What kind of process owns the socket.

        Show 1 nested
        all of (1)
        Variant 1
        one of (4)
        Variant 1
        valuestringenum engine
        Variant 2
        valuestringenum worker
        Variant 3
        valuestringenum compose
        Variant 4
        valuestringenum other
      • workerstring

        iii worker name, when known.

    • supportedbooleanrequired

      This platform has a port scanner.

  • sessionsall ofrequired

    Sessions, windows, panes and their status.

    all of (1)
    Variant 1
    • generated_at_msinteger· uint64requiredmin 0

      When the snapshot was taken.

    • sessionsobject[]required

      Sessions sorted by name.

      Show 7 nested
      • activity_at_msinteger· uint64requiredmin 0

        Last activity in any of its windows.

      • attachedinteger· uint32requiredmin 0

        tmux clients attached, console terminals included.

      • console_attachedinteger· uint32requiredmin 0

        How many attached clients are console terminals.

      • created_at_msinteger· uint64requiredmin 0

        When the session was created.

      • idstringrequired

        Session id, e.g. `$5`.

      • namestringrequired

        Session name.

      • windowsobject[]required

        Windows sorted by index.

        Show 8 nested
        • activebooleanrequired

          This is the session's current window.

        • activity_at_msinteger· uint64requiredmin 0

          Last output in the window.

        • bellbooleanrequired

          A bell rang in the window.

        • idstringrequired

          Window id, e.g. `@3` (unique on the server).

        • indexinteger· uint32requiredmin 0

          Window index inside the session.

        • namestringrequired

          Window name.

        • panesobject[]required

          Panes sorted by index.

          Show 14 nested
          • activebooleanrequired

            The window's active pane.

          • agentany of

            The agent CLI running in this pane, if any.

            Show 2 nested
            any of (2)
            Variant 1
            • idstringrequired

              Matcher id from the configuration, e.g. `claude`.

            • labelstringrequired

              Display name, e.g. `Claude Code`.

            • pidinteger· uint32requiredmin 0

              Pid of the agent process.

            • since_msinteger· uint64requiredmin 0

              When the agent entered `state`.

            • stateall ofrequired

              What the agent is doing.

              Show 1 nested
              all of (1)
              Variant 1
              one of (3)
              Variant 1
              valuestringenum working
              Variant 2
              valuestringenum waiting
              Variant 3
              valuestringenum idle
            • subagentsobject[]

              Sub-agents working right now, oldest first. Their work keeps `state` at `working` after the agent's own turn ended. Claude Code and Codex report them; other agents always list none.

              Show 5 nested
              • depthinteger· uint32requiredmin 0

                1 for a sub-agent of the main agent, 2 for one of its sub-agents, ….

              • descriptionstringrequired

                What it was asked to do: Claude Code's task description, Codex's task path under the main agent (`review/tests`).

              • idstringrequired

                Stable within the agent's session: Claude Code's agent id, Codex's thread id.

              • kindstring

                Claude Code's agent type (`general-purpose`, `Explore`, `fork`) or Codex's agent role; null when the agent names none.

              • since_msinteger· uint64requiredmin 0

                When it started its current task.

            • titlestring

              The agent's session title: the pane title without the agent's status glyph (Claude Code's ✳ or spinner). Null when the pane only shows tmux's default title (the host name) or nothing.

            Variant 2
            valuenull
          • claudeany of

            The Claude Code account the pane runs on and how it follows the global one. Present when the pane runs Claude Code or carries an account mark; absent otherwise and from workers before 0.3.

            Show 2 nested
            any of (2)
            Variant 1
            • accountstring

              Id of the account the running Claude Code uses: the global account on the slot (`~/.claude`), else the account whose folder its `CLAUDE_CONFIG_DIR` names. Null when that folder is no registered account (see `config_dir`) or Claude Code is not running.

            • config_dirstring

              The config folder the running Claude Code uses, `~` for the home folder. Null when Claude Code is not running.

            • followall ofrequired

              `global`, `pinned` or `manual`.

              Show 1 nested
              all of (1)
              Variant 1
              one of (3)
              Variant 1
              valuestringenum global
              Variant 2
              valuestringenum pinned
              Variant 3
              valuestringenum manual
            • movablebooleanrequired

              The worker can move this pane to another account.

            • move_errorstring

              Why the last move of this pane (one that waited for its turn, or a switch of the global account) failed, in one sentence; cleared by the next account change of the pane.

            • not_movable_reasonstring

              Why it can't, in one sentence, when `movable` is false.

            • pendingstring

              The account the pane moves to when its turn ends (`global`: the slot).

            • session_idstring

              Claude Code's session id, which a move resumes.

            • skip_permissionsbooleanrequired

              Claude Code runs without permission prompts (`--dangerously-skip-permissions` or `--permission-mode bypassPermissions`).

            Variant 2
            valuenull
          • commandstringrequired

            Foreground process name.

          • composeany of

            The `iii compose` daemon running in this pane, if any.

            Show 2 nested
            any of (2)
            Variant 1
            • namespacestringrequired

              Compose daemon namespace.

            • pidinteger· uint32requiredmin 0

              Compose daemon pid.

            Variant 2
            valuenull
          • cwdstringrequired

            Current directory.

          • deadbooleanrequired

            The pane's process exited and the pane is kept.

          • heightinteger· uint32requiredmin 0

            Height in rows.

          • idstringrequired

            Pane id, e.g. `%5`.

          • indexinteger· uint32requiredmin 0

            Pane index inside the window.

          • pidinteger· uint32requiredmin 0

            Pid of the process tmux started in the pane.

          • portsobject[]required

            Listening sockets owned by processes started from this pane.

            Show 9 nested
            • addressstringrequired

              Bound address, e.g. `0.0.0.0` or `::1`.

            • composestring

              Compose namespace the process belongs to.

            • familyall ofrequired

              IPv4 or IPv6.

              Show 1 nested
              all of (1)
              Variant 1
              valuestringenum ipv4, ipv6
            • locationany of

              tmux pane the process descends from.

              Show 2 nested
              any of (2)
              Variant 1
              • pane_idstringrequired

                Pane id.

              • sessionstringrequired

                Session name.

              • session_idstringrequired

                Session id.

              • window_idstringrequired

                Window id.

              • window_indexinteger· uint32requiredmin 0

                Window index.

              Variant 2
              valuenull
            • pidinteger· uint32requiredmin 0

              Owning process.

            • portinteger· uint16requiredmin 0

              Port number.

            • processstringrequired

              Owning process name.

            • roleall ofrequired

              What kind of process owns the socket.

              Show 1 nested
              all of (1)
              Variant 1
              one of (4)
              Variant 1
              valuestringenum engine
              Variant 2
              valuestringenum worker
              Variant 3
              valuestringenum compose
              Variant 4
              valuestringenum other
            • workerstring

              iii worker name, when known.

          • titlestringrequired

            Pane title set by the program.

          • widthinteger· uint32requiredmin 0

            Width in columns.

        • zoomedbooleanrequired

          A pane is zoomed.

    • tmuxall ofrequired

      tmux availability and server.

      Show 1 nested
      all of (1)
      Variant 1
      • availablebooleanrequired

        A usable tmux binary was found.

      • errorstring

        Why tmux is unavailable, or the last listing error.

      • installableboolean

        tmux is missing and `tmux::install` can try: a supported OS, the configured binary is plain `tmux`, not a path or another name, and this processor has an official build or this computer a package manager.

      • pathstring

        Resolved tmux binary.

      • server_runningbooleanrequired

        A tmux server is running on that socket.

      • socket_pathstring

        Server socket, known while the server runs.

      • versionstring

        tmux version, e.g. `3.6`.

  • usageany of

    Claude Code accounts and the weekly usage of Claude Code and Codex. Absent from workers before 0.3.

    any of (2)
    Variant 1
    • claudeall ofrequired

      Claude Code's accounts and their usage.

      Show 1 nested
      all of (1)
      Variant 1
      • accountsobject[]required

        The default account first, then the others in the order they were added.

        Show 15 nested
        • colorstringrequired

          `blue`, `green`, `violet`, `orange` or `pink`.

        • dirstringrequired

          Its folder, absolute: `<accounts root>/<id>`. Without `accounts.json`, the one account (`default`) has none, and this is `~/.claude`.

        • dir_displaystringrequired

          Its folder with `~` for the home folder.

        • emailstring

          The signed-in email.

        • idstringrequired

          `default` for the sign-in `~/.claude` had when accounts began, else a slug of its first name.

        • is_defaultbooleanrequired

          Its id is `default`.

        • namestringrequired

          The name people gave it.

        • organizationstring

          The organization it belongs to.

        • panesinteger· uint32requiredmin 0

          Claude Code panes using it now (for the global account, every pane on the slot, its followers included).

        • planstring

          `pro`, `max`, `team`, `enterprise` or what Claude Code recorded.

        • sharedstring[]required

          The groups its folder shares with `~/.claude`: `settings`, `extensions`, `plugins`, `conversations`.

        • signed_inbooleanrequired

          It holds a Claude sign-in.

        • tierstring

          The rate-limit tier, e.g. `default_claude_max_20x`.

        • token_expiredbooleanrequired

          Its access token expired. Claude Code renews it when it runs there, and so does the worker when `tmux::accounts::credential` asks for it.

        • usageany of

          The latest usage reading.

          Show 2 nested
          any of (2)
          Variant 1
          • as_of_msinteger· uint64requiredmin 0

            When this reading was taken.

          • errorstring

            Why the latest attempt to read failed: `rate_limited`, `unauthorized`, `network`, `token_expired`, `not_signed_in`, `unreadable`. The windows are then the last good reading, if any.

          • extraany of

            Usage beyond the plan.

            Show 2 nested
            any of (2)
            Variant 1
            • enabledbooleanrequired

              Extra usage is turned on for the account.

            • used_percentnumber· double

              How much of its monthly limit is used, 0 to 100, when there is one.

            Variant 2
            valuenull
          • five_hourany of

            The current 5-hour window.

            Show 2 nested
            any of (2)
            Variant 1
            • reset_since_readboolean

              The window reset after the reading, so `used_percent` is 0 until the next reading.

            • resets_at_msinteger· uint64min 0

              When the window starts again.

            • used_percentnumber· doublerequired

              How much of the window is used, 0 to 100.

            Variant 2
            valuenull
          • weekany of

            The week, all models.

            Show 2 nested
            any of (2)
            Variant 1
            • reset_since_readboolean

              The window reset after the reading, so `used_percent` is 0 until the next reading.

            • resets_at_msinteger· uint64min 0

              When the window starts again.

            • used_percentnumber· doublerequired

              How much of the window is used, 0 to 100.

            Variant 2
            valuenull
          • week_modelsobject[]

            Every per-model weekly window the account has, Opus and Sonnet included.

            Show 2 nested
            • limitall ofrequired

              The window.

              Show 1 nested
              all of (1)
              Variant 1
              • reset_since_readboolean

                The window reset after the reading, so `used_percent` is 0 until the next reading.

              • resets_at_msinteger· uint64min 0

                When the window starts again.

              • used_percentnumber· doublerequired

                How much of the window is used, 0 to 100.

            • namestringrequired

              The model's display name, e.g. `Opus`.

          • week_opusany of

            The week, Opus only.

            Show 2 nested
            any of (2)
            Variant 1
            • reset_since_readboolean

              The window reset after the reading, so `used_percent` is 0 until the next reading.

            • resets_at_msinteger· uint64min 0

              When the window starts again.

            • used_percentnumber· doublerequired

              How much of the window is used, 0 to 100.

            Variant 2
            valuenull
          • week_sonnetany of

            The week, Sonnet only.

            Show 2 nested
            any of (2)
            Variant 1
            • reset_since_readboolean

              The window reset after the reading, so `used_percent` is 0 until the next reading.

            • resets_at_msinteger· uint64min 0

              When the window starts again.

            • used_percentnumber· doublerequired

              How much of the window is used, 0 to 100.

            Variant 2
            valuenull
          Variant 2
          valuenull
      • availablebooleanrequired

        A `claude` binary is on PATH or `~/.claude` exists.

      • globalstringrequired

        Id of the global account: the sign-in of the slot (`~/.claude`), what plain `claude` uses anywhere.

      • global_historyobject[]

        Which account was global when, oldest first: the account global before the oldest change kept (at 0), then the last 49 changes (`tmux::usage::claude_outside` dates the spend of sessions tmux never ran with it).

        Show 2 nested
        • accountstringrequired

          The account that became global.

        • at_msinteger· uint64requiredmin 0

          When. 0 on the first entry, which names the account global before the oldest change kept.

      • last_switchany of

        The latest change of the global account.

        Show 2 nested
        any of (2)
        Variant 1
        • after_turnstring[]required

          Panes pinned to the old global account that restart on its folder when their turn ends.

        • at_msinteger· uint64requiredmin 0

          When it happened.

        • autobooleanrequired

          The worker switched by itself (rules mode `switch`).

        • back_at_msinteger· uint64min 0

          With `back_after_reset`: when `from`'s window resets and the worker switches back.

        • followinginteger· uint32min 0

          Claude Code panes on the slot that switched with it, on their next message.

        • fromstringrequired

          The global account before.

        • reasonstring

          `week_80`, `week_90`, `limit`, `five_hour` or `back` for an automatic switch; `login` (someone signed in to a known account with `/login`), `login_new` (to a new one, added then), `upgrade` (the worker took the slot's sign-in for global when it was updated); null when someone switched.

        • restartedstring[]

          Pinned panes restarted: the new global account's (now on the slot) and the old one's (now on its folder).

        • tostringrequired

          The global account after.

        Variant 2
        valuenull
      • loginsobject[]

        Sign-ins under way (`tmux::accounts::login_start`), and those that ended in the last minute, oldest first.

        Show 8 nested
        • accountstringrequired

          The account signing in.

        • browserone ofrequired

          Who may open the sign-in page on the computer the worker runs on.

          Show 2 nested
          one of (2)
          Variant 1
          valuestringenum none
          Variant 2
          valuestringenum host
        • emailstring

          The email the sign-in page is filled with (the account's).

        • errorany of

          With `failed` and `expired`: why.

          Show 2 nested
          any of (2)
          Variant 1
          • codestringrequired

            `rejected` (Anthropic didn't accept the code; Claude Code ended), `expired`, `gone` or `failed`.

          • messagestringrequired

            One sentence.

          Variant 2
          valuenull
        • expires_at_msinteger· uint64requiredmin 0

          When the link stops working and Claude Code is stopped.

        • login_idstringrequired

          Pass it to `tmux::accounts::login_code` and `login_cancel`.

        • stateone ofrequired

          Where a sign-in is.

          Show 5 nested
          one of (5)
          Variant 1
          valuestringenum waiting_code
          Variant 2
          valuestringenum checking
          Variant 3
          valuestringenum done
          Variant 4
          valuestringenum failed
          Variant 5
          valuestringenum expired
        • urlstringrequired

          The sign-in page to open on any device: it shows the code to paste.

      • managedbooleanrequired

        The accounts registry exists (an account was added or a setting saved).

      • pending_globalany of

        A switch of the global account that waits for windows on the new account's folder to finish their turn.

        Show 2 nested
        any of (2)
        Variant 1
        • accountstringrequired

          The account becoming global.

        • at_msinteger· uint64requiredmin 0

          When it was asked for.

        • bystringrequired

          `person` or `rule`.

        • waiting_forstring[]required

          The Claude Code panes on its folder still working or waiting.

        Variant 2
        valuenull
      • rulesall ofrequired

        The rules for the global account.

        Show 1 nested
        all of (1)
        Variant 1
        • atall of

          `week_80`, `week_90` or `limit`.

          Show 1 nested
          all of (1)
          Variant 1
          one of (3)
          Variant 1
          valuestringenum week_80
          Variant 2
          valuestringenum week_90
          Variant 3
          valuestringenum limit
        • back_after_resetboolean

          After switching away by itself, switch back once that account's window resets.

        • five_hourboolean

          Also act when the 5-hour window reaches 100 %.

        • modeall of

          `off`, `suggest` or `switch`.

          Show 1 nested
          all of (1)
          Variant 1
          one of (3)
          Variant 1
          valuestringenum off
          Variant 2
          valuestringenum suggest
          Variant 3
          valuestringenum switch
        • orderstring[]

          Accounts to try first, in order; then the one with most room this week.

      • runs_as_rootbooleanrequired

        The worker runs as root, where Claude Code refuses `--dangerously-skip-permissions`.

      • suggestionany of

        Another account suggested for global, while the global one is low.

        Show 2 nested
        any of (2)
        Variant 1
        • at_msinteger· uint64requiredmin 0

          When the reason was first seen.

        • followinginteger· uint32requiredmin 0

          Claude Code panes on the slot that are not pinned: they switch with the global account.

        • fromstringrequired

          The global account.

        • idstringrequired

          Pass it to `tmux::accounts::dismiss`.

        • reasonstringrequired

          `week_80`, `week_90`, `limit` or `five_hour`.

        • tostringrequired

          The account suggested.

        Variant 2
        valuenull
      • switch_delay_sinteger· uint32min 0

        How long a running Claude Code may take to notice a switch, in seconds: 0 on Linux (its next message), 30 on macOS (the Keychain).

    • codexany of

      Codex's usage, when Codex recorded any.

      Show 2 nested
      any of (2)
      Variant 1
      • as_of_msinteger· uint64requiredmin 0

        When Codex recorded it.

      • creditsany of

        Credits, when the plan has them.

        Show 2 nested
        any of (2)
        Variant 1
        • balancestringrequired

          The balance as Codex reports it, e.g. `62500.0000000000`.

        • unlimitedbooleanrequired

          Credits are unlimited.

        Variant 2
        valuenull
      • five_hourany of

        The 5-hour window, when the plan has one.

        Show 2 nested
        any of (2)
        Variant 1
        • reset_since_readboolean

          The window reset after the reading, so `used_percent` is 0 until the next reading.

        • resets_at_msinteger· uint64min 0

          When the window starts again.

        • used_percentnumber· doublerequired

          How much of the window is used, 0 to 100.

        Variant 2
        valuenull
      • planstring

        The ChatGPT plan, e.g. `pro`.

      • weekany of

        The week.

        Show 2 nested
        any of (2)
        Variant 1
        • reset_since_readboolean

          The window reset after the reading, so `used_percent` is 0 until the next reading.

        • resets_at_msinteger· uint64min 0

          When the window starts again.

        • used_percentnumber· doublerequired

          How much of the window is used, 0 to 100.

        Variant 2
        valuenull
      Variant 2
      valuenull
    • generated_at_msinteger· uint64requiredmin 0

      When the snapshot was taken.

    Variant 2
    valuenull

tmux::on-config-change

Function

Internal: re-read the tmux configuration after an operator change.

Request
  • idstring

    Configuration id that changed.

Response
  • okbooleanrequired

tmux::panes::account

Function

Choose the Claude Code account of a pane: `global` follows the global account (it runs on ~/.claude and switches with it, with no restart), an account id pins the pane there (on ~/.claude while that account is global, on its folder otherwise). When Claude Code has to run elsewhere for that (the account must be signed in), it moves: it stops and starts again there, resuming its conversation (copied there if the account doesn't share conversations). Pinning a pane on ~/.claude to the account that is global now restarts nothing. An idle pane moves now (looked at again right before it stops); one that is working or waiting moves once its turn ends (`after_turn`). Choosing what it already is changes no process, and cancels a move that waits (`cancelled`).

Request
  • accountstringrequired

    `global` (follow the global account) or an account id (pin to it).

  • panestringrequired

    Pane id, e.g. `%5`.

Response
  • accountstringrequired

    The account it runs on now, or will after its turn.

  • stateone ofrequired

    What became of the pane.

    one of (5)
    Variant 1
    valuestringenum following
    Variant 2
    valuestringenum pinned
    Variant 3
    valuestringenum moved
    Variant 4
    valuestringenum after_turn
    Variant 5
    valuestringenum cancelled

tmux::panes::capture

Function

The visible screen of one pane as text with its colour and style escapes (capture-pane -e), plus the pane's size, cursor position and whether a full-screen program has the alternate screen. Read-only.

Request
  • panestringrequired

    Pane id, e.g. `%5`.

Response
  • alternatebooleanrequired

    The pane shows its alternate screen (a full-screen program).

  • cursor_xinteger· uint32requiredmin 0

    Cursor column, from 0.

  • cursor_yinteger· uint32requiredmin 0

    Cursor row, from 0.

  • heightinteger· uint32requiredmin 0

    Height in rows.

  • pane_idstringrequired

    Pane id.

  • textstringrequired

    The visible screen, one line per row separated by `\n`, with SGR escapes.

  • widthinteger· uint32requiredmin 0

    Width in columns.

tmux::panes::kill

Function

Kill a pane and the program running in it. Killing a window's last pane closes the window, and its session's last window closes the session; the answer says which closed.

Request
  • panestringrequired

    Pane id, e.g. `%5`.

Response
  • killedbooleanrequired

    Always true.

  • session_closedbooleanrequired

    That window was its session's last, so the session closed.

  • window_closedbooleanrequired

    It was its window's last pane, so the window closed.

tmux::panes::respawn

Function

Start a pane's program again in the same pane: the command it was started with (or command), in its starting directory (or cwd). A pane whose program is still running is refused unless kill is true, which ends that program first.

Request
  • commandstring

    Shell command to run instead of the one the pane was started with.

  • cwdstring

    Working directory, absolute or `~/…`. Defaults to the pane's starting directory.

  • killboolean

    End the pane's program first when it is still running (default false).

  • panestringrequired

    Pane id, e.g. `%5`.

Response
  • pane_idstringrequired

    Pane id, the same as before.

tmux::panes::select

Function

Make a pane the active pane of its window. zoom sets the window's zoom, it never toggles: true zooms the window on this pane (or keeps it zoomed there), false unzooms it, and without zoom the window keeps its zoom state, moved to this pane. A window with one pane can't zoom: the answer says zoomed false. Like tmux itself, every client looking at that window follows, your terminal included. It does not change the session's current window (tmux::windows::select does).

Request
  • panestringrequired

    Pane id, e.g. `%5`.

  • zoomboolean

    true zooms the window on this pane, false unzooms it, absent keeps the window's zoom.

Response
  • pane_idstringrequired

    Pane id now active in its window.

  • session_idstringrequired

    Session id the pane was resolved in.

  • window_idstringrequired

    Window id holding the pane.

  • zoomedbooleanrequired

    The window is zoomed on the active pane.

tmux::panes::split

Function

Split a pane in two: the new pane goes to its right or below it, starts in that pane's current directory (or cwd) and runs the default shell (or command). It becomes the window's active pane unless select is false. Like tmux, splitting a zoomed window unzooms it. With remain_on_exit, the new pane stays once its program ends, dead, for tmux::panes::respawn to restart it.

Request
  • commandstring

    Shell command to run instead of the default shell.

  • cwdstring

    Working directory, absolute or `~/…`. Defaults to the split pane's current directory.

  • directionall ofrequired

    Where the new pane goes: `right` or `below`.

    all of (1)
    Variant 1
    one of (2)
    Variant 1
    valuestringenum right
    Variant 2
    valuestringenum below
  • panestringrequired

    Pane id to split, e.g. `%5`.

  • remain_on_exitboolean

    Keep the new pane once its program ends, shown dead, so tmux::panes::respawn can restart it (default false: tmux closes it). On tmux before 3.0, which has no pane options, every pane of its window is kept.

  • selectboolean

    Make the new pane the window's active pane (default true).

Response
  • pane_idstringrequired

    The new pane's id.

  • session_idstringrequired

    Session id.

  • window_idstringrequired

    Window id holding both panes.

tmux::ports::list

Function

Every TCP port this user's processes listen on, with process, iii role (engine / worker / compose), worker name, compose namespace and the tmux pane the process runs in; plus each running `iii compose` stack with its engine WebSocket port and workers' ports.

Request
Empty object
Response
  • composesobject[]required

    Running `iii compose` daemons.

    • compose_filestring

      Compose file the daemon serves, when known.

    • engineany of

      The engine the daemon started, if it manages one.

      any of (2)
      Variant 1
      • pidinteger· uint32requiredmin 0

        Engine pid.

      • portsinteger[]· uint16requiredmin 0

        Ports the engine listens on.

      • ws_portinteger· uint16min 0

        The engine WebSocket port workers connect to.

      Variant 2
      valuenull
    • locationany of

      tmux pane the daemon runs in.

      any of (2)
      Variant 1
      • pane_idstringrequired

        Pane id.

      • sessionstringrequired

        Session name.

      • session_idstringrequired

        Session id.

      • window_idstringrequired

        Window id.

      • window_indexinteger· uint32requiredmin 0

        Window index.

      Variant 2
      valuenull
    • namespacestringrequired

      Daemon namespace (`iii:c:<namespace>`).

    • pidinteger· uint32requiredmin 0

      Daemon pid.

    • project_dirstring

      Daemon working directory.

    • workersobject[]required

      Workers the daemon started.

      • namestringrequired

        Worker name.

      • pidinteger· uint32requiredmin 0

        Top-most pid of the worker's process tree.

      • portsinteger[]· uint16requiredmin 0

        Ports the worker's processes listen on.

  • errorstring

    Why the scan failed, if it did.

  • generated_at_msinteger· uint64requiredmin 0

    When the snapshot was taken.

  • listenersobject[]required

    Every TCP listening socket of this user's processes, sorted by port.

    • addressstringrequired

      Bound address, e.g. `0.0.0.0` or `::1`.

    • composestring

      Compose namespace the process belongs to.

    • familyall ofrequired

      IPv4 or IPv6.

      all of (1)
      Variant 1
      valuestringenum ipv4, ipv6
    • locationany of

      tmux pane the process descends from.

      any of (2)
      Variant 1
      • pane_idstringrequired

        Pane id.

      • sessionstringrequired

        Session name.

      • session_idstringrequired

        Session id.

      • window_idstringrequired

        Window id.

      • window_indexinteger· uint32requiredmin 0

        Window index.

      Variant 2
      valuenull
    • pidinteger· uint32requiredmin 0

      Owning process.

    • portinteger· uint16requiredmin 0

      Port number.

    • processstringrequired

      Owning process name.

    • roleall ofrequired

      What kind of process owns the socket.

      all of (1)
      Variant 1
      one of (4)
      Variant 1
      valuestringenum engine
      Variant 2
      valuestringenum worker
      Variant 3
      valuestringenum compose
      Variant 4
      valuestringenum other
    • workerstring

      iii worker name, when known.

  • supportedbooleanrequired

    This platform has a port scanner.

tmux::sessions::create

Function

Create a detached tmux session (starting the tmux server if needed). Optional name, working directory (default $HOME), first window name and a shell command to run instead of the default shell. With remain_on_exit, the pane stays once its program ends, dead, for tmux::panes::respawn to restart it.

Request
  • claudeany of

    Start Claude Code on an account in the first window instead of `command` (not both): the worker builds the command (returned as `runs`) and marks the pane with its account.

    any of (2)
    Variant 1
    • accountstring

      `global` (the default: it runs on the global account and moves when that changes) or an account id (pinned to it).

    • skip_permissionsboolean

      Start it with --dangerously-skip-permissions (default false). Refused when the host runs as root.

    Variant 2
    valuenull
  • commandstring

    Shell command to run in the first window instead of the default shell.

  • cwdstring

    Working directory, absolute or `~/…`. Defaults to $HOME.

  • namestring

    Session name; tmux picks a number when omitted. No `:` or `.`.

  • remain_on_exitboolean

    Keep the pane once its program ends, shown dead, so tmux::panes::respawn can restart it (default false: tmux closes it). On tmux before 3.0, which has no pane options, every pane of its window is kept.

  • window_namestring

    Name of the first window.

Response
  • pane_idstringrequired

    First pane id.

  • runsstring

    With `claude`: the exact command the pane runs.

  • sessionstringrequired

    Session name.

  • session_idstringrequired

    New session id, e.g. `$7`.

  • window_idstringrequired

    First window id.

  • window_indexinteger· uint32requiredmin 0

    First window index.

tmux::sessions::kill

Function

Kill a tmux session and every program running in its windows.

Request
  • sessionstringrequired

    Session id (`$5`) or exact name.

Response
  • killedbooleanrequired

    Always true.

tmux::sessions::list

Function

Every tmux session with its windows and panes: foreground command, cwd, title, size, the agent CLI running in the pane (claude, codex, … with state working / waiting / idle), the `iii compose` daemon it runs and the ports its processes listen on.

Request
Empty object
Response
  • generated_at_msinteger· uint64requiredmin 0

    When the snapshot was taken.

  • sessionsobject[]required

    Sessions sorted by name.

    • activity_at_msinteger· uint64requiredmin 0

      Last activity in any of its windows.

    • attachedinteger· uint32requiredmin 0

      tmux clients attached, console terminals included.

    • console_attachedinteger· uint32requiredmin 0

      How many attached clients are console terminals.

    • created_at_msinteger· uint64requiredmin 0

      When the session was created.

    • idstringrequired

      Session id, e.g. `$5`.

    • namestringrequired

      Session name.

    • windowsobject[]required

      Windows sorted by index.

      • activebooleanrequired

        This is the session's current window.

      • activity_at_msinteger· uint64requiredmin 0

        Last output in the window.

      • bellbooleanrequired

        A bell rang in the window.

      • idstringrequired

        Window id, e.g. `@3` (unique on the server).

      • indexinteger· uint32requiredmin 0

        Window index inside the session.

      • namestringrequired

        Window name.

      • panesobject[]required

        Panes sorted by index.

        Show 14 nested
        • activebooleanrequired

          The window's active pane.

        • agentany of

          The agent CLI running in this pane, if any.

          Show 2 nested
          any of (2)
          Variant 1
          • idstringrequired

            Matcher id from the configuration, e.g. `claude`.

          • labelstringrequired

            Display name, e.g. `Claude Code`.

          • pidinteger· uint32requiredmin 0

            Pid of the agent process.

          • since_msinteger· uint64requiredmin 0

            When the agent entered `state`.

          • stateall ofrequired

            What the agent is doing.

            Show 1 nested
            all of (1)
            Variant 1
            one of (3)
            Variant 1
            valuestringenum working
            Variant 2
            valuestringenum waiting
            Variant 3
            valuestringenum idle
          • subagentsobject[]

            Sub-agents working right now, oldest first. Their work keeps `state` at `working` after the agent's own turn ended. Claude Code and Codex report them; other agents always list none.

            Show 5 nested
            • depthinteger· uint32requiredmin 0

              1 for a sub-agent of the main agent, 2 for one of its sub-agents, ….

            • descriptionstringrequired

              What it was asked to do: Claude Code's task description, Codex's task path under the main agent (`review/tests`).

            • idstringrequired

              Stable within the agent's session: Claude Code's agent id, Codex's thread id.

            • kindstring

              Claude Code's agent type (`general-purpose`, `Explore`, `fork`) or Codex's agent role; null when the agent names none.

            • since_msinteger· uint64requiredmin 0

              When it started its current task.

          • titlestring

            The agent's session title: the pane title without the agent's status glyph (Claude Code's ✳ or spinner). Null when the pane only shows tmux's default title (the host name) or nothing.

          Variant 2
          valuenull
        • claudeany of

          The Claude Code account the pane runs on and how it follows the global one. Present when the pane runs Claude Code or carries an account mark; absent otherwise and from workers before 0.3.

          Show 2 nested
          any of (2)
          Variant 1
          • accountstring

            Id of the account the running Claude Code uses: the global account on the slot (`~/.claude`), else the account whose folder its `CLAUDE_CONFIG_DIR` names. Null when that folder is no registered account (see `config_dir`) or Claude Code is not running.

          • config_dirstring

            The config folder the running Claude Code uses, `~` for the home folder. Null when Claude Code is not running.

          • followall ofrequired

            `global`, `pinned` or `manual`.

            Show 1 nested
            all of (1)
            Variant 1
            one of (3)
            Variant 1
            valuestringenum global
            Variant 2
            valuestringenum pinned
            Variant 3
            valuestringenum manual
          • movablebooleanrequired

            The worker can move this pane to another account.

          • move_errorstring

            Why the last move of this pane (one that waited for its turn, or a switch of the global account) failed, in one sentence; cleared by the next account change of the pane.

          • not_movable_reasonstring

            Why it can't, in one sentence, when `movable` is false.

          • pendingstring

            The account the pane moves to when its turn ends (`global`: the slot).

          • session_idstring

            Claude Code's session id, which a move resumes.

          • skip_permissionsbooleanrequired

            Claude Code runs without permission prompts (`--dangerously-skip-permissions` or `--permission-mode bypassPermissions`).

          Variant 2
          valuenull
        • commandstringrequired

          Foreground process name.

        • composeany of

          The `iii compose` daemon running in this pane, if any.

          Show 2 nested
          any of (2)
          Variant 1
          • namespacestringrequired

            Compose daemon namespace.

          • pidinteger· uint32requiredmin 0

            Compose daemon pid.

          Variant 2
          valuenull
        • cwdstringrequired

          Current directory.

        • deadbooleanrequired

          The pane's process exited and the pane is kept.

        • heightinteger· uint32requiredmin 0

          Height in rows.

        • idstringrequired

          Pane id, e.g. `%5`.

        • indexinteger· uint32requiredmin 0

          Pane index inside the window.

        • pidinteger· uint32requiredmin 0

          Pid of the process tmux started in the pane.

        • portsobject[]required

          Listening sockets owned by processes started from this pane.

          Show 9 nested
          • addressstringrequired

            Bound address, e.g. `0.0.0.0` or `::1`.

          • composestring

            Compose namespace the process belongs to.

          • familyall ofrequired

            IPv4 or IPv6.

            Show 1 nested
            all of (1)
            Variant 1
            valuestringenum ipv4, ipv6
          • locationany of

            tmux pane the process descends from.

            Show 2 nested
            any of (2)
            Variant 1
            • pane_idstringrequired

              Pane id.

            • sessionstringrequired

              Session name.

            • session_idstringrequired

              Session id.

            • window_idstringrequired

              Window id.

            • window_indexinteger· uint32requiredmin 0

              Window index.

            Variant 2
            valuenull
          • pidinteger· uint32requiredmin 0

            Owning process.

          • portinteger· uint16requiredmin 0

            Port number.

          • processstringrequired

            Owning process name.

          • roleall ofrequired

            What kind of process owns the socket.

            Show 1 nested
            all of (1)
            Variant 1
            one of (4)
            Variant 1
            valuestringenum engine
            Variant 2
            valuestringenum worker
            Variant 3
            valuestringenum compose
            Variant 4
            valuestringenum other
          • workerstring

            iii worker name, when known.

        • titlestringrequired

          Pane title set by the program.

        • widthinteger· uint32requiredmin 0

          Width in columns.

      • zoomedbooleanrequired

        A pane is zoomed.

  • tmuxall ofrequired

    tmux availability and server.

    all of (1)
    Variant 1
    • availablebooleanrequired

      A usable tmux binary was found.

    • errorstring

      Why tmux is unavailable, or the last listing error.

    • installableboolean

      tmux is missing and `tmux::install` can try: a supported OS, the configured binary is plain `tmux`, not a path or another name, and this processor has an official build or this computer a package manager.

    • pathstring

      Resolved tmux binary.

    • server_runningbooleanrequired

      A tmux server is running on that socket.

    • socket_pathstring

      Server socket, known while the server runs.

    • versionstring

      tmux version, e.g. `3.6`.

tmux::sessions::rename

Function

Rename a tmux session.

Request
  • namestringrequired

    New name. No `:` or `.`.

  • sessionstringrequired

    Session id (`$5`) or exact name.

Response
  • namestringrequired

    New name.

  • session_idstringrequired

    Session id.

tmux::status

Function

Whether tmux is installed, its version and path, and whether a tmux server is running on the configured socket.

Request
Empty object
Response
  • availablebooleanrequired

    A usable tmux binary was found.

  • errorstring

    Why tmux is unavailable, or the last listing error.

  • installableboolean

    tmux is missing and `tmux::install` can try: a supported OS, the configured binary is plain `tmux`, not a path or another name, and this processor has an official build or this computer a package manager.

  • pathstring

    Resolved tmux binary.

  • server_runningbooleanrequired

    A tmux server is running on that socket.

  • socket_pathstring

    Server socket, known while the server runs.

  • versionstring

    tmux version, e.g. `3.6`.

tmux::subagents::transcript

Function

What one sub-agent of the agent in a pane (Claude Code or Codex) has done so far, from the transcript the agent keeps on disk: the task it was given, what it wrote and reasoned, the tools it called and what they returned, oldest first. Works while the sub-agent runs (`working`) and after it finished, as long as the agent runs. Read-only.

Request
  • limitinteger· uint32min 0

    The most items returned, the latest ones: 200 when absent, at most 1000.

  • panestringrequired

    Pane id of the agent, e.g. `%5`.

  • subagentstringrequired

    The sub-agent's id, from `agent.subagents[].id` in `tmux::sessions::list`.

Response
  • agentstringrequired

    Matcher id of that agent: `claude` or `codex`.

  • itemsobject[]required

    The latest items, oldest first, without the task.

    • at_msinteger· uint64min 0

      When the agent recorded it.

    • errorboolean

      The tool reported a failure (`tool_result` only).

    • kindone ofrequired
      one of (5)
      Variant 1
      valuestringenum user
      Variant 2
      valuestringenum text
      Variant 3
      valuestringenum thinking
      Variant 4
      valuestringenum tool_call
      Variant 5
      valuestringenum tool_result
    • textstringrequired

      The text, cut at 4 000 characters (then ending in `…`). A tool call's is its main argument: the command, path, pattern or query, else the whole input as JSON.

    • toolstring

      The tool's name, on `tool_call` and `tool_result` items.

  • pane_idstringrequired

    Pane id of the agent running the sub-agent.

  • promptstring

    The task it was given, cut at 16 000 characters. Null when the transcript holds none; Codex keeps a sub-agent's task encrypted, so there it shows only the task's name and sender.

  • subagent_idstringrequired

    The sub-agent's id, as in `agent.subagents`.

  • truncatedbooleanrequired

    Older items were left out: past `limit`, or before the last 4 MiB of the file.

  • workingbooleanrequired

    The sub-agent is still in its agent's `subagents` list.

tmux::terminal::close

Function

Detach a console terminal's tmux client. The session keeps running.

Request
  • access_keystringrequired

    Credential from `open`.

  • terminal_idstringrequired

    Terminal handle from `open`.

Response
  • closedbooleanrequired

    False when the terminal was already gone.

tmux::terminal::open

Function

Attach a console terminal to a tmux session as a real tmux client running in a PTY. Output is pushed to the page's handler.

Request
  • colsinteger· uint16requiredmin 0

    Terminal width in columns (2..=500).

  • output_function_idstringrequired

    Browser handler receiving output: `iii::tmux-ui::pty-output::console-<browser id>`.

  • rowsinteger· uint16requiredmin 0

    Terminal height in rows (2..=500).

  • sessionstringrequired

    Session id (`$5`) or exact name to attach to.

  • windowany of

    Window id (`@3`) or index to select before attaching.

    any of (2)
    Variant 1
    any of (2)
    Variant 1
    valueinteger· uint32min 0
    Variant 2
    valuestring
    Variant 2
    valuenull
Response
  • access_keystringrequired

    Short-lived credential required by every other call. Never persist it.

  • client_ttystring

    The tmux client's tty, as `list-clients` shows it.

  • session_idstringrequired

    Session the client attached to.

  • terminal_idstringrequired

    Terminal handle for the other calls.

tmux::terminal::redraw

Function

Ask tmux to repaint the console terminal's whole screen (refresh-client).

Request
  • access_keystringrequired

    Credential from `open`.

  • terminal_idstringrequired

    Terminal handle from `open`.

Response
  • okbooleanrequired

    Always true.

tmux::terminal::replay

Function

Re-send buffered output frames after a sequence, for gap repair.

Request
  • access_keystringrequired

    Credential from `open`.

  • after_sequenceinteger· uint64requiredmin 0

    Last sequence the page applied; frames after it are returned.

  • terminal_idstringrequired

    Terminal handle from `open`.

Response
  • framesobject[]required
    • datastringrequired
    • sequenceinteger· uint64requiredmin 0
  • next_sequenceinteger· uint64requiredmin 0
  • truncatedbooleanrequired

tmux::terminal::resize

Function

Resize a console terminal; also its heartbeat.

Request
  • access_keystringrequired

    Credential from `open`.

  • colsinteger· uint16requiredmin 0

    Width in columns (2..=500).

  • rowsinteger· uint16requiredmin 0

    Height in rows (2..=500).

  • terminal_idstringrequired

    Terminal handle from `open`.

Response
  • colsinteger· uint16requiredmin 0

    Width applied.

  • rowsinteger· uint16requiredmin 0

    Height applied.

tmux::terminal::switch

Function

Move only this console terminal's tmux client to another session (switch-client), optionally selecting a window there.

Request
  • access_keystringrequired

    Credential from `open`.

  • sessionstringrequired

    Session id (`$5`) or exact name to move this client to.

  • terminal_idstringrequired

    Terminal handle from `open`.

  • windowany of

    Window id (`@3`) or index to select there.

    any of (2)
    Variant 1
    any of (2)
    Variant 1
    valueinteger· uint32min 0
    Variant 2
    valuestring
    Variant 2
    valuenull
Response
  • session_idstringrequired

    Session the client now shows.

tmux::terminal::upload

Function

Save a file being pasted into a console terminal (any type, base64, at most 12 MiB) in a new folder of its own in the cache folder of the user this worker runs as, under its name made safe, and answer its path for the page to paste. It types nothing; uploads older than 7 days, and the oldest past 256 MiB, are removed.

Request
  • access_keystringrequired

    Credential from `open`.

  • datastringrequired

    The file, base64, any type, at most 12 MiB decoded.

  • mimestring

    Its type as the page knows it; the answer names what the bytes are when they are a known image.

  • namestringrequired

    The file's name. Only its base name is kept, made one safe token: characters outside `A-Z a-z 0-9 . _ -` become `-`, no leading dot, at most 100 bytes; empty is `file`. A known image (PNG, JPEG, GIF, WebP) gets the extension its content has.

  • terminal_idstringrequired

    Terminal handle from `open`.

Response
  • bytesinteger· uintrequiredmin 0

    Its size in bytes.

  • mimestringrequired

    Its type: what the bytes are when they are a known image, else the request's, else `application/octet-stream`.

  • pathstringrequired

    Absolute path of the new file, to paste into the terminal as text (no spaces in its name).

tmux::terminal::write

Function

Write base64 keyboard input to a console terminal's tmux client.

Request
  • access_keystringrequired

    Credential from `open`.

  • datastringrequired

    Base64 keyboard input, at most 64 KiB decoded.

  • terminal_idstringrequired

    Terminal handle from `open`.

Response
  • writteninteger· uintrequiredmin 0

    Bytes written to the tmux client.

tmux::ui-content

Function

Serve the tmux worker's injected console UI assets (the target of its ade::ui::asset observers; the console calls it through each asset's observer with {path}).

Request
  • pathstringrequired

    The asset path from the observer's args (e.g. `state/page.js`).

Response
  • contentstringrequired

    The asset source, verbatim.

  • content_typestringrequired

    MIME type the console should serve the asset with.

tmux::usage::claude_outside

Function

The Claude Code spend on account `account` outside the Chat since `since_ms` (tmux windows and any other Claude Code on this computer), as tokens by model (`input`, `output`, `cache_read`, `cache_write`, `messages`), from Claude Code's own transcripts. A session tmux ran in a pane counts for that pane's account at each reply's time (or, on ~/.claude, the account global then); any other session counts for the account that was global when it replied (`global_history`), and `attributed` says how many replies were counted that way. Each reply counts once, by its message id (else its request id), wherever its transcript was copied. Read when asked, only what Claude Code added since the last read, counted by the minute, and kept five minutes (`as_of_ms`). `global` names the account global now. Token counts only; never a token. Errors are one JSON object `{code, message}`: `unknown_account`.

Request
  • accountstringrequired

    An account id, or `global` for the account global now.

  • since_msinteger· uint64requiredmin 0

    Count replies from this time on (milliseconds since the epoch), e.g. the account's week start: its `week.resets_at_ms` minus seven days.

Response
  • accountstringrequired

    The account (the one global now when `global` was asked).

  • as_of_msinteger· uint64requiredmin 0

    When Claude Code's transcripts were read (at most five minutes ago).

  • attributedinteger· uint64requiredmin 0

    Replies of sessions tmux never ran, counted here because this account was global when they were written.

  • by_modelobject[]required

    The spend by model, by model id.

    • cache_readinteger· uint64requiredmin 0

      Input tokens read from the prompt cache.

    • cache_writeinteger· uint64requiredmin 0

      Input tokens written to the prompt cache.

    • inputinteger· uint64requiredmin 0

      Input tokens not read from the cache.

    • messagesinteger· uint64requiredmin 0

      Replies counted.

    • modelstringrequired

      The model's id as Claude Code recorded it, e.g. `claude-opus-4-5`.

    • outputinteger· uint64requiredmin 0

      Output tokens.

  • since_msinteger· uint64requiredmin 0

    Replies from this time on are counted.

tmux::usage::read

Function

The weekly usage of Claude Code (per account: 5-hour window, week, per-model weeks, each with when it resets) and of Codex (plan, 5-hour window, week, credits), with the Claude Code accounts, the global one, the rules and any suggestion. The same object the live feed carries as `usage`. Readings are at most five minutes old while the app watches; refresh asks again now (at most once a minute per account). Never returns a token: only the internal tmux::accounts::credential does.

Request
  • refreshboolean

    Read every signed-in account again now instead of returning the latest readings (each account at most once a minute).

Response
  • claudeall ofrequired

    Claude Code's accounts and their usage.

    all of (1)
    Variant 1
    • accountsobject[]required

      The default account first, then the others in the order they were added.

      Show 15 nested
      • colorstringrequired

        `blue`, `green`, `violet`, `orange` or `pink`.

      • dirstringrequired

        Its folder, absolute: `<accounts root>/<id>`. Without `accounts.json`, the one account (`default`) has none, and this is `~/.claude`.

      • dir_displaystringrequired

        Its folder with `~` for the home folder.

      • emailstring

        The signed-in email.

      • idstringrequired

        `default` for the sign-in `~/.claude` had when accounts began, else a slug of its first name.

      • is_defaultbooleanrequired

        Its id is `default`.

      • namestringrequired

        The name people gave it.

      • organizationstring

        The organization it belongs to.

      • panesinteger· uint32requiredmin 0

        Claude Code panes using it now (for the global account, every pane on the slot, its followers included).

      • planstring

        `pro`, `max`, `team`, `enterprise` or what Claude Code recorded.

      • sharedstring[]required

        The groups its folder shares with `~/.claude`: `settings`, `extensions`, `plugins`, `conversations`.

      • signed_inbooleanrequired

        It holds a Claude sign-in.

      • tierstring

        The rate-limit tier, e.g. `default_claude_max_20x`.

      • token_expiredbooleanrequired

        Its access token expired. Claude Code renews it when it runs there, and so does the worker when `tmux::accounts::credential` asks for it.

      • usageany of

        The latest usage reading.

        Show 2 nested
        any of (2)
        Variant 1
        • as_of_msinteger· uint64requiredmin 0

          When this reading was taken.

        • errorstring

          Why the latest attempt to read failed: `rate_limited`, `unauthorized`, `network`, `token_expired`, `not_signed_in`, `unreadable`. The windows are then the last good reading, if any.

        • extraany of

          Usage beyond the plan.

          Show 2 nested
          any of (2)
          Variant 1
          • enabledbooleanrequired

            Extra usage is turned on for the account.

          • used_percentnumber· double

            How much of its monthly limit is used, 0 to 100, when there is one.

          Variant 2
          valuenull
        • five_hourany of

          The current 5-hour window.

          Show 2 nested
          any of (2)
          Variant 1
          • reset_since_readboolean

            The window reset after the reading, so `used_percent` is 0 until the next reading.

          • resets_at_msinteger· uint64min 0

            When the window starts again.

          • used_percentnumber· doublerequired

            How much of the window is used, 0 to 100.

          Variant 2
          valuenull
        • weekany of

          The week, all models.

          Show 2 nested
          any of (2)
          Variant 1
          • reset_since_readboolean

            The window reset after the reading, so `used_percent` is 0 until the next reading.

          • resets_at_msinteger· uint64min 0

            When the window starts again.

          • used_percentnumber· doublerequired

            How much of the window is used, 0 to 100.

          Variant 2
          valuenull
        • week_modelsobject[]

          Every per-model weekly window the account has, Opus and Sonnet included.

          Show 2 nested
          • limitall ofrequired

            The window.

            Show 1 nested
            all of (1)
            Variant 1
            • reset_since_readboolean

              The window reset after the reading, so `used_percent` is 0 until the next reading.

            • resets_at_msinteger· uint64min 0

              When the window starts again.

            • used_percentnumber· doublerequired

              How much of the window is used, 0 to 100.

          • namestringrequired

            The model's display name, e.g. `Opus`.

        • week_opusany of

          The week, Opus only.

          Show 2 nested
          any of (2)
          Variant 1
          • reset_since_readboolean

            The window reset after the reading, so `used_percent` is 0 until the next reading.

          • resets_at_msinteger· uint64min 0

            When the window starts again.

          • used_percentnumber· doublerequired

            How much of the window is used, 0 to 100.

          Variant 2
          valuenull
        • week_sonnetany of

          The week, Sonnet only.

          Show 2 nested
          any of (2)
          Variant 1
          • reset_since_readboolean

            The window reset after the reading, so `used_percent` is 0 until the next reading.

          • resets_at_msinteger· uint64min 0

            When the window starts again.

          • used_percentnumber· doublerequired

            How much of the window is used, 0 to 100.

          Variant 2
          valuenull
        Variant 2
        valuenull
    • availablebooleanrequired

      A `claude` binary is on PATH or `~/.claude` exists.

    • globalstringrequired

      Id of the global account: the sign-in of the slot (`~/.claude`), what plain `claude` uses anywhere.

    • global_historyobject[]

      Which account was global when, oldest first: the account global before the oldest change kept (at 0), then the last 49 changes (`tmux::usage::claude_outside` dates the spend of sessions tmux never ran with it).

      Show 2 nested
      • accountstringrequired

        The account that became global.

      • at_msinteger· uint64requiredmin 0

        When. 0 on the first entry, which names the account global before the oldest change kept.

    • last_switchany of

      The latest change of the global account.

      Show 2 nested
      any of (2)
      Variant 1
      • after_turnstring[]required

        Panes pinned to the old global account that restart on its folder when their turn ends.

      • at_msinteger· uint64requiredmin 0

        When it happened.

      • autobooleanrequired

        The worker switched by itself (rules mode `switch`).

      • back_at_msinteger· uint64min 0

        With `back_after_reset`: when `from`'s window resets and the worker switches back.

      • followinginteger· uint32min 0

        Claude Code panes on the slot that switched with it, on their next message.

      • fromstringrequired

        The global account before.

      • reasonstring

        `week_80`, `week_90`, `limit`, `five_hour` or `back` for an automatic switch; `login` (someone signed in to a known account with `/login`), `login_new` (to a new one, added then), `upgrade` (the worker took the slot's sign-in for global when it was updated); null when someone switched.

      • restartedstring[]

        Pinned panes restarted: the new global account's (now on the slot) and the old one's (now on its folder).

      • tostringrequired

        The global account after.

      Variant 2
      valuenull
    • loginsobject[]

      Sign-ins under way (`tmux::accounts::login_start`), and those that ended in the last minute, oldest first.

      Show 8 nested
      • accountstringrequired

        The account signing in.

      • browserone ofrequired

        Who may open the sign-in page on the computer the worker runs on.

        Show 2 nested
        one of (2)
        Variant 1
        valuestringenum none
        Variant 2
        valuestringenum host
      • emailstring

        The email the sign-in page is filled with (the account's).

      • errorany of

        With `failed` and `expired`: why.

        Show 2 nested
        any of (2)
        Variant 1
        • codestringrequired

          `rejected` (Anthropic didn't accept the code; Claude Code ended), `expired`, `gone` or `failed`.

        • messagestringrequired

          One sentence.

        Variant 2
        valuenull
      • expires_at_msinteger· uint64requiredmin 0

        When the link stops working and Claude Code is stopped.

      • login_idstringrequired

        Pass it to `tmux::accounts::login_code` and `login_cancel`.

      • stateone ofrequired

        Where a sign-in is.

        Show 5 nested
        one of (5)
        Variant 1
        valuestringenum waiting_code
        Variant 2
        valuestringenum checking
        Variant 3
        valuestringenum done
        Variant 4
        valuestringenum failed
        Variant 5
        valuestringenum expired
      • urlstringrequired

        The sign-in page to open on any device: it shows the code to paste.

    • managedbooleanrequired

      The accounts registry exists (an account was added or a setting saved).

    • pending_globalany of

      A switch of the global account that waits for windows on the new account's folder to finish their turn.

      Show 2 nested
      any of (2)
      Variant 1
      • accountstringrequired

        The account becoming global.

      • at_msinteger· uint64requiredmin 0

        When it was asked for.

      • bystringrequired

        `person` or `rule`.

      • waiting_forstring[]required

        The Claude Code panes on its folder still working or waiting.

      Variant 2
      valuenull
    • rulesall ofrequired

      The rules for the global account.

      Show 1 nested
      all of (1)
      Variant 1
      • atall of

        `week_80`, `week_90` or `limit`.

        Show 1 nested
        all of (1)
        Variant 1
        one of (3)
        Variant 1
        valuestringenum week_80
        Variant 2
        valuestringenum week_90
        Variant 3
        valuestringenum limit
      • back_after_resetboolean

        After switching away by itself, switch back once that account's window resets.

      • five_hourboolean

        Also act when the 5-hour window reaches 100 %.

      • modeall of

        `off`, `suggest` or `switch`.

        Show 1 nested
        all of (1)
        Variant 1
        one of (3)
        Variant 1
        valuestringenum off
        Variant 2
        valuestringenum suggest
        Variant 3
        valuestringenum switch
      • orderstring[]

        Accounts to try first, in order; then the one with most room this week.

    • runs_as_rootbooleanrequired

      The worker runs as root, where Claude Code refuses `--dangerously-skip-permissions`.

    • suggestionany of

      Another account suggested for global, while the global one is low.

      Show 2 nested
      any of (2)
      Variant 1
      • at_msinteger· uint64requiredmin 0

        When the reason was first seen.

      • followinginteger· uint32requiredmin 0

        Claude Code panes on the slot that are not pinned: they switch with the global account.

      • fromstringrequired

        The global account.

      • idstringrequired

        Pass it to `tmux::accounts::dismiss`.

      • reasonstringrequired

        `week_80`, `week_90`, `limit` or `five_hour`.

      • tostringrequired

        The account suggested.

      Variant 2
      valuenull
    • switch_delay_sinteger· uint32min 0

      How long a running Claude Code may take to notice a switch, in seconds: 0 on Linux (its next message), 30 on macOS (the Keychain).

  • codexany of

    Codex's usage, when Codex recorded any.

    any of (2)
    Variant 1
    • as_of_msinteger· uint64requiredmin 0

      When Codex recorded it.

    • creditsany of

      Credits, when the plan has them.

      Show 2 nested
      any of (2)
      Variant 1
      • balancestringrequired

        The balance as Codex reports it, e.g. `62500.0000000000`.

      • unlimitedbooleanrequired

        Credits are unlimited.

      Variant 2
      valuenull
    • five_hourany of

      The 5-hour window, when the plan has one.

      Show 2 nested
      any of (2)
      Variant 1
      • reset_since_readboolean

        The window reset after the reading, so `used_percent` is 0 until the next reading.

      • resets_at_msinteger· uint64min 0

        When the window starts again.

      • used_percentnumber· doublerequired

        How much of the window is used, 0 to 100.

      Variant 2
      valuenull
    • planstring

      The ChatGPT plan, e.g. `pro`.

    • weekany of

      The week.

      Show 2 nested
      any of (2)
      Variant 1
      • reset_since_readboolean

        The window reset after the reading, so `used_percent` is 0 until the next reading.

      • resets_at_msinteger· uint64min 0

        When the window starts again.

      • used_percentnumber· doublerequired

        How much of the window is used, 0 to 100.

      Variant 2
      valuenull
    Variant 2
    valuenull
  • generated_at_msinteger· uint64requiredmin 0

    When the snapshot was taken.

tmux::windows::create

Function

Create a window in a tmux session. Optional name, working directory (default: the directory the session was created in), a shell command to run instead of the default shell, and whether to make it the current window (default true). With remain_on_exit, its pane stays once its program ends, dead, for tmux::panes::respawn to restart it.

Request
  • claudeany of

    Start Claude Code on an account instead of `command` (not both): the worker builds the command (returned as `runs`) and marks the pane with its account.

    any of (2)
    Variant 1
    • accountstring

      `global` (the default: it runs on the global account and moves when that changes) or an account id (pinned to it).

    • skip_permissionsboolean

      Start it with --dangerously-skip-permissions (default false). Refused when the host runs as root.

    Variant 2
    valuenull
  • commandstring

    Shell command to run instead of the default shell.

  • cwdstring

    Working directory, absolute or `~/…`. Defaults to the directory the session was created in (the home folder on tmux older than 3.2, which can't tell).

  • namestring

    Window name. No `:` or `.`.

  • remain_on_exitboolean

    Keep its pane once its program ends, shown dead, so tmux::panes::respawn can restart it (default false: tmux closes it). On tmux before 3.0, which has no pane options, every pane of the window is kept.

  • selectboolean

    Make it the session's current window (default true).

  • sessionstringrequired

    Session id (`$5`) or exact name.

Response
  • pane_idstringrequired

    Its first pane id.

  • runsstring

    With `claude`: the exact command the pane runs.

  • session_idstringrequired

    Session id.

  • window_idstringrequired

    New window id, e.g. `@9`.

  • window_indexinteger· uint32requiredmin 0

    New window index.

tmux::windows::kill

Function

Kill a tmux window and every program running in its panes.

Request
  • sessionstringrequired

    Session id (`$5`) or exact name.

  • windowall ofrequired

    Window id (`@3`) or index.

    all of (1)
    Variant 1
    any of (2)
    Variant 1
    valueinteger· uint32min 0
    Variant 2
    valuestring
Response
  • killedbooleanrequired

    Always true.

tmux::windows::move

Function

Move a window to another tmux session, after its last window or just before or after one of its windows (`before` / `after`, which need tmux 3.2 or later and also reorder a window inside its own session). The window keeps its id, panes and programs, and the destination session's current window stays as it was. When it was the last window of its session, tmux closes that session.

Request
  • afterany of

    Put it just after this window of `target_session` (id or index). Needs tmux 3.2 or later. Without `before` or `after` it goes after the session's last window.

    any of (2)
    Variant 1
    any of (2)
    Variant 1
    valueinteger· uint32min 0
    Variant 2
    valuestring
    Variant 2
    valuenull
  • beforeany of

    Put it just before this window of `target_session` (id or index). Needs tmux 3.2 or later.

    any of (2)
    Variant 1
    any of (2)
    Variant 1
    valueinteger· uint32min 0
    Variant 2
    valuestring
    Variant 2
    valuenull
  • sessionstringrequired

    Session id (`$5`) or exact name of the session the window is in.

  • target_sessionstringrequired

    Session id (`$5`) or exact name of the session to move it to. Its own session reorders it, with `before` or `after`.

  • windowall ofrequired

    Window id (`@3`) or index.

    all of (1)
    Variant 1
    any of (2)
    Variant 1
    valueinteger· uint32min 0
    Variant 2
    valuestring
Response
  • session_idstringrequired

    Id of the session the window is in now.

  • source_session_closedbooleanrequired

    It was the last window of its session, so tmux closed that session.

  • window_idstringrequired

    Window id, the same as before the move.

  • window_indexinteger· uint32requiredmin 0

    Its index in that session now.

tmux::windows::rename

Function

Rename a tmux window.

Request
  • namestringrequired

    New name. No `:` or `.`.

  • sessionstringrequired

    Session id (`$5`) or exact name.

  • windowall ofrequired

    Window id (`@3`) or index.

    all of (1)
    Variant 1
    any of (2)
    Variant 1
    valueinteger· uint32min 0
    Variant 2
    valuestring
Response
  • namestringrequired

    New name.

  • window_idstringrequired

    Window id.

tmux::windows::select

Function

Make a window the current window of its session. Like tmux itself, every client attached to that session (your terminal included) switches to it.

Request
  • sessionstringrequired

    Session id (`$5`) or exact name.

  • windowall ofrequired

    Window id (`@3`) or index.

    all of (1)
    Variant 1
    any of (2)
    Variant 1
    valueinteger· uint32min 0
    Variant 2
    valuestring
Response
  • session_idstringrequired

    Session id.

  • window_idstringrequired

    Window id now current.

Search the registry

Find workers, kits and executables, or jump to a page.