Repository navigation
AFKSwitch 0.6.0
A one-click switch in Claude Code. [ AFK □■ ] above the prompt: one click runs /afk, the next runs /back. AFK turns orange while you are away; the cells move, so it reads without color too. It never flips before the state is saved, shows □□ when the state is unknown, blocks double presses and marks a failure with !.
One presence contract across hosts. /afk and /back share one state format with a change counter. The bundled helper is the only writer; the new read-only hooks bring sessions up to date when they start or when you send a prompt.
Requirements and the one limitation
- Python 3.9+ as
python3for the helper and the sync hooks. - The switch needs Claude Code function-hooks modules (tested on 2.1.287). Today Claude Code loads modules only from a plugin folder loaded with
--plugin-dirorCLAUDE_CODE_PLUGIN_DIRS. Installed from the directory or a marketplace, you get/afk,/backand the sync hooks, but not the switch, until Claude Code enables modules for installed plugins. - Codex and Antigravity: state only; their hook files stay experimental.
Full list in the changelog; test evidence in compatibility.
