# How to Enable i-have-adhd Always-On Mode for Claude Code, OpenCode, and Other Runtimes

> Easily enable i-have-adhd always-on mode for Claude Code, OpenCode, and more by creating a flag file. Get ADHD-friendly AI responses automatically injected into every interaction.

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

---

**Create a flag file named `.i-have-adhd-always` in your runtime's configuration directory to automatically inject ADHD-friendly rules into every AI response.**

The `ayghri/i-have-adhd` repository provides a skill system that adapts AI interactions for ADHD users by restructuring responses for clarity and focus. Enabling **always-on mode** ensures the ruleset prepends every conversation without manual activation commands. This guide covers the exact file paths, shell commands, and hook mechanisms needed for Claude Code, Codex, OpenCode, Pi, and OMP runtimes.

## How the Always-On Flag Works

All supported runtimes share a **session-start hook** that checks for the presence of a flag file at startup. When the runtime initializes, the hook looks for `.i-have-adhd-always` in the configuration directory.

If the flag file exists, the hook executes the following sequence:

1. Locates [`skills/i-have-adhd/SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/SKILL.md) in the repository
2. Strips any YAML front-matter from the skill definition
3. Writes the banner `ADHD MODE ACTIVE (always‑on). The ruleset below applies to every response.` to **stdout**
4. Appends the full ruleset to the system prompt for that session

If the flag file is absent, the hook exits silently and the skill remains disabled.

The repository provides two hook implementations with identical logic. The **Node.js version** in `hooks/always-on.mjs` serves as the primary path for Claude Code, Codex, and modern environments. The **POSIX shell fallback** in [`hooks/always-on.sh`](https://github.com/ayghri/i-have-adhd/blob/main/hooks/always-on.sh) handles systems without Node.js available.

## Runtime-Specific Activation Steps

Each runtime expects the flag file in a specific configuration directory. The hook invocation method varies by platform.

### Claude Code and Codex

Claude Code and Codex use the `~/.claude` directory by default, or `$CLAUDE_CONFIG_DIR` if the environment variable is set. The Node hook referenced in [`hooks/hooks.json`](https://github.com/ayghri/i-have-adhd/blob/main/hooks/hooks.json) executes automatically on every session start.

Enable always-on mode with these commands:

```bash

# Determine the config directory

CLAUDE_DIR="${CLAUDE_CONFIG_DIR:-$HOME/.claude}"

# Create the empty flag file

touch "$CLAUDE_DIR/.i-have-adhd-always"

```

Once created, the hook fires on every session initialization, injecting the ruleset before the model generates responses.

### OpenCode

OpenCode stores its configuration in `~/.config/opencode` by default. The platform uses a dedicated plugin at `.opencode/plugins/i-have-adhd.mjs` that mirrors the Node hook logic but checks the OpenCode-specific flag location.

Activate the skill with:

```bash
OPENCODE_DIR="${OPENCODE_CONFIG_DIR:-$HOME/.config/opencode}"
touch "$OPENCODE_DIR/.i-have-adhd-always"

```

The plugin automatically reads this flag and prepends the ADHD ruleset to the system prompt for every interaction.

### Pi and OMP

Pi and OMP reuse Claude's configuration structure. Both runtimes load the hook through their respective extension manifests—Pi via [`package.json`](https://github.com/ayghri/i-have-adhd/blob/main/package.json) and OMP through [`extensions/i-have-adhd.ts`](https://github.com/ayghri/i-have-adhd/blob/main/extensions/i-have-adhd.ts).

Since these platforms share the `~/.claude` directory, use the same command as Claude Code:

```bash
touch "$HOME/.claude/.i-have-adhd-always"

```

The TypeScript entry point in [`extensions/i-have-adhd.ts`](https://github.com/ayghri/i-have-adhd/blob/main/extensions/i-have-adhd.ts) imports the hook logic and respects the identical flag path.

### Disabling Always-On Mode

You can suspend the skill using two methods:

- **Temporary disablement**: Issue the command "stop adhd mode" or "normal mode" during a conversation. The hook respects these instructions and skips injection for that specific turn.
- **Permanent disablement**: Delete the flag file:

```bash
rm "$HOME/.claude/.i-have-adhd-always"

# Or for OpenCode:

rm "$HOME/.config/opencode/.i-have-adhd-always"

```

## Custom Implementation for Unsupported Runtimes

Certain runtimes—including Gemini, Qwen, and Kimi—do not ship with built-in hooks. These platforms expose the skill only as an on-demand command rather than an always-on feature.

To achieve persistent injection on unsupported runtimes, create a wrapper script that mimics the hook behavior:

```bash

# Create the wrapper script in your runtime's config directory

cat <<'EOF' > "$HOME/.config/<runtime>/i-have-adhd-always"
#!/usr/bin/env sh
FLAG="$HOME/.config/<runtime>/.i-have-adhd-always"
if [ -f "$FLAG" ]; then
  cat "$(dirname "$0")/../skills/i-have-adhd/SKILL.md"
fi
EOF

chmod +x "$HOME/.config/<runtime>/i-have-adhd-always"

```

Configure your runtime to prepend the output of this script to its system prompt. The principle remains consistent: **check for the flag file, dump the skill content, and expose it to the model every turn**.

## Key Source Files Reference

Understanding the codebase helps with debugging and customization:

- **`hooks/always-on.mjs`**: Node-based SessionStart hook that reads the flag and loads [`SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/SKILL.md)
- **[`hooks/always-on.sh`](https://github.com/ayghri/i-have-adhd/blob/main/hooks/always-on.sh)**: POSIX fallback implementation for environments lacking Node.js
- **[`hooks/hooks.json`](https://github.com/ayghri/i-have-adhd/blob/main/hooks/hooks.json)**: Declares the startup command that Claude Code and Codex execute
- **[`skills/i-have-adhd/SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/SKILL.md)**: The authoritative 10-rule skill definition file
- **`.opencode/plugins/i-have-adhd.mjs`**: OpenCode-specific plugin implementing the same flag-check logic
- **[`extensions/i-have-adhd.ts`](https://github.com/ayghri/i-have-adhd/blob/main/extensions/i-have-adhd.ts)**: TypeScript entry point for Pi and OMP extensions

## Summary

- Create `.i-have-adhd-always` in your runtime's config directory to enable persistent injection
- Claude Code, Codex, Pi, and OMP use `~/.claude/.i-have-adhd-always`
- OpenCode uses `~/.config/opencode/.i-have-adhd-always`
- The Node hook (`hooks/always-on.mjs`) handles modern runtimes while the shell script ([`hooks/always-on.sh`](https://github.com/ayghri/i-have-adhd/blob/main/hooks/always-on.sh)) provides legacy support
- Remove the flag file to disable always-on mode permanently, or use voice commands to pause it temporarily

## Frequently Asked Questions

### What happens if I create the flag file while a session is already running?

The hook executes at session start. If you create `.i-have-adhd-always` during an active session, the skill will not activate until you start a new conversation or restart the runtime. The change does not apply retroactively to existing contexts.

### Can I use different rule sets for different runtimes?

Yes. While the flag mechanism is standardized, each runtime loads [`SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/SKILL.md) from its own installation path. You can maintain separate clones of the repository with modified [`SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/SKILL.md) files, or use symbolic links to point different runtimes to different skill definitions while keeping the flag files in their respective config directories.

### Why doesn't the skill activate in Gemini, Qwen, or Kimi?

These runtimes lack the session-start hook infrastructure present in Claude Code and OpenCode. They expose `i-have-adhd` only as a manual command or snippet. To enable always-on behavior, you must implement the custom wrapper script described in the unsupported runtimes section and configure your system prompt manually.