How to Switch Between Normal Mode and ADHD Mode in i-have-adhd

You can toggle between normal and ADHD mode using the /i-have-adhd command, the /skill:i-have-adhd alias, or the --adhd launch flag, with your preference persisted via the i-have-adhd-state session entry.

The i-have-adhd repository provides a Pi extension that injects ADHD-friendly response rules from skills/i-have-adhd/SKILL.md into your model conversations. Understanding how to switch between normal mode and ADHD mode gives you precise control over when these behavioral guidelines are active in the context window.

How the Mode Toggle Works Internally

The extension tracks activation through a Boolean enabled state defined at lines 29-31 of extensions/i-have-adhd.ts. When you initiate a switch, the setEnabled() function (lines 59-65) updates this state, triggers updateStatus() to refresh the UI badge (lines 7-16), and invokes syncContext() (lines 86-99) to manage rule injection. The loadRules() function reads the actual guidelines from skills/i-have-adhd/SKILL.md at lines 45-55, while getSavedState() (lines 62-74) persists your preference using a custom session entry named i-have-adhd-state.

Methods to Switch Between Normal and ADHD Mode

You can toggle the mode using three distinct approaches depending on whether you want temporary, explicit, or persistent activation.

Using the /i-have-adhd Command

Run /i-have-adhd without arguments to toggle the current state, or use /i-have-adhd on and /i-have-adhd off to explicitly set the mode. This command invokes setEnabled(), which updates the stored Boolean state and synchronizes the conversation context through syncContext().

Using the Skill Alias Shortcut

Type /skill:i-have-adhd exactly to immediately enable ADHD mode. The input handler at lines 2-4 of extensions/i-have-adhd.ts treats this as a direct shortcut to activation, bypassing the standard toggle logic.

Persistent Activation via Flags and Configuration

Launch Pi with the --adhd flag or create an empty file named .i-have-adhd-always in your agent directory. During session restoration, the restoreState logic at lines 50-53 checks pi.getFlag("adhd") and existsSync(alwaysOnFlag) to automatically enable the mode for all new sessions until the file is removed.

Disabling ADHD Mode and Stop Phrases

To return to normal mode, run /i-have-adhd off or simply /i-have-adhd to toggle off. Alternatively, type the stop phrases "stop adhd mode" or "normal mode"—the input handler processes these at lines 7-14 to disable the mode and prevent further rule processing.

Practical Code Examples

Enable ADHD mode temporarily:

/i-have-adhd on

Toggle the current state:

/i-have-adhd

Use the skill shortcut:

/skill:i-have-adhd

Launch with ADHD mode enabled by default:

pi --adhd

Create the always-on flag file:

touch $(pi get-agent-dir)/.i-have-adhd-always

Summary

  • The extension maintains a Boolean enabled state at lines 29-31 of extensions/i-have-adhd.ts to track the current mode
  • Command method: Use /i-have-adhd to toggle, or /i-have-adhd on/off for explicit control
  • Shortcut method: Type /skill:i-have-adhd to quickly enable ADHD mode via the input handler
  • Persistent method: Use the --adhd flag or create .i-have-adhd-always for automatic session activation
  • Context management: Switching triggers syncContext() (lines 86-99) to inject custom messages of type i-have-adhd-rules or i-have-adhd-disabled into the conversation

Frequently Asked Questions

Where does the extension store my ADHD mode preference?

The extension persists your preference across sessions using a custom session entry named i-have-adhd-state. According to the source code in extensions/i-have-adhd.ts, the getSavedState() function scans the session branch for this entry at lines 62-74 to restore your previous setting when starting a new conversation.

What happens to the conversation context when I switch modes?

When you switch modes, syncContext() checks whether rules currently exist in the context via rulesAreInContext() (lines 86-99). If enabling ADHD mode, it sends a custom message of type i-have-adhd-rules containing the loaded guidelines from SKILL.md. If disabling, it sends i-have-adhd-disabled to remove the constraints from the model's working context.

Can I make ADHD mode the default for all my sessions?

Yes. Create an empty file named .i-have-adhd-always in your agent directory, or consistently launch Pi with the --adhd flag. During session restoration at lines 50-53 of extensions/i-have-adhd.ts, the extension checks for this file using existsSync(alwaysOnFlag) or verifies the flag value via pi.getFlag("adhd") to automatically enable the mode.

How do I know if ADHD mode is currently active?

The extension displays a status badge showing ● ADHD ON when the mode is enabled. The updateStatus() function at lines 7-16 of extensions/i-have-adhd.ts manages this visual indicator, updating immediately whenever you switch between normal mode and ADHD mode.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →