Repository navigation
Releases
AFKSwitch 0.7.1
The README now says exactly what the switch runs by itself, which the plugin directory asks for:
- one slash command per click:
/afkswitch:afkwhen you are present,/afkswitch:backwhen you are away; - a
command.runlistener that only notices when that command of its own starts; - a read of
HOMEorUSERPROFILEonly to find the state folder.
No behavior change since 0.7.0.
Update: /plugin marketplace update afkswitch then /reload-plugins (Claude Code 2.1.287+).
AFKSwitch 0.7.0
While you are away
- An approval prompt no longer stops a session until you return. In Claude Code, a prompt that opens while you are away is declined, and the session is told to defer that one step and keep working. It never approves anything, and
/backis never declined. SetAFKSWITCH_KEEP_PROMPTS=1to keep the prompts. - A small label beside the switch names the kind of absence found in your
/afktext:💤 sleeping,💼 at work,🛒 shopping,🛫 traveling. With no text at all, an idle label such as🌳 at the parkshows now and then for 8 seconds. Your text itself is never drawn. - Decisions that need you are queued and come back together as multiple-choice questions on
/back.
Fixed
- The presence note is no longer repeated on almost every prompt in a busy session.
/afkand/backgive up after 15 seconds on a lock they cannot remove, instead of spinning forever.- On Windows the switch reads the same home folder as the state helper.
install.ps1refuses to overwrite or delete anafkorbackfolder that is not an AFKSwitch skill.
Changed
- Presence notes print the context as one quoted string, so context text cannot pose as part of the note.
- The switch module also draws in the Claude Code desktop app. Module tests cover that; it has not been checked by eye there.
- The switch module tests now run in CI on Linux, Windows and macOS.
Full list: CHANGELOG.
Update: /plugin marketplace update afkswitch then /reload-plugins (Claude Code 2.1.287+).
AFKSwitch 0.6.7
A click anywhere inside the switch's box now toggles it, not only on the cells. Because a button cannot carry its own color, being away now shows as an orange border around the switch instead of an orange word.
Update: /plugin marketplace update afkswitch then /reload-plugins (Claude Code 2.1.287+).
AFKSwitch 0.6.6
Fixes a false failure: pressing the switch could show not switched — try /afk or /back while the /afk or /back turn was still running (always on a busy session). The switch now stays on saving… until its own command's turn ends and only then reports a failure. It still moves only after the state is saved and read back.
The /afk and /back skills now address other sessions by their bare name.
Update: /plugin marketplace update afkswitch then /reload-plugins (Claude Code 2.1.287+).
AFKSwitch 0.6.5
A first-time hint, and words instead of a bare "!".
-
One-time onboarding: the first time the switch loads for you, three short lines appear under it:
AFKSwitch is ready — [ AFK □■ ] means you're here.
Click it when you leave; click again when you're back.
Use /afk [note] or /back [note] for optional context.They show once per user, disappear on your first prompt or press, and never reach the model.
-
Transition text: while a press is being saved the switch says
saving…; if it can't confirm the change it saysnot switched — try /afk or /back. The cells still move only after the state is saved and read back.
Install or update: /plugin marketplace add augbastos/afkswitch → /plugin install afkswitch@afkswitch → /reload-plugins (Claude Code 2.1.287+, python3).
AFKSwitch 0.6.4
AFKSwitch is now an actual switch inside Claude Code, installed like any plugin.
/plugin marketplace add augbastos/afkswitch
/plugin install afkswitch@afkswitch
/reload-plugins
Claude Code 2.1.287 loads the switch from a marketplace install (verified on one machine). [ AFK □■ ] above the prompt; one click → [ AFK ■□ ] and your other live sessions are told; one click back collects their status.
- First use: on a fresh install the neutral
□□is pressable and starts AFK. An unreadable or invalid state stays neutral and locked. - README: rewritten around a real 4-step demo, the 3-command install and a short trust list (MIT, local state, no server or telemetry, presence is not permission).
- Bug reports: the issue form now asks for Claude Code version, terminal and install method.
Needs Claude Code 2.1.287+ and python3. The Claude plugin directory copy still ships without the switch while the directory reviews mods; install from GitHub for the switch.
AFKSwitch 0.6.3
New logo and plugin icon: the Claude Code switch itself, a bordered box with an orange AFK and the away cells. The README art follows it. No behavior change from 0.6.0, which has the full notes.
The Claude plugin directory serves a build without the switch module (v0.6.3-directory), because it holds any plugin that includes a mod; install from GitHub for the switch.
AFKSwitch 0.6.2
Same switch as 0.6.0, which has the full notes. One local variable in the switch module was named h, the name JSX compiles to; the Claude plugin directory's policy check blocks that, so it is renamed. No behavior change.
The switch still loads only from a plugin folder (--plugin-dir or CLAUDE_CODE_PLUGIN_DIRS) until Claude Code enables modules for installed plugins.
AFKSwitch 0.6.1
Same switch, written so the Claude plugin directory can review it. No behavior change from 0.6.0, which has the full notes.
- The switch module passes
$only to plain function declarations, and its registrations no longer chain an error fallback (Claude Code already skips a hook that throws). - The README states which events the switch hooks and which commands it runs:
/afkswitch:afkor/afkswitch:back, once per press, without context.
The switch still loads only from a plugin folder (--plugin-dir or CLAUDE_CODE_PLUGIN_DIRS) until Claude Code enables modules for installed plugins.
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.


