# How Long Do the i-have-adhd Rules Persist in a Session?

> Discover how long i-have-adhd rules remain active in your chat session. Learn that they persist until you disable them, ensuring consistent behavior.

- Repository: [Ayoub Ghriss/i-have-adhd](https://github.com/ayghri/i-have-adhd)
- Tags: deep-dive
- Published: 2026-09-11

---

**The i-have-adhd rules persist for the entire chat session once activated, remaining active across all turns and topic changes until explicitly disabled by the user.**

The `ayghri/i-have-adhd` open-source repository provides an AI assistant skill that reformats responses for readers with ADHD. According to the source code, activating this mode triggers a session-wide persistence mechanism that does not lapse automatically.

## Session-Long Persistence Architecture

The skill implements a **session-scoped persistence model** that loads rules once and maintains them indefinitely. In [`skills/i-have-adhd/SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/SKILL.md) (lines 15-19), the documentation explicitly states: *"These rules apply to every response for the rest of the session, not only this one. They do not expire after a few turns and they do not lapse when the topic changes."*

This behavior is enforced through a **session-wide flag file** mechanism. Upon activation, the system creates or references a `.i-have-adhd-always` flag file that the `SessionStart` hook reads once per session. As documented in [`AGENTS.md`](https://github.com/ayghri/i-have-adhd/blob/main/AGENTS.md) and [`INSTALL.md`](https://github.com/ayghri/i-have-adhd/blob/main/INSTALL.md), this hook injects the ADHD formatting rules into the system prompt at initialization, ensuring they remain bound to the entire conversation lifecycle.

## Activation and Deactivation Mechanisms

You activate the persistent mode using the explicit command:

```markdown
User: /i-have-adhd

```

Once triggered, the `SessionStart` hook loads the rules from [`skills/i-have-adhd/SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/SKILL.md) into the active context. The [`.opencode/command/i-have-adhd.md`](https://github.com/ayghri/i-have-adhd/blob/main/.opencode/command/i-have-adhd.md) file confirms this action applies the formatting for the *"rest of this session"* rather than for a single response.

To terminate persistence before the session ends, you must issue a clear deactivation command:

- **"stop adhd mode"** – Explicitly disables the rules for the current session
- **"normal mode"** – Alternative command recognized by the skill to revert to standard formatting

The skill processes these commands to remove the session flag, immediately stopping the ADHD-specific formatting rules.

## Technical Implementation Evidence

The persistence guarantee is codified across four key files:

- **[`skills/i-have-adhd/SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/SKILL.md)** – Contains the core persistence contract (lines 15-19) stating rules apply to every subsequent response without expiration
- **[`.opencode/command/i-have-adhd.md`](https://github.com/ayghri/i-have-adhd/blob/main/.opencode/command/i-have-adhd.md)** – Command metadata confirming the scope lasts for the *"rest of this session"*
- **[`INSTALL.md`](https://github.com/ayghri/i-have-adhd/blob/main/INSTALL.md)** – Documents the `SessionStart` hook that reads the `.i-have-adhd-always` flag file at session initialization
- **[`AGENTS.md`](https://github.com/ayghri/i-have-adhd/blob/main/AGENTS.md)** – Describes the cross-runtime implementation ensuring consistent behavior across Claude Code, Codex, Pi, OMP, and OpenCode

## Practical Usage Example

The following interaction demonstrates the persistence behavior across multiple turns:

```markdown

# Activation

User: /i-have-adhd
Assistant: ✅ ADHD-friendly mode activated for this session.

# Turn 5 - Rules still active

User: Explain recursion in Python.
Assistant: 1. **Base Case**: When the function stops calling itself...
           2. **Recursive Step**: The function calls itself with a smaller input...
           (Bulleted, structured format persists)

# Turn 12 - Topic change does not disable rules

User: Switching topics: how do I bake sourdough?
Assistant: 1. **Feed your starter**...
           2. **Mix dough**...
           (ADHD formatting continues)

# Explicit deactivation

User: stop adhd mode
Assistant: ✅ ADHD-friendly mode disabled – returning to normal style.

```

## Summary

- **Rules bind to the session lifecycle** via the `SessionStart` hook and `.i-have-adhd-always` flag file, loading once at initiation
- **No automatic expiration** occurs after specific turn counts or topic shifts, as guaranteed in [`SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/SKILL.md) lines 15-19
- **Explicit commands required** to disable persistence: "stop adhd mode" or "normal mode"
- **Cross-runtime consistency** ensures identical behavior across Claude Code, Codex, OpenCode, and other supported platforms

## Frequently Asked Questions

### Do the i-have-adhd rules expire after a certain number of messages?

No. According to [`skills/i-have-adhd/SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/SKILL.md), the rules explicitly *"do not expire after a few turns."* The persistence mechanism is designed to last the entire session regardless of how many messages are exchanged.

### Will changing the conversation topic disable the ADHD formatting?

No. The source code specifically states that the rules *"do not lapse when the topic changes."* Once activated, the formatting remains consistent across subject shifts until you explicitly deactivate it.

### How do I permanently disable the mode for the current session?

Issue the command **"stop adhd mode"** or **"normal mode"**. The skill recognizes these phrases as explicit instructions to disable the session flag and revert to standard response formatting immediately.

### Is the persistence mechanism the same across different AI runtimes?

Yes. As documented in [`AGENTS.md`](https://github.com/ayghri/i-have-adhd/blob/main/AGENTS.md), the `.i-have-adhd-always` flag file and `SessionStart` hook architecture function identically across Claude Code, Codex, Pi, OMP, OpenCode, and other supported runtimes, ensuring consistent session-long behavior regardless of which platform you use.