Repository navigation
Goal objective cannot be edited by the agent after creation #31185
Description
Summary
When a Codex goal is already active, the agent-visible goal lifecycle does not appear to provide a way to revise the goal objective text. If the user adds an important new constraint and asks the agent to "edit/update the goal accordingly," the agent can only keep that constraint in the live plan or conversation state, not persist it back into the active goal objective.
This makes the active goal text drift from the real agreed objective during long-running work.
Observed behavior
In a Codex Desktop goal-mode thread, a user created an active goal for a long-running implementation task. Later, the user added an important standing constraint and asked the agent to update the goal accordingly.
The agent had to respond that it could not literally edit the active goal text with the available goal tooling, and could only add the new constraint as a live-plan working constraint.
That workaround keeps the current turn aligned, but it means the durable goal objective remains incomplete while the actual task contract has changed.
Expected behavior
When a user asks to amend an active goal, Codex should expose a first-class way for the agent or UI to update the objective, for example one of:
update_goal({ objective: "...updated objective..." })
edit_goal({ objective: "...updated objective..." })
thread/goal/set or equivalent behavior that replaces the active objective while preserving usage accounting
The updated objective should be reflected in future goal continuations, compaction resumes, heartbeat/goal context, and any visible goal UI.
Actual behavior
The agent can continue working with the new constraint in the conversation/live plan, but cannot persist the edited objective into the active goal. Future goal injections still risk carrying the stale objective unless they also preserve the later conversation constraint.
Why this matters
Long-running goals evolve. Users often add constraints, narrow scope, change acceptance criteria, or correct the implementation strategy after the goal has already started. If the durable objective cannot be edited, the source of truth splits:
- persisted active goal objective: stale
- latest user instruction / plan: current
That split increases the chance of drift after compaction, side conversations, resumes, or automatic goal continuations.
Suggested fix
Please consider adding an agent-visible objective update path, or documenting and exposing the intended control-plane operation for replacing an active goal objective while preserving the same goal lifecycle/accounting.
A good contract would let the agent say, truthfully: "I updated the active goal objective to include this new constraint."
Related issues checked
I searched for existing issues before filing. These are adjacent but do not appear to be duplicates:
- v0.133.0: /goal sets active goal but get_goal/update_goal are not exposed to the model #24094: goal tools not exposed at all
- Windows CLI: completed goals cannot be cleared by the agent; add clear_goal or auto-clear on completion #24978: completed goals cannot be cleared / new goal cannot be started
- Goal pause state exists, but agent tool contract can make agents report pause is unavailable #30630: pause state exists but agent contract can misreport pause availability
- Expose Goal APIs in the TypeScript SDK #29283: expose Goal APIs in TypeScript SDK
- codex exec resume should support promptless follow mode for active goals #24016: promptless follow/resume for active goals
This issue is specifically about editing the objective text of an already-active goal.
Activity
grandmaster451 commentedon Sep 25, 2026
Concrete long-running-goal use case: when a user adds a durable constraint such as “do not use scheduled heartbeats; continue through native Goal continuation,” the agent should be able to persist that change in the active Goal while preserving its lifecycle and usage accounting. Keeping the constraint only in conversation state can cause it to be lost on compaction or continuation. A first-class objective update operation with an auditable before/after diff would avoid recreating a scheduler as a workaround.
grandmaster451 commentedon Sep 26, 2026
A second reproducible case from a long-running Codex Desktop Goal thread: the user asked the agent to replace the objective and continue. The callable Goal tools available to the agent exposed create/get/status updates, but no in-place objective edit; the agent could not invoke the user-facing
/goal editflow itself. After the user cleared the previous Goal,get_goalreturned no current Goal and creating the replacement worked, but this user-mediated clear/recreate step interrupts autonomous continuity.A model-callable operation that replaces the active objective while preserving the existing lifecycle and usage accounting would avoid this workaround. It should not silently mark an unfinished Goal complete or paused just to make
create_goalsucceed.