# How to Configure the Always-On Flag for the i-have-adhd Plugin

> Learn how to configure the always-on flag for the i-have-adhd plugin. Enable persistent ADHD-friendly rules by creating a simple marker file for continuous session injection.

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

---

**Create an empty marker file named `.i-have-adhd-always` in your runtime's config directory (`~/.claude` for Claude/Codex or `~/.config/opencode` for OpenCode) to enable persistent injection of the ADHD-friendly ruleset on every session start.**

The `ayghri/i-have-adhd` repository provides a plugin that prepends its full ADHD-friendly ruleset to model responses through session-start hooks. Learning how to configure the always-on flag for the i-have-adhd plugin lets you automate this behavior so that every conversation begins with the ruleset already active. The setup requires no code changes—only the presence of a specific marker file in the correct config directory.

## What the Always-On Flag Does

When the marker file is present, the always-on hook reads [`skills/i-have-adhd/SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/SKILL.md), strips any leading YAML front-matter, and streams the cleaned ruleset to stdout. This output is appended to the system prompt for every turn, which produces the visible banner **"ADHD MODE ACTIVE (always-on)"** at the start of each session. The flag itself is simply an empty file; its existence is the only signal the startup hooks require.

## Enabling the Always-On Flag

To configure the always-on flag for the i-have-adhd plugin, create the marker file in the directory that matches your runtime.

### Claude and Codex Runtimes

For Claude and Codex, the Node hook in `hooks/always-on.mjs` checks for `.i-have-adhd-always` inside `<CLAUDE_CONFIG_DIR>`. If the `CLAUDE_CONFIG_DIR` environment variable is unset, the path defaults to `~/.claude`.

```bash

# Enable always-on for Claude/Codex (default config dir)

touch ~/.claude/.i-have-adhd-always

```

```powershell

# Enable always-on via PowerShell

New-Item -Path "$env:USERPROFILE\.claude\.i-have-adhd-always" -ItemType File

```

### OpenCode Runtime

The OpenCode runtime mirrors the same convention but looks for the flag at `~/.config/opencode/.i-have-adhd-always`.

```bash

# Enable always-on for OpenCode

touch ~/.config/opencode/.i-have-adhd-always

```

## Disabling the Always-On Flag

You can disable ruleset injection either permanently or for a single session.

### Permanent Disabling

Delete the marker file from the appropriate config directory. The hook will stop injecting the ruleset on all subsequent sessions.

```bash

# Disable always-on permanently for Claude/Codex

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

```

```powershell

# Disable always-on permanently via PowerShell

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

```

### Temporary Disabling for the Current Session

During an active conversation, type **"stop adhd mode"** or **"normal mode"** into the chat. This suppresses the injection for that session only while leaving the marker file intact for future sessions.

```bash

# Temporarily turn off for the current session (type this in chat)

stop adhd mode

```

## How the Hook Implementation Works

The always-on logic is implemented across three platform-specific entry points coordinated by [`hooks/hooks.json`](https://github.com/ayghri/i-have-adhd/blob/main/hooks/hooks.json), as detailed in the repository's [`INSTALL.md`](https://github.com/ayghri/i-have-adhd/blob/main/INSTALL.md).

- **`hooks/always-on.mjs`**: The primary Node.js `SessionStart` hook. It resolves the skill file, removes YAML front-matter, and prints the banner plus the ruleset when the flag is detected.
- **[`hooks/always-on.sh`](https://github.com/ayghri/i-have-adhd/blob/main/hooks/always-on.sh)**: A shell fallback for environments where Node is unavailable.
- **`hooks/always-on.ps1`**: A PowerShell fallback for Windows environments without Node.
- **[`hooks/hooks.json`](https://github.com/ayghri/i-have-adhd/blob/main/hooks/hooks.json)**: Declares the `SessionStart` command that automatically runs the Node hook for Claude and Codex.

The shell and PowerShell scripts perform the exact same flag check and ruleset injection, ensuring the feature works across diverse toolchains.

## Summary

- The always-on flag is an empty marker file that tells the plugin to inject [`skills/i-have-adhd/SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/SKILL.md) at every session start.
- Place the file at `~/.claude/.i-have-adhd-always` for Claude/Codex or `~/.config/opencode/.i-have-adhd-always` for OpenCode.
- Delete the marker file to permanently disable the behavior.
- Say **"stop adhd mode"** during a chat to pause injection for one session without removing the flag.
- The underlying hooks are `hooks/always-on.mjs`, [`hooks/always-on.sh`](https://github.com/ayghri/i-have-adhd/blob/main/hooks/always-on.sh), and `hooks/always-on.ps1`, registered via [`hooks/hooks.json`](https://github.com/ayghri/i-have-adhd/blob/main/hooks/hooks.json).

## Frequently Asked Questions

### Where does the i-have-adhd plugin look for the always-on flag?

According to the `ayghri/i-have-adhd` source code, the Node hook in `hooks/always-on.mjs` checks `<CLAUDE_CONFIG_DIR>/.i-have-adhd-always`, defaulting to `~/.claude` when the environment variable is not set. For OpenCode, the expected path is `~/.config/opencode/.i-have-adhd-always`.

### What content does the always-on flag file need to contain?

The marker file is completely empty. Its mere presence triggers the hook to read [`skills/i-have-adhd/SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/SKILL.md), strip any YAML front-matter, and inject the ruleset into the system prompt.

### Can I use the always-on feature without Node.js installed?

Yes. While Claude and Codex runtimes invoke the Node hook automatically through [`hooks/hooks.json`](https://github.com/ayghri/i-have-adhd/blob/main/hooks/hooks.json), the repository includes [`hooks/always-on.sh`](https://github.com/ayghri/i-have-adhd/blob/main/hooks/always-on.sh) and `hooks/always-on.ps1` as shell and PowerShell fallbacks for environments that do not have Node available.

### How do I turn off ADHD mode for just one conversation?

Type **"stop adhd mode"** or **"normal mode"** in the chat input. This disables the ruleset injection for the current session only and does not delete the `.i-have-adhd-always` marker file, so the next session will continue to have always-on behavior.