# How to Make i-have-adhd Always-On Across Sessions

> Learn how to make i-have-adhd always on across sessions by creating a sentinel file in your Claude config directory. Activate ADHD mode automatically every time.

- Repository: [Ayoub Ghriss/i-have-adhd](https://github.com/ayghri/i-have-adhd)
- Tags: how-to-guide
- Published: 2026-08-06

---

**Create an empty sentinel file named `.i-have-adhd-always` in your Claude configuration directory (default `~/.claude`) to automatically activate ADHD mode at the start of every session.**

The `i-have-adhd` project (ayghri/i-have-adhd) provides ADHD-optimized output for Claude by injecting a specific ruleset at session startup. To make this behavior persistent across sessions, the repository implements a file-based sentinel mechanism that works consistently across Bash, Node.js, and PowerShell environments.

## How the Always-On Mechanism Works

The always-on feature relies on Claude's **SessionStart** hook infrastructure. According to the source code, the hook registration is declared in [`hooks/hooks.json`](https://github.com/ayghri/i-have-adhd/blob/main/hooks/hooks.json), where the SessionStart event points to the Node-based script `always-on.mjs` (exec form) at lines 1-4.

The hook scripts check for a sentinel file named `.i-have-adhd-always` inside the Claude configuration directory. The implementation varies by shell:

- **[`always-on.sh`](https://github.com/ayghri/i-have-adhd/blob/main/always-on.sh)**: Checks `"$CLAUDE_CONFIG_DIR/.i-have-adhd-always"` (falling back to `~/.claude/.i-have-adhd-always`) on line 13, exiting silently with status 0 if the file is missing.
- **`always-on.mjs`**: Uses `fs.existsSync` on line 20 to check for the sentinel file, then resolves the skill file at [`skills/i-have-adhd/SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/SKILL.md) (lines 22-25) and prints its body after stripping YAML front-matter (lines 27-34).
- **`always-on.ps1`**: Uses `Test-Path` on line 14 for the same check on Windows systems.

If the sentinel file exists, the hook prints a banner indicating that **ADHD MODE** is active, applying the ruleset to every response until the user issues "stop adhd mode" or deletes the sentinel file.

## Enabling Always-On Mode

To persist ADHD mode across sessions, create the zero-byte sentinel file in your Claude configuration directory.

### Linux and macOS (Bash)

Run the following commands in your terminal:

```bash
mkdir -p ~/.claude
touch ~/.claude/.i-have-adhd-always

```

### Windows (PowerShell)

Execute these commands in PowerShell:

```powershell
$claudeDir = "$env:USERPROFILE\.claude"
New-Item -ItemType Directory -Force -Path $claudeDir
New-Item -ItemType File -Force -Path "$claudeDir\.i-have-adhd-always"

```

### Using a Custom Configuration Directory

If you use a custom Claude configuration directory via the `CLAUDE_CONFIG_DIR` environment variable, create the sentinel file in that location instead. The hooks read this environment variable first (see lines 9-10 of [`always-on.sh`](https://github.com/ayghri/i-have-adhd/blob/main/always-on.sh)).

```bash
export CLAUDE_CONFIG_DIR=$HOME/.my-claude
mkdir -p "$CLAUDE_CONFIG_DIR"
touch "$CLAUDE_CONFIG_DIR/.i-have-adhd-always"

```

## Disabling Always-On Mode

To deactivate the persistent behavior, simply delete the sentinel file. On the next session start, the hook will exit silently without loading the ADHD ruleset.

**Linux/macOS:**

```bash
rm ~/.claude/.i-have-adhd-always

```

**Windows:**

```powershell
Remove-Item "$env:USERPROFILE\.claude\.i-have-adhd-always"

```

## Verifying the Hook is Active

Start a new Claude session or run the hook manually. You should see a banner similar to:

```

ADHD MODE ACTIVE (always-on). The ruleset below applies to every response. "stop adhd mode" turns it off for this session; delete /home/you/.claude/.i-have-adhd-always to turn always-on off for good.

# i-have-adhd

… (skill body) …

```

This confirms that `always-on.mjs` successfully loaded [`skills/i-have-adhd/SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/SKILL.md) and injected the ADHD ruleset into your session.

## Summary

- **Create `.i-have-adhd-always`** in your Claude config directory (default `~/.claude`) to enable persistent ADHD mode across all sessions.
- **The sentinel file** is checked by [`hooks/always-on.sh`](https://github.com/ayghri/i-have-adhd/blob/main/hooks/always-on.sh), `hooks/always-on.mjs`, and `hooks/always-on.ps1` at the start of each session.
- **Registration** occurs through [`hooks/hooks.json`](https://github.com/ayghri/i-have-adhd/blob/main/hooks/hooks.json), which binds the SessionStart event to `always-on.mjs`.
- **Disable** by deleting the sentinel file; the hook exits silently when the file is absent.
- **Custom paths** are supported via the `CLAUDE_CONFIG_DIR` environment variable.

## Frequently Asked Questions

### Where does i-have-adhd store its configuration?

The project looks for the `.i-have-adhd-always` sentinel file in the Claude configuration directory, defaulting to `~/.claude` on Unix systems and `%USERPROFILE%\.claude` on Windows. You can override this location by setting the `CLAUDE_CONFIG_DIR` environment variable, which the hooks check before falling back to the default path as shown in lines 9-10 of [`always-on.sh`](https://github.com/ayghri/i-have-adhd/blob/main/always-on.sh).

### Why does the hook use a sentinel file instead of environment variables?

The sentinel file approach provides a persistent, cross-platform state that survives system reboots and new shell sessions. As implemented in `always-on.mjs` (line 20) and [`always-on.sh`](https://github.com/ayghri/i-have-adhd/blob/main/always-on.sh) (line 13), the file existence check is non-blocking and exits with status 0 if the file is missing, ensuring no performance impact when the feature is disabled.

### Can I temporarily disable ADHD mode for a single session?

Yes. While the sentinel file makes the mode active by default for every session, you can issue the command "stop adhd mode" during a conversation to disable it for that specific session only. The next new session will re-activate the mode as long as the sentinel file remains in place.

### Which hook script actually runs when I start Claude?

According to [`hooks/hooks.json`](https://github.com/ayghri/i-have-adhd/blob/main/hooks/hooks.json), Claude executes `always-on.mjs` via the Node.js executable (exec form) on SessionStart. However, the repository includes [`always-on.sh`](https://github.com/ayghri/i-have-adhd/blob/main/always-on.sh) and `always-on.ps1` as fallback implementations for POSIX and Windows environments respectively, all implementing identical sentinel file logic.