Skip to content

fix(server): Codex /goal clear removes the persisted goal - #83

Closed
macodev00 wants to merge 1 commit into
mainfrom
cursor/fix-codex-goal-clear-redo2-09b1
Closed

macodev00 wants to merge 1 commit into
mainfrom
cursor/fix-codex-goal-clear-redo2-09b1

Conversation

@macodev00

Copy link
Copy Markdown
Owner

Problem

On Codex, /goal clear is sent as a normal turn, so the persisted goal stays. An exact /goal clear should call Codex thread/goal/clear, confirm whether a goal was removed, and leave the thread and project files in place. Other /goal text, and /goal clear on any other provider, stays a normal message.

Fixes pingdotgg#13252
Supersedes pingdotgg#13370

Change

An exact /goal clear (trimmed, collapsed whitespace, case-insensitive, no attachments) on Codex is a provider command:

  • The provider is the live session while that session is not stopped. After a switch away from Codex, the text is a normal turn. A failed instance lookup is a command failure and is not sent.
  • Clearing runs on a forked fiber, and thread/goal/clear is bounded to 30 seconds, so it does not stall the shared command worker.
  • The composer recognizes multi-word /goal clear. A trailing space still dismisses the menu. /model arguments stay on the model path.
  • Failures persist the static detail "The provider could not clear the goal." The cause is logged only. Recording the confirmation, or settling the session afterward, is not reported as a failed clear.

Codex advertises the goal clear slash command. A successful clear appends "Goal cleared" or "No goal to clear" and drops the pending turn. Goal clear is unavailable while a turn is starting or running.

Scope and approval

Accepted bug pingdotgg#13252. This replaces the closed attempt in pingdotgg#13370.

Verification

Linux x64, Node v24.13.1.

vp test run apps/server/src/orchestration/Layers/ProviderCommandReactor.test.ts apps/server/src/provider/Layers/CodexAdapter.test.ts apps/server/src/provider/Layers/ProviderService.test.ts apps/server/src/provider/Layers/ProviderRegistry.test.ts apps/web/src/composer-logic.test.ts packages/shared/src/composerTrigger.test.ts

Result: Test Files 6 passed (6). Tests 385 passed (385). Duration 9.33s.

vp run --filter t3 typecheck, vp run --filter @t3tools/web typecheck, and vp run --filter @t3tools/shared typecheck completed with no errors.

Limitations

thread/goal/clear was exercised through the Codex adapter and reactor fakes, not a live Codex app-server. Composer detection is covered by the web and shared unit tests, not a running web or mobile client.

Open in Web Open in Cursor 

Send an exact Codex /goal clear through thread/goal/clear instead of a
normal turn. Keep other /goal text, and /goal clear on other providers,
as ordinary messages.
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L labels Oct 2, 2026
@macodev00

Copy link
Copy Markdown
Owner Author

Opened upstream.

@macodev00 macodev00 closed this Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Codex /goal clear is sent as a chat message instead of clearing the persisted goal

1 participant