/loop-retro
Turn a finished session into improvement opportunities for the skills and agents it used. The transcripts are large, so you (the resident agent) hand the reading to a retro agent, which writes its findings to a file and hands you back the path — you spend almost no context yourself.
Spawn the retro agent
Give the agent the working directory and, when the Codex runtime exposes it, the resident's root thread id:
Agent({
subagent_type: "loop-retro-agent",
description: "retro on this session",
prompt: `
WORKING DIRECTORY: <cwd> — the repo this session ran in.
CODEX ROOT THREAD ID: <root id when available; otherwise unavailable>
`
})
In a root Codex session, $CODEX_THREAD_ID is the root id. If no root id is available, the child
derives it from its own Codex thread metadata; do not guess from working directory or timestamps.
Point the user at the findings
The retro agent writes its findings to a file and returns the path. Print that path and its one-line headline — don't paste the findings into chat. Apply nothing automatically; the human opens the file and decides what to act on. If the agent found no readable capability body in the session, relay that plainly.