Agent Instructions

Add lightweight instructions to CLAUDE.md or AGENTS.md so Codex and Claude Code know when to use agentctl.

Global instructions

Use global instructions when you want the workflow in every project.

Codex commonly reads:

~/.codex/AGENTS.md

Claude Code commonly reads:

~/.claude/CLAUDE.md

Some setups symlink these files together. That works well with agentctl because the commands are shared across Codex and Claude Code.

Use this as a starting point:

## agentctl

- When starting a new task, run `agentctl summary set "short task name"`.
- When finishing a task, run `agentctl tts speak "Yo, I just finished the requested work."`.
- When work belongs in another project, run `agentctl reroot /absolute/project/path "full user instructions"`.
- Prefer launching Codex with `agentctl codex run` and Claude Code with `agentctl claude run` so rerooting is available.

If you run agentctl setup, you can make the instructions shorter:

## agentctl

- When starting a new task, run `setsummary "short task name"`.
- When finishing a task, run `tts "Yo, I just finished the requested work."`.
- When work belongs in another project, run `reroot /absolute/project/path "full user instructions"`.

Project instructions

Use project-level AGENTS.md or CLAUDE.md files for behavior that only applies inside one repo.

For example:

## Project navigation

- If the user asks for work outside this repo, use `agentctl recent-projects <name>` to find the project.
- After finding the directory, use `agentctl reroot <path> "<user instructions>"`.

Project instructions should keep the full agentctl commands unless the project assumes every contributor has run agentctl setup.

Claude Code notes

Claude Code can use agentctl reroot when it was launched through:

agentctl claude run

agentctl summary set is mainly useful for Codex thread naming. It is fine to omit summary instructions for Claude Code-only workflows.