Request review path for AI goal replacement guidance
Summary
I prepared a small patch for the Goals UX, but opening a PR from my fork is blocked by the repository policy:
An owner of this repository has limited the ability to open a pull request to users that are collaborators on this repository.
Could a maintainer advise whether this change is worth reviewing and, if so, what path external contributors should use when direct PR creation is restricted?
Compare URL:
https://github.com/openai/codex/compare/main...lidge-jun:jaw/goal-reset-command-260519?expand=1
Fork branch:
https://github.com/lidge-jun/codex/tree/jaw/goal-reset-command-260519
Commit:
https://github.com/lidge-jun/codex/commit/5d6caae1cbcc09be968adbd415458a451d6ec115
Problem
Clarification: this is not about blocking the manual /goal ... path. A user can still manage goals through the TUI slash-command flow.
The issue is the AI/tool path. When a user asks Codex in natural language to set a new goal, the model may call create_goal/set_goal while the thread already has a goal. create_goal intentionally fails in that case. That is the right safety boundary, but the recovery path is not clear enough for the model to explain what the user should do next.
The design constraint I wanted to preserve is that the model should not get a reset/clear authority. Goal replacement should remain user-controlled.
The patch therefore makes the recovery path explicit: when the AI cannot set a replacement goal because one already exists, it should tell the user to use the user-facing goal controls first. In particular, the user can run /goal clear to clear the current goal before asking Codex to set a different one. The patch also adds /goal reset as a discoverable alias for the existing /goal clear command.
It distinguishes these intents:
- To change the objective of the current goal through the UI, use
/goal edit. - To discard the current goal before starting a different one, use
/goal clearor/goal reset, then ask Codex to set the new goal again.
Patch contents
- Treat
/goal resetas an alias for/goal clearin the TUI slash command dispatcher. - Update goal summary hints to show
/goal clear/reset. - Add slash-command coverage that
/goal resetemitsClearThreadGoal. - Clarify core
create_goalexisting-goal failure guidance: update_goalis only for legitimate status updates./goal editis the user path for changing an objective./goal clearor/goal resetis the user-controlled path for discarding an existing goal before asking Codex to set a different one.- Keep the extension spec aligned while preserving its complete-only
update_goalsemantics.
This does not add any model-visible reset/clear tool or new app-server protocol surface.
Validation run locally
- Frontend read-only verification: PASS, high confidence.
- External GPT Pro review: first requested the
/goal editdistinction; after revision, verdict wasAPPROVE_PR. just fmtcargo test -p codex-tui goal_control_slash_commands_emit_goal_eventscargo test -p codex-tui goal_menucargo test -p codex-core create_goal_tool_rejects_existing_goalcargo insta pending-snapshots --as-json- no
.snap.newfiles found git diff --checkjust fix -p codex-tuijust fix -p codex-core
Note: just fmt completed successfully. While running the Python SDK ruff step, uv printed an existing sdk/python/pyproject.toml warning about exclude-newer = \"7 days\", but the command exited successfully and left Python files unchanged.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗