dmux: Instructions file for Codex

AGENTS.md

dmux AGENTS.md is an instructions file for Codex, OpenCode from standardagents/dmux. It costs 1,916 tokens per session, scanned A, original, MIT.

A maintainer guide for dmux, a TypeScript terminal interface for managing parallel AI-agent work in tmux panes and Git worktrees. It maps the main documentation and source files to the system's major functions.

In plain words
What is it for?
Use it when maintaining dmux's terminal interface, tmux sessions, Git worktrees, agent launching, pane behavior, merging, cleanup, or multi-project support.
Why use it?
It helps contributors understand where session management, panes, worktrees, agent startup, and cleanup are implemented. This makes repository changes easier to place correctly.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions CLAUDE.md; mentions AGENTS.md; mentions Codex.

This is standardagents/dmux's own configuration. It tells Codex and OpenCode how to work on dmux itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything dmux configures →

About the project

dmux is a developer-agent multiplexer that uses tmux and Git worktrees to run multiple coding agents in isolated branches and panes. It helps developers assign tasks to several agents in parallel and then merge the results or create pull requests. The catalogue contains instructions for working with dmux.

standardagents/dmux · 1,816 stars · on GitHub · dmux.ai

Reuse

Borrowing it

Nothing to install: this file belongs to standardagents/dmux. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/standardagents/dmux/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/standardagents/dmux

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for dmux AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/standardagents/dmux/agents-md/github.svg)](https://agentmods.dev/instructions/standardagents/dmux/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/standardagents/dmux/agents-md"><img src="https://agentmods.dev/badge/instructions/standardagents/dmux/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for dmux AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/standardagents/dmux/agents-md"><img src="https://agentmods.dev/badge/instructions/standardagents/dmux/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,916 This file is loaded in full into every session.
When invoked 1,916 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.01916 $0.01916
Opus 5.5 $0.00766 $0.00766
Sonnet 5.5 $0.00383 $0.00383
Haiku 4.5 $0.00192 $0.00192

Measured 2mo ago against content hash 7bcfbc772208, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

dmux AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 185 lines

How it starts

The opening of the file, as written. The whole thing — 185 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md - dmux Maintainer Guide

This file is the maintainer-focused source of truth for working on dmux itself.

Docs map

  • README.md: end-user overview and install/usage.
  • CONTRIBUTING.md: local development loop and PR workflow.
  • AGENTS.md (this file): maintainer behavior, architecture landmarks, and current dev-mode workflow.

CLAUDE.md is a symlink to this file for tool compatibility.

Project overview

dmux is a TypeScript + Ink TUI for managing parallel AI-agent work in tmux panes backed by git worktrees.

Core behavior:

  • One project-scoped dmux session (stable name based on project root hash)
  • One worktree per work pane
  • Durable regular terminals restored in their last observed working directories
  • Agent launch + prompt bootstrap in each pane
  • Merge/close actions with worktree cleanup hooks
  • Optional multi-project grouping in one session

Important architecture landmarks

  • src/index.ts: startup, tmux session attach/create, control pane management, dev-mode startup behavior
  • src/DmuxApp.tsx: main TUI state, status/footer, input hookups, source switching
  • src/services/DmuxFocusService.ts: macOS helper lifecycle, fully-focused pane tracking, helper-backed native notifications
  • src/services/DmuxAttentionService.ts: attention-notification coordinator for idle/waiting panes
  • src/services/InferenceService.ts: provider-neutral text inference, dynamic model discovery, and primary/backup failover
  • src/services/CodexAppServerClient.ts: ChatGPT subscription auth/model/inference bridge through Codex app-server
  • src/services/TerminalPaneNamingService.ts: LLM-based naming for regular terminals — untitled panes are checked aggressively and named from streaming output; titled panes only rename from settled output on a relaxed cadence; human names are protected
  • src/utils/paneAgentTracking.ts: process-tree detection for agents launched manually in any pane, plus exact Claude/Codex session capture used by crash restoration
  • src/hooks/usePaneLoading.ts: persisted pane loading/rebinding and recreation for both worktree and terminal panes
  • src/hooks/useInputHandling.ts: keyboard and menu action handling
  • src/services/PopupManager.ts: popup launch + data plumbing
  • src/actions/types.ts: action registry and menu visibility rules
  • src/actions/implementations/closeAction.ts: close behavior + source fallback on source-pane removal
  • src/components/panes/*: pane list rendering (includes source indicator)
  • src/utils/sidebarMouse.ts + src/hooks/useSidebarMouse.ts: sidebar mouse support; mouse escape sequences are stripped from Ink's stdin via a proxy stream and re-emitted as events. Click highlights a row without changing tmux pane focus, double-click activates it (pane menu / action button), wheel steps the selection. kebabMenuPopup uses the same scheme so menu items are clickable

Read the full file on GitHub · 185 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 185 lines · 1,916 tokens per session scan A 7bcfbc772208

Subscribe to this mod's changes

dmux AGENTS.md is an instructions file published in the GitHub repository standardagents/dmux (1,816 stars, last pushed 2mo ago), licensed MIT. It adds 1,916 tokens to every session, about $0.0077 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

dmux AGENTS.md compared with instructions from other repositories

dmux AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
dmux AGENTS.mdstandardagents/dmuxInstructions file1.8k2mo agoMITA1,916Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode