AI INTEGRATION

CTO Per-Tab Override

Choose whether a tab follows the global CTO mode.

Availability

Implemented in the stable source; configuration and compatibility limits are described below.

Reviewed against stable v0.5.1. Rust candidate additions are labeled separately. Release status.

The pain this solves

  • A single global output-optimization policy may not suit every terminal session.
  • Forcing CTO on cannot supersede the global off mode.

What ships with it

  • Each tab can follow the global policy, force on, or force off.
  • The hover card provides a CTO toggle and MCP exposes tab_set_cto.
  • The global off mode takes precedence over a per-tab force-on value.

Questions this answers

  • Can I enable token tracking for just one terminal tab?
  • How to disable CTO for a specific AI session?
  • Per-tab token optimization settings in terminal
  • Control token monitoring per terminal tab

How it works

Each tab stores one of three override values: default, force on, or force off. Default follows the global token-optimization mode.

When the global mode permits optimization, the per-tab choice determines whether the wrapper active flag is set for that terminal session. The hover card exposes a CTO toggle, and MCP includes tab_set_cto.

Global mode off remains authoritative: the shared decision logic returns inactive even for a force-on override, and the MCP setter rejects changes while CTO is globally disabled. The override controls command-output optimization, not API analytics.

Why it matters

Different tabs may need different output handling. A per-tab override lets one session follow the normal global policy while another opts in or out, with the global off setting still acting as the top-level disable.

Frequently asked questions

What does Default mean?

Default follows the global CTO mode, including whether that mode applies to all tabs, AI tabs, or manual selection.

Can Force On override a globally disabled CTO mode?

No. Global mode off wins, and the MCP setter reports that token optimization is globally disabled.

Can an MCP client change a tab override?

Yes, through tab_set_cto for a tab it is authorized to control.