-
Couldn't load subscription status.
- Fork 6k
Description
What feature would you like to see?
Status: RFC (Request for Comments)
Proposer: @Aki-07
Target: Codex CLI v0.3.0+
Problem Statement
Current State:
Every Codex session is ephemeral. When developers find a successful workflow (e.g., "set up React + TypeScript + Tailwind"), they cannot easily:
- Reproduce it across projects
- Share it with team members
- Version control the workflow
- Apply it with different parameters
Pain Points:
- Developers repeatedly type similar prompts across projects
- Successful patterns are lost after the session ends
- No way to create "standard playbooks" for common tasks
- Onboarding new developers requires manual guidance
Overview
This feature would allow developers to:
- Record a successful Codex session (prompts, commands, file diffs, responses).
- Convert it into a reusable, parameterized template (YAML-based).
- Replay it anytime using
codex replay <template-name>. - Share templates via Git, enabling collaborative and version-controlled workflows.
- Discover community or official templates via a built-in template marketplace.
Why it matters
Currently, every Codex session is transient, developers can’t easily reproduce or share a working flow.
This feature would:
- Improve reproducibility (no more retyping successful prompts).
- Boost team collaboration (shared org templates via Git).
- Simplify onboarding (run codex replay org/setup-react-app).
- Encourage community-driven patterns (React setup, Auth, CI/CD, etc.).
- In short, it elevates Codex from a conversational tool to a reproducible automation assistant.
Metrics
User Impact:
- 50% reduction in time for repetitive tasks
- 3x increase in workflow reuse across projects
- Easier team onboarding (shared templates)
- Community template library growth
Technical Metrics:
- Template execution success rate > 90%
- Replay performance within 10% of original session
- Zero security incidents from template execution
Key Components (high-level)
- Recorder: Logs prompts, commands, file diffs, and outputs.
- Template Engine: Converts sessions into editable templates with parameters.
- Replay CLI: Deterministic execution with preconditions, approvals, rollback.
- Registry/Marketplace: Git-based registry for installing and sharing templates.
Implementation Plan
I’ve already drafted a detailed build plan and schema design for this feature including CLI structure, template YAML spec, security policy, and roadmap
Happy to contribute this implementation end-to-end once approved.
Additional information
Example CLI workflow:
codex record start
# Developer interacts with Codex
codex record stop --out session.jsonl
codex template init --from session.jsonl
codex replay react-app-setup --set project_name=my-appDuplicate Check & Relationship to Existing Issues
While #4932 touches the surface of reusable “task templates,” this RFC introduces a broader, higher-level system enabling developers to record, parameterize, replay, and share entire Codex sessions, not just single prompts or scripts.
Therefore, this is not a duplicate, but an evolution of that concept into a structured replay and workflow automation framework for Codex CLI + IDE.