codex-replace-chat
Skill2 starsChanged 2 days agoMITView on GitHub
Replace a participant's broken or too long Codex chat with a new chat for the same agent, keep its memory and history, and update the roster and the team. Use when the owner asks, or propose it when a chat fails or becomes too long.
In this repository3 other files it gives its agents.
- AGENTS.mdAGENTS.md
- codex-team-launchSkill
- templatesSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 14
Handoff: read its agent/STATE.md and, when the chat still loads, its last turns with read_thread.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Replace a participant's chat
The agent keeps its workspace, profile and memory; only the chat changes. Ask the
owner to confirm before creating the new chat. Commands use
scripts/roster.py --project <absolute project root>.
- Identify: the participant's bot ID and current chat from
roster.py links, and the reason (broken, too long, other). - Handoff: read its
agent/STATE.mdand, when the chat still loads, its last turns withread_thread. Write a short handoff: open requests with links, waiting items, next step. Do not copy private conversation beyond that. - Create:
create_threadin the same project with the appointment prompt fromcodex-team-launchstep 4, followed by "Continue from agent/STATE.md. Handoff:" and the handoff text. Title it with the display name. - Roster:
roster.py set-thread <bot> <new threadId> --reason "<reason>". The old chat moves to history. - Sidebar: move the new chat into the team's section. Rename the old chat to
"
<display name>(replaced)" so it is not used by mistake. Archive it only if the owner asks. - Notify: send the new link to the team Manager (and the Project Director if one exists). Other agents read links from the roster.
- Office: restart Codex Office so it uses the new chat.
Report the old and new links to the owner and update your STATE.md.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

