Rerooting

reroot lets an agent move work into the correct project directory without asking the user to manually restart the session.

Start Codex through agentctl:

agentctl codex run --yolo

Or start Claude Code through agentctl:

agentctl claude run

From inside that wrapped session, run:

agentctl reroot /absolute/project/path "Implement the requested change here."

The wrapper exits the current child process and starts a new one in the target directory with the supplied prompt.

Requirements

Short alias

After agentctl setup, agents can use:

reroot /absolute/project/path "Implement the requested change here."

The alias is convenient for agent instructions, but documentation and scripts should prefer the full agentctl reroot form.