Skip to content

🧭 Protocol: Plan Mode config + events#51

Open
github-actions[bot] wants to merge 25 commits intomainfrom
feat/protocol-plan-mode
Open

🧭 Protocol: Plan Mode config + events#51
github-actions[bot] wants to merge 25 commits intomainfrom
feat/protocol-plan-mode

Conversation

@github-actions
Copy link
Copy Markdown

@github-actions github-actions bot commented Aug 30, 2025

Hi @tmuskal

✨ Protocol – Plan Mode config + events

Description

Implements Issue #23 by adding Plan Mode configuration and protocol surface across codex-rs:

  • Config: add plan_mode (boolean, default false) to codex-core runtime Config, TOML (ConfigToml), and ConfigProfile (core + protocol).
  • Per‑turn overrides: extend Op::UserTurn and Op::OverrideTurnContext with plan_mode to support session/turn toggles similar to approval_policy.
  • Environment context: include optional <plan_mode> tag in the XML block sent to the model. It appears only when true or explicitly overridden.
  • Protocol: add PlanProposed event and PlanDecision request payloads, plus basic step structures (Plan, PlanStep, PlanStepKind).
  • Session metadata: expose plan_mode on SessionConfigured event.
  • Updated call sites (TUI/exec/MCP server) and tests.

Plan

  • Update protocol/core types and wire through config → session → env context
  • Add new events and enums, derive serde + Display
  • Update dependent code paths and tests
  • Build, lint, and run full test suite

Progress

  • Code changes implemented and formatted.
  • Lint fixed (scoped) and all tests pass locally (cargo test --all-features).

Results

  • New types: Plan, PlanStep, PlanStepKind, PlanProposedEvent, PlanDecision.
  • SessionConfiguredEvent now carries plan_mode.
  • EnvironmentContext serializes <plan_mode> when enabled/overridden.
  • Unit tests updated for serde and defaulting behaviors.

Follow Up

  • @validator-agent - please review this PR for correctness and style.

Time and Cost

Took ~900 seconds to complete the task.

By: developer-agent(https://app.a5c.ai/a5c/agents/development/developer-agent)

tmuskal and others added 25 commits August 29, 2025 09:45
…es API)\n\n- base_url: https://models.inference.ai.azure.com\n- env_key: GITHUB_TOKEN (Bearer)\n- wire_api: responses\n\nDocs: add provider usage to docs/config.md\n\nBy: [developer-agent](https://app.a5c.ai/a5c/agents/development/developer-agent)
…-provider

Revert "✨ Add GitHub Models provider (Responses API)"
Validated and approved by Validator Agent. See #31 and #32 for follow-ups.
…ce on fast paths (ARM)\n\n- Move map insert before send in request_command_approval & request_patch_approval\n- Resolves flaky mcp-server test on aarch64 gnu (pending approval not found)\n\nBy: build-fixer-agent(https://app.a5c.ai/a5c/agents/development/build-fixer-agent)
Updated workflow URL to point to the latest GitHub Action run.
🛠️ Fix ARM GNU elicit-approval race in core
…add boolean plan_mode with default false; CLI overrides\n- EnvironmentContext: include optional <plan_mode> in XML\n- Protocol: add PlanProposed/PlanDecision types; expose plan_mode on SessionConfigured; add per-turn overrides\n- Update MCP server + TUI/exec to compile with new types\n- Update tests for serde + defaulting\n\nBy: developer-agent(https://app.a5c.ai/a5c/agents/development/developer-agent)
@github-actions github-actions bot added enhancement New feature or request producer functionality Functional task generated by producer labels Aug 30, 2025
@github-actions
Copy link
Copy Markdown
Author

Hi @tmuskal

✨ Protocol – Plan Mode config + events

Description

Implements Issue #23 by adding Plan Mode configuration and protocol surface across codex-rs:

  • Config: add plan_mode (boolean, default false) to codex-core runtime Config, TOML (ConfigToml), and ConfigProfile (core + protocol).
  • Per‑turn overrides: extend Op::UserTurn and Op::OverrideTurnContext with plan_mode to support session/turn toggles similar to approval_policy.
  • Environment context: include optional <plan_mode> tag in the XML block sent to the model. It appears only when true or explicitly overridden.
  • Protocol: add PlanProposed event and PlanDecision request payloads, plus basic step structures (Plan, PlanStep, PlanStepKind).
  • Session metadata: expose plan_mode on SessionConfigured event.
  • Updated call sites (TUI/exec/MCP server) and tests.

Plan

  • Update protocol/core types and wire through config → session → env context
  • Add new events and enums, derive serde + Display
  • Update dependent code paths and tests
  • Build, lint, and run full test suite

Progress

  • Code changes implemented and formatted.
  • Lint fixed (scoped) and all tests pass locally (cargo test --all-features).

Results

  • New types: Plan, PlanStep, PlanStepKind, PlanProposedEvent, PlanDecision.
  • SessionConfiguredEvent now carries plan_mode.
  • EnvironmentContext serializes <plan_mode> when enabled/overridden.
  • Unit tests updated for serde and defaulting behaviors.

Follow Up

  • @validator-agent - please review this PR for correctness and style.

Time and Cost

Took ~900 seconds to complete the task.

By: developer-agent(https://app.a5c.ai/a5c/agents/development/developer-agent)

@github-actions github-actions bot marked this pull request as ready for review August 30, 2025 03:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request producer functionality Functional task generated by producer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant