How to Enable Always-On Mode for i-have-adhd in Pi

The fastest way to enable always-on mode for i-have-adhd in Pi is to run pi --adhd in your terminal, which creates the flag file at ~/.pi/agent/.i-have-adhd-always, or manually create that file yourself to persist the ADHD-friendly ruleset across all sessions.

The i-have-adhd repository by ayghri provides an ADHD-friendly assistant configuration for the Pi runtime. Enabling always-on mode ensures the skill's response rules are automatically injected into every session without manual activation.

Two Methods to Enable Always-On Mode

You can activate permanent loading of the i-have-adhd ruleset using either the Pi CLI convenience command or by manually creating the flag file.

Using the Pi CLI Flag

The simplest approach uses Pi's built-in flag. According to INSTALL.md in the repository root, running the following command creates the necessary flag file:

pi --adhd

This command automatically generates the hidden file .i-have-adhd-always inside the Pi agent configuration directory, enabling the skill for subsequent sessions.

Manually Creating the Flag File

Alternatively, you can create the flag file directly. The always-on behavior is governed by the presence of .i-have-adhd-always at ~/.pi/agent/.i-have-adhd-always.

To enable always-on mode manually:

touch ~/.pi/agent/.i-have-adhd-always

To verify the flag exists:

ls -l ~/.pi/agent/.i-have-adhd-always

How the Always-On Mechanism Works

When Pi starts, the extension system checks for the flag file before initializing the session. According to the source code in extensions/i-have-adhd.ts, the Pi extension registers the skill and verifies the always-on flag during the startup sequence.

The hooks/always-on.mjs file contains the shared hook implementation that reads ~/.pi/agent/.i-have-adhd-always across different runtimes. If the file exists, Pi automatically loads the i-have-adhd ruleset into the system prompt at session start, injecting the full ADHD-friendly response rules without requiring manual invocation.

Disabling Always-On Mode

To revert to default behavior, remove the flag file:

rm ~/.pi/agent/.i-have-adhd-always

Once deleted, Pi will no longer automatically inject the i-have-adhd ruleset into new sessions.

Key Source Files

The always-on functionality spans three critical files in the ayghri/i-have-adhd repository:

  • INSTALL.md – Documents the pi --adhd installation command and provides notes on the flag-file mechanism
  • extensions/i-have-adhd.ts – The Pi-specific extension that registers the skill and checks for the always-on flag during initialization
  • hooks/always-on.mjs – The shared hook implementation responsible for reading the flag file and triggering ruleset injection across Pi sessions

Summary

  • Run pi --adhd to quickly enable always-on mode via the CLI
  • Manually create ~/.pi/agent/.i-have-adhd-always to achieve the same result
  • The extension in extensions/i-have-adhd.ts and hook in hooks/always-on.mjs handle automatic ruleset loading
  • Remove ~/.pi/agent/.i-have-adhd-always to disable always-on mode and restore default Pi behavior

Frequently Asked Questions

What is the i-have-adhd skill for Pi?

The i-have-adhd skill is an ADHD-friendly configuration that modifies Pi's response patterns to better accommodate users with attention differences. When enabled, it injects specific rulesets into the system prompt that shape how Pi structures information and maintains context.

Does the always-on flag affect all Pi users on the system?

No, the always-on flag is user-specific. Because the flag file resides at ~/.pi/agent/.i-have-adhd-always within the user's home directory, it only affects sessions started by that specific user account.

Can I toggle always-on mode without using the command line?

While the primary methods involve CLI commands, any tool capable of creating or deleting files at ~/.pi/agent/.i-have-adhd-always can toggle the mode. However, the pi --adhd command remains the most straightforward method documented in INSTALL.md.

Where is the always-on logic implemented in the source code?

The logic is split between extensions/i-have-adhd.ts, which handles Pi-specific skill registration and flag detection, and hooks/always-on.mjs, which provides the runtime-agnostic file checking mechanism that works across different Pi environments.

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 →