{"version":"2.1.203","anchor":"tmux-option-probes-now-cached","canonical_anchor":"tmux-option-probes-now-cached","heading":"Tmux Option Probes Now Cached","tier":null,"area":null,"scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.203\/e\/tmux-option-probes-now-cached","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.203","markdown":"### Tmux Option Probes Now Cached\n\nThe tmux option queries (mouse mode and focus-events state) are now performed once and cached per session. Previously each check that needed the tmux mouse or focus-events status spawned a new `tmux show` subprocess. The cached results are shared across all callers within the session.\n\n**Details**\n\n- Two queries are cached: `tmux show -Av mouse` (detects mouse support) and `tmux show -gv focus-events` (detects focus-event state); each subprocess runs with a 2-second timeout\n- Cache keys `tmuxMouseOptionProbe` and `tmuxFocusOptionProbe` live on the session-scoped probe-state object; each is initialized to `undefined` and populated lazily on first access via a stored Promise using `??=` assignment, so concurrent callers share the same in-flight subprocess\n- Both probes are eagerly pre-warmed at startup via an early call when `$TMUX` is set and iTerm.app control-mode is not active, so the results are already resolved by the time hint-display checks run\n- Mouse hint fires when the probe returns anything other than `\"on\"`: \"tmux detected \u00b7 scroll with PgUp\/PgDn \u00b7 or add 'set -g mouse on' to ~\/.tmux.conf for wheel scroll\"; only shown once per session via a `checkedTmuxMouseHint` boolean flag\n- Focus-events hint fires when the probe returns anything other than `\"on\"`: \"tmux focus-events off \u00b7 add 'set -g focus-events on' to ~\/.tmux.conf and reattach for focus tracking\"; similarly gated by `checkedTmuxFocusHint`\n- A `null` result from either probe (tmux binary not found, spawn failure, or non-zero exit code) suppresses that hint silently\n\n**Evidence**\n\nTmux probe cache (search for `\"tmuxMouseOptionProbe\"` and `\"tmuxFocusOptionProbe\"`)"}