add codex goal command support#2877
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Implements #2819 |
| }); | ||
| if (goalSlashCommand.kind === "status") { | ||
| showGoalStatusToast(activeThread.goal); | ||
| } |
There was a problem hiding this comment.
Status toast shows stale goal before provider responds
Medium Severity
When the user types /goal (status request), showGoalStatusToast(activeThread.goal) is called immediately after dispatching the command, displaying the locally cached goal state. The actual purpose of the "status" request is to fetch the fresh goal from the provider via thread/goal/get, but that response arrives asynchronously through the event stream — well after the toast is already shown and dismissed. If the goal was set or modified externally (e.g., via CLI), the toast will display stale or incorrect data, including "No active goal" even when one exists on the provider.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 54bc62d. Configure here.
ApprovabilityVerdict: Needs human review This PR introduces a complete new feature (Codex goal commands) with new schema types, orchestration commands/events, database migration, provider integration, and UI components. New feature PRs of this scope warrant human review. Additionally, there is an unresolved medium-severity bug regarding stale toast display on goal status requests. You can customize Macroscope's approvability policy. Learn more. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ea90c59. Configure here.


What Changed
Added support for /goal codex command.
Why
It's cool feature but only available in Codex desktop app and CLI.
UI Changes
2026-05-30.20.33.32.mov
Checklist
Note
Medium Risk
Touches orchestration events, DB projection, and provider session RPCs across server and web; scope is large but largely additive with Codex-only goal requests.
Overview
Adds Codex thread goals end-to-end: users can drive goals from the web UI via
/goal(set objective, status, pause, resume, clear) and from the plan sidebar, with goal state shown on thread rows and in the chat timeline.Contracts & persistence: Introduces
OrchestrationThreadGoalandthread.goal.request/ goal update-clear events; threads and shells now carry optionalgoal. Migration 031 addsgoal_jsononprojection_threads, with projection, snapshot queries, and client reducers updated to read/write it.Server: The decider emits
thread.goal-requested; ProviderCommandReactor forwards to CodexsendGoalRequest; Codex mapsthread/goal/*notifications to runtime events; ProviderRuntimeIngestion turns those into orchestration goal commands and goal-related activities.Web: Composer and ChatView dispatch goal commands; ThreadGoalPanel, sidebar labeling (“Goal”), and status indicators; timeline rows for goal lifecycle. Test fixtures across apps gain
goal: nullwhere needed.Reviewed by Cursor Bugbot for commit a00b82b. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add /goal command support for Codex threads
/goalslash command to the chat composer for the Codex provider, supportingset,status,pause,resume, andclearsubcommandsOrchestrationThreadGoalschema in contracts and propagates thegoalfield through threads, thread shells, sidebar summaries, and all projection/snapshot layersthread.goal-updated,thread.goal-cleared,thread.goal-requested) flow from provider runtime through the orchestration engine to the client statePlanSidebargains aThreadGoalPanelshowing goal objective, status badge, duration, token usage, and pause/resume/clear controls; thread rows show a color-coded goal iconGoalTimelineRowgoal_jsoncolumn toprojection_threadsIF NOT EXISTS, but all thread-related test fixtures required agoal: nullfield addition to match the new required shapeMacroscope summarized a00b82b.