mirror of
https://github.com/openai/codex.git
synced 2026-11-02 19:43:24 +00:00
Rename update_plan tool to todo_write
This commit is contained in:
@@ -589,7 +589,7 @@ server_notification_definitions! {
|
||||
TurnStarted => "turn/started" (v2::TurnStartedNotification),
|
||||
TurnCompleted => "turn/completed" (v2::TurnCompletedNotification),
|
||||
TurnDiffUpdated => "turn/diff/updated" (v2::TurnDiffUpdatedNotification),
|
||||
TurnPlanUpdated => "turn/plan/updated", aliases(["turn/todo/updated"]) (v2::TurnPlanUpdatedNotification),
|
||||
TurnPlanUpdated => "turn/plan/updated", aliases(["turn/todo/updated", "turn/todos/updated"]) (v2::TurnPlanUpdatedNotification),
|
||||
ItemStarted => "item/started" (v2::ItemStartedNotification),
|
||||
ItemCompleted => "item/completed" (v2::ItemCompletedNotification),
|
||||
/// This event is internal-only. Used by Codex Cloud.
|
||||
|
||||
@@ -2270,6 +2270,7 @@ pub struct TurnPlanUpdatedNotification {
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
/// Legacy plan-named todo step used by the todo list update notification.
|
||||
pub struct TurnPlanStep {
|
||||
pub step: String,
|
||||
pub status: TurnPlanStepStatus,
|
||||
@@ -2278,6 +2279,7 @@ pub struct TurnPlanStep {
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
/// Legacy plan-named todo status used by the todo list update notification.
|
||||
pub enum TurnPlanStepStatus {
|
||||
Pending,
|
||||
InProgress,
|
||||
|
||||
@@ -433,7 +433,7 @@ The app-server streams JSON-RPC notifications while a turn is running. Each turn
|
||||
- `turn/started` — `{ turn }` with the turn id, empty `items`, and `status: "inProgress"`.
|
||||
- `turn/completed` — `{ turn }` where `turn.status` is `completed`, `interrupted`, or `failed`; failures carry `{ error: { message, codexErrorInfo?, additionalDetails? } }`.
|
||||
- `turn/diff/updated` — `{ threadId, turnId, diff }` represents the up-to-date snapshot of the turn-level unified diff, emitted after every FileChange item. `diff` is the latest aggregated unified diff across every file change in the turn. UIs can render this to show the full "what changed" view without stitching individual `fileChange` items.
|
||||
- `turn/plan/updated` — `{ turnId, explanation?, todo, plan }` whenever the agent shares or changes its todo list; each entry is `{ step, status }` with `status` in `pending`, `inProgress`, or `completed`. `todo` is preferred and `plan` is a deprecated legacy alias; both are emitted for compatibility. Clients may also send/accept `turn/todo/updated` as a wire alias. (The plan-named event and field are legacy and are unrelated to Plan mode.)
|
||||
- `turn/todos/updated` — `{ turnId, explanation?, todo, plan }` whenever the agent shares or changes its todo list; each entry is `{ step, status }` with `status` in `pending`, `inProgress`, or `completed`. `todo` is preferred and `plan` is a deprecated legacy alias; both are emitted for compatibility. Clients may also send/accept the legacy aliases `turn/plan/updated` and `turn/todo/updated`. (The plan-named event and field are legacy and are unrelated to Plan mode.)
|
||||
|
||||
Today both notifications carry an empty `items` array even when item events were streamed; rely on `item/*` notifications for the canonical item list until this is fixed.
|
||||
|
||||
|
||||
@@ -64,8 +64,8 @@ use codex_app_server_protocol::TurnCompletedNotification;
|
||||
use codex_app_server_protocol::TurnDiffUpdatedNotification;
|
||||
use codex_app_server_protocol::TurnError;
|
||||
use codex_app_server_protocol::TurnInterruptResponse;
|
||||
use codex_app_server_protocol::TurnPlanStep;
|
||||
use codex_app_server_protocol::TurnPlanUpdatedNotification;
|
||||
use codex_app_server_protocol::TurnPlanStep as TurnTodoStep;
|
||||
use codex_app_server_protocol::TurnPlanUpdatedNotification as TurnTodoUpdatedNotification;
|
||||
use codex_app_server_protocol::TurnStatus;
|
||||
use codex_app_server_protocol::build_turns_from_event_msgs;
|
||||
use codex_core::CodexThread;
|
||||
@@ -1106,7 +1106,7 @@ pub(crate) async fn apply_bespoke_event_handling(
|
||||
)
|
||||
.await;
|
||||
}
|
||||
EventMsg::PlanUpdate(todo_update_event) => {
|
||||
EventMsg::TodoUpdate(todo_update_event) => {
|
||||
handle_turn_todo_update(
|
||||
conversation_id,
|
||||
&event_turn_id,
|
||||
@@ -1150,8 +1150,8 @@ async fn handle_turn_todo_update(
|
||||
if let ApiVersion::V2 = api_version {
|
||||
// NOTE: The protocol keeps plan-named fields/events for compatibility; this is the todo list update.
|
||||
let (explanation, todo_items) = todo_update_event.into_parts();
|
||||
let steps: Vec<TurnPlanStep> = todo_items.into_iter().map(TurnPlanStep::from).collect();
|
||||
let notification = TurnPlanUpdatedNotification {
|
||||
let steps: Vec<TurnTodoStep> = todo_items.into_iter().map(TurnTodoStep::from).collect();
|
||||
let notification = TurnTodoUpdatedNotification {
|
||||
thread_id: conversation_id.to_string(),
|
||||
turn_id: event_turn_id.to_string(),
|
||||
explanation,
|
||||
@@ -1805,7 +1805,7 @@ mod tests {
|
||||
use anyhow::Result;
|
||||
use anyhow::anyhow;
|
||||
use anyhow::bail;
|
||||
use codex_app_server_protocol::TurnPlanStepStatus;
|
||||
use codex_app_server_protocol::TurnPlanStepStatus as TurnTodoStepStatus;
|
||||
use codex_core::protocol::CreditsSnapshot;
|
||||
use codex_core::protocol::McpInvocation;
|
||||
use codex_core::protocol::RateLimitSnapshot;
|
||||
@@ -2025,12 +2025,12 @@ mod tests {
|
||||
assert_eq!(n.thread_id, conversation_id.to_string());
|
||||
assert_eq!(n.turn_id, "turn-123");
|
||||
assert_eq!(n.explanation.as_deref(), Some("need todo list"));
|
||||
assert_eq!(n.todo, n.plan);
|
||||
assert_eq!(n.plan.len(), 2);
|
||||
assert_eq!(n.plan[0].step, "first");
|
||||
assert_eq!(n.plan[0].status, TurnPlanStepStatus::Pending);
|
||||
assert_eq!(n.plan[1].step, "second");
|
||||
assert_eq!(n.plan[1].status, TurnPlanStepStatus::Completed);
|
||||
assert_eq!(n.todo, n.plan, "legacy plan alias should mirror todo");
|
||||
assert_eq!(n.todo.len(), 2);
|
||||
assert_eq!(n.todo[0].step, "first");
|
||||
assert_eq!(n.todo[0].status, TurnTodoStepStatus::Pending);
|
||||
assert_eq!(n.todo[1].step, "second");
|
||||
assert_eq!(n.todo[1].status, TurnTodoStepStatus::Completed);
|
||||
}
|
||||
other => bail!("unexpected message: {other:?}"),
|
||||
}
|
||||
|
||||
@@ -18,12 +18,14 @@ You are Codex, based on GPT-5. You are running as a coding agent in the Codex CL
|
||||
- While you are working, you might notice unexpected changes that you didn't make. If this happens, STOP IMMEDIATELY and ask the user how they would like to proceed.
|
||||
- **NEVER** use destructive commands like `git reset --hard` or `git checkout --` unless specifically requested or approved by the user.
|
||||
|
||||
## Plan tool
|
||||
## Todo tool
|
||||
|
||||
When using the planning tool:
|
||||
- Skip using the planning tool for straightforward tasks (roughly the easiest 25%).
|
||||
- Do not make single-step plans.
|
||||
- When you made a plan, update it after having performed one of the sub-tasks that you shared on the plan.
|
||||
Use the `todo_write` tool to track and communicate your task list. This tool is unrelated to Plan mode.
|
||||
|
||||
- Skip using the todo tool for straightforward tasks (roughly the easiest 25%).
|
||||
- Do not make single-step todo lists.
|
||||
- Keep exactly one step `in_progress` at a time.
|
||||
- Update the todo list after completing a step you previously shared.
|
||||
|
||||
## Special user requests
|
||||
|
||||
|
||||
@@ -18,12 +18,14 @@ You are Codex, based on GPT-5. You are running as a coding agent in the Codex CL
|
||||
- While you are working, you might notice unexpected changes that you didn't make. If this happens, STOP IMMEDIATELY and ask the user how they would like to proceed.
|
||||
- **NEVER** use destructive commands like `git reset --hard` or `git checkout --` unless specifically requested or approved by the user.
|
||||
|
||||
## Plan tool
|
||||
## Todo tool
|
||||
|
||||
When using the planning tool:
|
||||
- Skip using the planning tool for straightforward tasks (roughly the easiest 25%).
|
||||
- Do not make single-step plans.
|
||||
- When you made a plan, update it after having performed one of the sub-tasks that you shared on the plan.
|
||||
Use the `todo_write` tool to track and communicate your task list. This tool is unrelated to Plan mode.
|
||||
|
||||
- Skip using the todo tool for straightforward tasks (roughly the easiest 25%).
|
||||
- Do not make single-step todo lists.
|
||||
- Keep exactly one step `in_progress` at a time.
|
||||
- Update the todo list after completing a step you previously shared.
|
||||
|
||||
## Special user requests
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ You are GPT-5.1 running in the Codex CLI, a terminal-based coding assistant. Cod
|
||||
Your capabilities:
|
||||
|
||||
- Receive user prompts and other context provided by the harness, such as files in the workspace.
|
||||
- Communicate with the user by streaming thinking & responses, and by making & updating plans.
|
||||
- Communicate with the user by streaming thinking & responses, and by making & updating todo lists.
|
||||
- Emit function calls to run terminal commands and apply patches. Depending on how this specific run is configured, you can request that these function calls be escalated to the user for approval before running. More on this in the "Sandbox and approvals" section.
|
||||
|
||||
Within this context, Codex refers to the open-source agentic coding interface (not the old Codex language model built by OpenAI).
|
||||
@@ -39,7 +39,7 @@ You'll work for stretches with tool calls — it's critical to keep the user upd
|
||||
Frequency & Length:
|
||||
- Send short updates (1–2 sentences) whenever there is a meaningful, important insight you need to share with the user to keep them informed.
|
||||
- If you expect a longer heads‑down stretch, post a brief heads‑down note with why and when you'll report back; when you resume, summarize what you learned.
|
||||
- Only the initial plan, plan updates, and final recap can be longer, with multiple bullets and paragraphs
|
||||
- Only the initial plan, todo list updates, and final recap can be longer, with multiple bullets and paragraphs
|
||||
|
||||
Tone:
|
||||
- Friendly, confident, senior-engineer energy. Positive, collaborative, humble; fix mistakes quickly.
|
||||
|
||||
@@ -3,7 +3,7 @@ You are GPT-5.2 running in the Codex CLI, a terminal-based coding assistant. Cod
|
||||
Your capabilities:
|
||||
|
||||
- Receive user prompts and other context provided by the harness, such as files in the workspace.
|
||||
- Communicate with the user by streaming thinking & responses, and by making & updating plans.
|
||||
- Communicate with the user by streaming thinking & responses, and by making & updating todo lists.
|
||||
- Emit function calls to run terminal commands and apply patches. Depending on how this specific run is configured, you can request that these function calls be escalated to the user for approval before running. More on this in the "Sandbox and approvals" section.
|
||||
|
||||
Within this context, Codex refers to the open-source agentic coding interface (not the old Codex language model built by OpenAI).
|
||||
|
||||
@@ -18,12 +18,14 @@ You are Codex, based on GPT-5. You are running as a coding agent in the Codex CL
|
||||
- While you are working, you might notice unexpected changes that you didn't make. If this happens, STOP IMMEDIATELY and ask the user how they would like to proceed.
|
||||
- **NEVER** use destructive commands like `git reset --hard` or `git checkout --` unless specifically requested or approved by the user.
|
||||
|
||||
## Plan tool
|
||||
## Todo tool
|
||||
|
||||
When using the planning tool:
|
||||
- Skip using the planning tool for straightforward tasks (roughly the easiest 25%).
|
||||
- Do not make single-step plans.
|
||||
- When you made a plan, update it after having performed one of the sub-tasks that you shared on the plan.
|
||||
Use the `todo_write` tool to track and communicate your task list. This tool is unrelated to Plan mode.
|
||||
|
||||
- Skip using the todo tool for straightforward tasks (roughly the easiest 25%).
|
||||
- Do not make single-step todo lists.
|
||||
- Keep exactly one step `in_progress` at a time.
|
||||
- Update the todo list after completing a step you previously shared.
|
||||
|
||||
## Special user requests
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -3,7 +3,7 @@ You are a coding agent running in the Codex CLI, a terminal-based coding assista
|
||||
Your capabilities:
|
||||
|
||||
- Receive user prompts and other context provided by the harness, such as files in the workspace.
|
||||
- Communicate with the user by streaming thinking & responses, and by making & updating plans.
|
||||
- Communicate with the user by streaming thinking & responses, and by making & updating todo lists.
|
||||
- Emit function calls to run terminal commands and apply patches. Depending on how this specific run is configured, you can request that these function calls be escalated to the user for approval before running. More on this in the "Sandbox and approvals" section.
|
||||
|
||||
Within this context, Codex refers to the open-source agentic coding interface (not the old Codex language model built by OpenAI).
|
||||
|
||||
@@ -3,7 +3,7 @@ You are a coding agent running in the Codex CLI, a terminal-based coding assista
|
||||
Your capabilities:
|
||||
|
||||
- Receive user prompts and other context provided by the harness, such as files in the workspace.
|
||||
- Communicate with the user by streaming thinking & responses, and by making & updating plans.
|
||||
- Communicate with the user by streaming thinking & responses, and by making & updating todo lists.
|
||||
- Emit function calls to run terminal commands and apply patches. Depending on how this specific run is configured, you can request that these function calls be escalated to the user for approval before running. More on this in the "Sandbox and approvals" section.
|
||||
|
||||
Within this context, Codex refers to the open-source agentic coding interface (not the old Codex language model built by OpenAI).
|
||||
|
||||
@@ -83,7 +83,7 @@ pub(crate) fn should_persist_event_msg(ev: &EventMsg) -> bool {
|
||||
| EventMsg::McpStartupComplete(_)
|
||||
| EventMsg::ListCustomPromptsResponse(_)
|
||||
| EventMsg::ListSkillsResponse(_)
|
||||
| EventMsg::PlanUpdate(_)
|
||||
| EventMsg::TodoUpdate(_)
|
||||
| EventMsg::ShutdownComplete
|
||||
| EventMsg::ViewImageToolCall(_)
|
||||
| EventMsg::DeprecationNotice(_)
|
||||
|
||||
@@ -109,7 +109,7 @@ pub(crate) async fn handle_todo_write(
|
||||
) -> Result<String, FunctionCallError> {
|
||||
let args = parse_todo_write_arguments(&arguments)?;
|
||||
session
|
||||
.send_event(turn_context, EventMsg::PlanUpdate(args))
|
||||
.send_event(turn_context, EventMsg::TodoUpdate(args))
|
||||
.await;
|
||||
Ok("Todo list updated".to_string())
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ Tone:
|
||||
Frequency & Length:
|
||||
- Send short updates (1–2 sentences) whenever there is a meaningful, important insight you need to share with the user to keep them informed.
|
||||
- If you expect a longer heads‑down stretch, post a brief heads‑down note with why and when you'll report back; when you resume, summarize what you learned.
|
||||
- Only the initial plan, plan updates, and final recap can be longer, with multiple bullets and paragraphs
|
||||
- Only the initial plan, todo list updates, and final recap can be longer, with multiple bullets and paragraphs
|
||||
|
||||
Content:
|
||||
- Before you begin, give a quick plan with goal, constraints, next steps.
|
||||
@@ -79,10 +79,10 @@ When the user asks for a review, you default to a code-review mindset. Your resp
|
||||
- Unless you are otherwise instructed, prefer using `rg` or `rg --files` respectively when searching because `rg` is much faster than alternatives like `grep`. If the `rg` command is not found, then use alternatives.
|
||||
- Try to use apply_patch for single file edits, but it is fine to explore other options to make the edit if it does not work well. Do not use apply_patch for changes that are auto-generated (i.e. generating package.json or running a lint or format command like gofmt) or when scripting is more efficient (such as search and replacing a string across a codebase).
|
||||
<!-- - Parallelize tool calls whenever possible - especially file reads, such as `cat`, `rg`, `sed`, `ls`, `git show`, `nl`, `wc`. Use `multi_tool_use.parallel` to parallelize tool calls and only this. -->
|
||||
- Use the plan tool to explain to the user what you are going to do
|
||||
- Only use it for more complex tasks, do not use it for straightforward tasks (roughly the easiest 40%).
|
||||
- Do not make single-step plans. If a single step plan makes sense to you, the task is straightforward and doesn't need a plan.
|
||||
- When you made a plan, update it after having performed one of the sub-tasks that you shared on the plan.
|
||||
- Use the `todo_write` tool to explain what you are going to do; it is unrelated to Plan mode.
|
||||
- Only use it for more complex tasks; skip it for straightforward tasks (roughly the easiest 40%).
|
||||
- Do not make single-step todo lists. If a single step makes sense, the task does not need a todo list.
|
||||
- When you made a todo list, update it after performing one of the sub-tasks you shared.
|
||||
|
||||
# Sub-agents
|
||||
If `spawn_agent` is unavailable or fails, ignore this section and proceed solo.
|
||||
|
||||
@@ -36,7 +36,7 @@ Treat the task as a sequence of concrete steps that add up to a complete deliver
|
||||
- Avoid blocking on uncertainty: choose a reasonable default and continue.
|
||||
|
||||
## Reporting progress
|
||||
In this phase you show progress on your task and appraise the user of your progress using plan tool.
|
||||
In this phase you show progress on your task and appraise the user of your progress, using the `todo_write` tool for non-trivial work.
|
||||
- Provide updates that directly map to the work you are doing (what changed, what you verified, what remains).
|
||||
- If something fails, report what failed, what you tried, and what you will do next.
|
||||
- When you finish, summarize what you delivered and how the user can validate it.
|
||||
|
||||
@@ -52,8 +52,8 @@ When the user asks for a review, you default to a code-review mindset. Your resp
|
||||
# Tool use
|
||||
|
||||
- Unless you are otherwise instructed, prefer using `rg` or `rg --files` respectively when searching because `rg` is much faster than alternatives like `grep`. If the `rg` command is not found, then use alternatives.
|
||||
- Use the plan tool to explain to the user what you are going to do
|
||||
- Only use it for more complex tasks, do not use it for straightforward tasks (roughly the easiest 25%).
|
||||
- Do not make single-step plans. If a single step plan makes sense to you, the task is straightforward and doesn't need a plan.
|
||||
- When you made a plan, update it after having performed one of the sub-tasks that you shared on the plan.
|
||||
- Use the `todo_write` tool to explain what you are going to do; it is unrelated to Plan mode.
|
||||
- Only use it for more complex tasks, not straightforward ones (roughly the easiest 25%).
|
||||
- Do not make single-step todo lists. If a single step makes sense, the task does not need a todo list.
|
||||
- When you made a todo list, update it after performing one of the sub-tasks you shared.
|
||||
- Try to use apply_patch for single file edits, but it is fine to explore other options to make the edit if it does not work well. Do not use apply_patch for changes that are auto-generated (i.e. generating package.json or running a lint or format command like gofmt) or when scripting is more efficient (such as search and replacing a string across a codebase).
|
||||
|
||||
@@ -166,7 +166,7 @@ async fn todo_write_tool_emits_todo_update_event() -> anyhow::Result<()> {
|
||||
|
||||
let mut saw_todo_update = false;
|
||||
wait_for_event(&codex, |event| match event {
|
||||
EventMsg::PlanUpdate(update) => {
|
||||
EventMsg::TodoUpdate(update) => {
|
||||
saw_todo_update = true;
|
||||
assert_eq!(update.explanation.as_deref(), Some("Tool harness check"));
|
||||
let todo_items = update.todo_items();
|
||||
@@ -182,7 +182,10 @@ async fn todo_write_tool_emits_todo_update_event() -> anyhow::Result<()> {
|
||||
})
|
||||
.await;
|
||||
|
||||
assert!(saw_todo_update, "expected PlanUpdate (todo list) event");
|
||||
assert!(
|
||||
saw_todo_update,
|
||||
"expected todo_update event (plan_update legacy alias)"
|
||||
);
|
||||
|
||||
let req = second_mock.single_request();
|
||||
let (output_text, _success_flag) = call_output(&req, call_id);
|
||||
@@ -246,7 +249,7 @@ async fn todo_write_tool_rejects_malformed_payload() -> anyhow::Result<()> {
|
||||
|
||||
let mut saw_todo_update = false;
|
||||
wait_for_event(&codex, |event| match event {
|
||||
EventMsg::PlanUpdate(_) => {
|
||||
EventMsg::TodoUpdate(_) => {
|
||||
saw_todo_update = true;
|
||||
false
|
||||
}
|
||||
@@ -257,7 +260,7 @@ async fn todo_write_tool_rejects_malformed_payload() -> anyhow::Result<()> {
|
||||
|
||||
assert!(
|
||||
!saw_todo_update,
|
||||
"did not expect PlanUpdate (todo list) event for malformed payload"
|
||||
"did not expect todo_update event for malformed payload"
|
||||
);
|
||||
|
||||
let req = second_mock.single_request();
|
||||
|
||||
@@ -537,7 +537,7 @@ impl EventProcessor for EventProcessorWithHumanOutput {
|
||||
ts_msg!(self, "model: {}", model);
|
||||
eprintln!();
|
||||
}
|
||||
EventMsg::PlanUpdate(todo_update_event) => {
|
||||
EventMsg::TodoUpdate(todo_update_event) => {
|
||||
let (explanation, todo_items) = todo_update_event.into_parts();
|
||||
|
||||
// Header
|
||||
|
||||
@@ -176,7 +176,7 @@ impl EventProcessorWithJsonOutput {
|
||||
};
|
||||
vec![ThreadEvent::Error(ThreadErrorEvent { message })]
|
||||
}
|
||||
protocol::EventMsg::PlanUpdate(ev) => self.handle_todo_update(ev),
|
||||
protocol::EventMsg::TodoUpdate(ev) => self.handle_todo_update(ev),
|
||||
_ => Vec::new(),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -223,10 +223,10 @@ fn web_search_begin_then_end_reuses_item_id() {
|
||||
fn todo_update_emits_todo_list_started_updated_and_completed() {
|
||||
let mut ep = EventProcessorWithJsonOutput::new(None);
|
||||
|
||||
// First todo_write update (PlanUpdate event) => item.started (todo_list)
|
||||
// First todo_write update (todo_update; plan_update legacy alias) => item.started (todo_list)
|
||||
let first = event(
|
||||
"p1",
|
||||
EventMsg::PlanUpdate(UpdateTodoArgs::new(
|
||||
EventMsg::TodoUpdate(UpdateTodoArgs::new(
|
||||
None,
|
||||
vec![
|
||||
TodoItemArg {
|
||||
@@ -262,10 +262,10 @@ fn todo_update_emits_todo_list_started_updated_and_completed() {
|
||||
})]
|
||||
);
|
||||
|
||||
// Second todo_write update (PlanUpdate event) => item.updated (same id)
|
||||
// Second todo_write update (todo_update; plan_update legacy alias) => item.updated (same id)
|
||||
let second = event(
|
||||
"p2",
|
||||
EventMsg::PlanUpdate(UpdateTodoArgs::new(
|
||||
EventMsg::TodoUpdate(UpdateTodoArgs::new(
|
||||
None,
|
||||
vec![
|
||||
TodoItemArg {
|
||||
@@ -666,7 +666,7 @@ fn todo_update_after_complete_starts_new_todo_list_with_new_id() {
|
||||
// First turn: start + complete
|
||||
let start = event(
|
||||
"t1",
|
||||
EventMsg::PlanUpdate(UpdateTodoArgs::new(
|
||||
EventMsg::TodoUpdate(UpdateTodoArgs::new(
|
||||
None,
|
||||
vec![TodoItemArg {
|
||||
step: "only".to_string(),
|
||||
@@ -686,7 +686,7 @@ fn todo_update_after_complete_starts_new_todo_list_with_new_id() {
|
||||
// Second turn: a new todo list should have a new id
|
||||
let start_again = event(
|
||||
"t3",
|
||||
EventMsg::PlanUpdate(UpdateTodoArgs::new(
|
||||
EventMsg::TodoUpdate(UpdateTodoArgs::new(
|
||||
None,
|
||||
vec![TodoItemArg {
|
||||
step: "again".to_string(),
|
||||
|
||||
@@ -343,7 +343,7 @@ async fn run_codex_tool_session_inner(
|
||||
| EventMsg::WebSearchBegin(_)
|
||||
| EventMsg::WebSearchEnd(_)
|
||||
| EventMsg::GetHistoryEntryResponse(_)
|
||||
| EventMsg::PlanUpdate(_)
|
||||
| EventMsg::TodoUpdate(_)
|
||||
| EventMsg::TurnAborted(_)
|
||||
| EventMsg::UserMessage(_)
|
||||
| EventMsg::ShutdownComplete
|
||||
|
||||
@@ -3,7 +3,7 @@ You are a coding agent running in the Codex CLI, a terminal-based coding assista
|
||||
Your capabilities:
|
||||
|
||||
- Receive user prompts and other context provided by the harness, such as files in the workspace.
|
||||
- Communicate with the user by streaming thinking & responses, and by making & updating plans.
|
||||
- Communicate with the user by streaming thinking & responses, and by making & updating todo lists.
|
||||
- Emit function calls to run terminal commands and apply patches. Depending on how this specific run is configured, you can request that these function calls be escalated to the user for approval before running. More on this in the "Sandbox and approvals" section.
|
||||
|
||||
Within this context, Codex refers to the open-source agentic coding interface (not the old Codex language model built by OpenAI).
|
||||
|
||||
@@ -810,10 +810,10 @@ pub enum EventMsg {
|
||||
/// Notification that skill data may have been updated and clients may want to reload.
|
||||
SkillsUpdateAvailable,
|
||||
|
||||
/// Todo list update from the todo_write tool. Payload uses `todo` (preferred)
|
||||
/// and also emits `plan` as a legacy alias.
|
||||
#[serde(alias = "todo_update")]
|
||||
PlanUpdate(UpdateTodoArgs),
|
||||
/// Todo list update from the todo_write tool. Primary event name is
|
||||
/// `todo_update`; `plan_update` remains a legacy alias.
|
||||
#[serde(alias = "plan_update")]
|
||||
TodoUpdate(UpdateTodoArgs),
|
||||
|
||||
TurnAborted(TurnAbortedEvent),
|
||||
|
||||
|
||||
@@ -3099,7 +3099,7 @@ impl ChatWidget {
|
||||
self.on_interrupted_turn(ev.reason);
|
||||
}
|
||||
},
|
||||
EventMsg::PlanUpdate(update) => self.on_todo_update(update),
|
||||
EventMsg::TodoUpdate(update) => self.on_todo_update(update),
|
||||
EventMsg::ExecApprovalRequest(ev) => {
|
||||
// For replayed events, synthesize an empty id (these should not occur).
|
||||
self.on_exec_approval_request(id.unwrap_or_default(), ev)
|
||||
|
||||
@@ -4425,7 +4425,7 @@ async fn todo_update_renders_history_cell() {
|
||||
);
|
||||
chat.handle_codex_event(Event {
|
||||
id: "sub-1".into(),
|
||||
msg: EventMsg::PlanUpdate(update),
|
||||
msg: EventMsg::TodoUpdate(update),
|
||||
});
|
||||
let cells = drain_insert_history(&mut rx);
|
||||
assert!(
|
||||
|
||||
@@ -2890,7 +2890,7 @@ mod tests {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn plan_update_with_note_and_wrapping_snapshot() {
|
||||
fn todo_update_with_note_and_wrapping_snapshot() {
|
||||
// Long explanation forces wrapping; include long step text to verify step wrapping and alignment.
|
||||
let update = UpdateTodoArgs::new(
|
||||
Some(
|
||||
@@ -2921,7 +2921,7 @@ mod tests {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn plan_update_without_note_snapshot() {
|
||||
fn todo_update_without_note_snapshot() {
|
||||
let update = UpdateTodoArgs::new(
|
||||
None,
|
||||
vec![
|
||||
|
||||
Reference in New Issue
Block a user