forked from openai/codex
-
Notifications
You must be signed in to change notification settings - Fork 0
[Producer] Protocol – Add Plan Mode config + events #23
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or requestproducerProducer-created planning/analysis taskProducer-created planning/analysis taskproducer functionalityFunctional task generated by producerFunctional task generated by producer
Description
Context
Part of #17. Introduces the protocol/config surface needed for Plan Mode.
Requirements
- Add a top-level config key
plan_mode(boolean) with defaultfalse. - Add per-session override capability via environment context/turn context (like
approval_policy). - Extend protocol with new events and requests to support planning:
PlanProposedevent: includes a concise ordered list of steps (edits, commands, tests) and free‑form notes.PlanDecisionrequest/response: client sends Accept | Edit | Cancel; include edited plan if Edit.
- Wire
plan_modethroughcodex-coreconfiguration and protocol types.
Acceptance Criteria
codex-protocolexposesplan_modeonSessionConfigured(or equivalent) and accepts overrides per turn.- New protocol enums/structs exist for
PlanProposedandPlanDecisionwith serde + Display impls. codex-coreConfigandEnvironmentContextinclude optionalplan_modeand serialize in the XML context block.- Unit tests cover serde round‑trip and defaulting behavior.
Implementation Notes
- Files to touch:
codex-rs/protocol/src/config_types.rs(addplan_mode)codex-rs/core/src/config.rsandcodex-rs/core/src/environment_context.rscodex-rs/protocol/src/protocol.rs(new event/request types)
- Follow patterns used by
approval_policyfor config/plumbing.
Dependencies
- None.
- Blocks: Core planning gate, TUI overlay, CLI toggle, tests, docs.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestproducerProducer-created planning/analysis taskProducer-created planning/analysis taskproducer functionalityFunctional task generated by producerFunctional task generated by producer