How to Enable Always-On Mode for i-have-adhd in Codex
To enable always-on mode for i-have-adhd in Codex, add the skill's 10-rule output-style block to your user-wide ~/.codex/AGENTS.md file so the ADHD-friendly rules load automatically in every session.
Codex does not automatically apply the i-have-adhd response rules by default. According to the ayghri/i-have-adhd source code, the plugin only activates when explicitly requested via $i-have-adhd unless you configure persistent always-on mode through the AGENTS.md mechanism.
Where Codex Loads Persistent Instructions
Codex searches for a user-wide configuration file at ~/.codex/AGENTS.md at startup and merges its contents into the system prompt. This behavior mirrors the always-on hooks used by other runtimes (Claude, Pi, OpenCode) as implemented in [hooks/always-on.sh](https://github.com/ayghri/i-have-adhd/blob/main/hooks/always-on.sh), but adapted for Codex's plugin architecture per [INSTALL.md](https://github.com/ayghri/i-have-adhd/blob/main/INSTALL.md#L50-L55).
The [skills/i-have-adhd/SKILL.md](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/SKILL.md) file contains the canonical 10-rule output style that you must copy into AGENTS.md to achieve always-on functionality.
Step-by-Step Setup for Always-On Mode
1. Create or Edit ~/.codex/AGENTS.md
Run this command to create the directory and file with the complete rule set:
mkdir -p ~/.codex
cat > ~/.codex/AGENTS.md <<'EOF'
## Output style
The reader has ADHD. Shape every response so it can be acted on:
1. Lead with the answer or next action: command, path, or snippet first.
2. Number multi‑step work; one bounded action per step.
3. End with one next action doable in under two minutes.
4. Finish the current issue before raising a new one.
5. Restate progress each turn ("step 3 of 5 done").
6. Give time estimates in concrete units, never "a bit".
7. After a change, show what now works.
8. Errors: state location, cause, and fix. No drama.
9. Cap lists at 5 items.
10. No preamble, no recaps, no closers.
**Exceptions:** explain fully when asked to explain. Confirm before destructive actions. After three failed fixes, stop and name the doubtful assumption. If the request is ambiguous, ask one short question.
EOF
2. Verify the Configuration
cat ~/.codex/AGENTS.md
You should see all 10 rules and the exceptions block printed to your terminal.
3. Launch Codex
codex chat
The ADHD-friendly rules are now automatically active—no $i-have-adhd prefix required.
How to Disable Always-On Mode
To revert to on-demand activation (requiring $i-have-adhd per session), remove or rename the file:
rm ~/.codex/AGENTS.md
# Or temporarily disable: mv ~/.codex/AGENTS.md ~/.codex/AGENTS.md.bak
What the 10 Rules Actually Do
Each rule in [SKILL.md](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/SKILL.md) targets specific ADHD workflow needs:
| Rule | Purpose |
|---|---|
| Lead with the answer | Reduces cognitive load by front-loading actionable information |
| Number multi-step work | Creates clear progress markers and prevents overwhelm |
| 2-minute next actions | Matches the ADHD-friendly "micro-task" pattern |
| Finish before raising new issues | Prevents task-switching and open loops |
| Restate progress each turn | Provides external working memory |
| Concrete time estimates | Eliminates vague planning triggers |
| Show what now works | Delivers immediate positive feedback |
| Error: location, cause, fix | Structured troubleshooting without emotional overhead |
| Cap lists at 5 items | Respects working memory limits (Miller's Law) |
| No preamble/recaps/closers | Eliminates friction and social fluff |
How This Differs From Other Runtimes
The i-have-adhd repository uses different always-on mechanisms per platform:
- Claude/Pi/OpenCode: Shell-based hooks in [
hooks/always-on.sh](https://github.com/ayghri/i-have-adhd/blob/main/hooks/always-on.sh) that check for flag files - Codex:
AGENTS.mdintegration through the plugin system defined in [.codex-plugin/plugin.json](https://github.com/ayghri/i-have-adhd/blob/main/.codex-plugin/plugin.json)
The core logic is tested in [tests/test_always_on_hooks.py](https://github.com/ayghri/i-have-adhd/blob/main/tests/test_always_on_hooks.py), which verifies consistent rule application across all supported runtimes.
Summary
- Always-on mode for i-have-adhd in Codex requires manually creating
~/.codex/AGENTS.mdwith the 10-rule output-style block - Codex merges
AGENTS.mdinto the system prompt at startup—there is no automatic skill loading - The rules are sourced from [
skills/i-have-adhd/SKILL.md](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/SKILL.md) and must be copied verbatim - Remove
~/.codex/AGENTS.mdto return to on-demand$i-have-adhdactivation
Frequently Asked Questions
Does installing the Codex plugin automatically enable always-on mode?
No. Installing the plugin via [.codex-plugin/plugin.json](https://github.com/ayghri/i-have-adhd/blob/main/.codex-plugin/plugin.json) makes the skill available, but you must still type $i-have-adhd per session or configure AGENTS.md for persistent activation.
Can I customize the 10 rules in my AGENTS.md file?
Yes, but modifications deviate from the tested behavior in [tests/test_always_on_hooks.py](https://github.com/ayghri/i-have-adhd/blob/main/tests/test_always_on_hooks.py). The canonical rules in [SKILL.md](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/SKILL.md) are optimized for ADHD cognitive patterns.
Why does Codex use AGENTS.md instead of hooks like Claude?
Codex's plugin architecture reads user-wide agent instructions from ~/.codex/AGENTS.md rather than shell environment hooks. This is documented in [INSTALL.md](https://github.com/ayghri/i-have-adhd/blob/main/INSTALL.md#L50-L55) as the platform-specific approach for achieving the same always-on outcome.
Will AGENTS.md rules conflict with project-specific instructions?
No. Codex merges AGENTS.md as base context; project-level .codex files can layer additional instructions. The ADHD rules apply globally unless explicitly overridden by later prompt content.
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:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →