codex - 💡(How to fix) Fix Codex Desktop Windows: Goal feature fails with "Failed to set goal" and "Failed to clear goal"

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

Clearing a goal should clear it without showing an error. Setting a goal should persist it for the current thread without an error. Clearing a goal should remove it without an error.

RAW_BUFFERClick to expand / collapse

What version of the Codex App are you using (From “About Codex” dialog)?

26.519.31651

What subscription do you have?

ChatGPT Plus

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What issue are you seeing?

<img width="394" height="53" alt="Image" src="https://github.com/user-attachments/assets/dfe83289-32e1-4f50-85a7-a1517ac9cacf" /> <img width="562" height="46" alt="Image" src="https://github.com/user-attachments/assets/02c05ae5-a0c1-4dc6-a8c3-ee6179e24e5a" />

The new Goal feature in Codex Desktop does not work.

When I try to set a goal, the UI shows:

Failed to set goal

When I click X to clear the goal, the UI shows:

Failed to clear goal

The goal visually disappears after clicking X, but the operation still reports failure.

This started after I had authentication/login issues with Codex and ChatGPT. I tried logging out and back in through the CLI.

What I tried:

  • codex --logout
  • codex login
  • restarted Codex Desktop
  • killed all Codex, codex, node, and node_repl processes
  • deleted/recreated:
    • C:\Users\quero\.codex\goals_1.sqlite
    • C:\Users\quero\.codex\goals_1.sqlite-wal
    • C:\Users\quero\.codex\goals_1.sqlite-shm
  • checked SQLite integrity:
    • PRAGMA integrity_check returns ok
    • thread_goals table exists
    • database is not read-only
  • Windows Apps → Codex → Repair/Reset did not fix it

Relevant local paths:

  • Goal DB: C:\Users\quero\.codex\goals_1.sqlite
  • Codex TUI log: C:\Users\quero\codex\log\codex-tui.log
  • Desktop logs: C:\Users\quero\AppData\Local\Packages\OpenAI.Codex_2p2nqsd0c76g0\LocalCache\Local\Codex\Logs

Expected behavior:

Setting a goal should persist the goal for the current thread.

Clearing a goal should clear it without showing an error.

Actual behavior:

Both set and clear operations show failure messages.

What steps can reproduce the bug?

  1. Open Codex Desktop on Windows 11.
  2. Open any existing or new thread.
  3. Click the Goal control.
  4. Enter any goal text, for example: Improve this app UI.
  5. Submit/save the goal.
  6. Observe: Codex shows Failed to set goal.
  7. Click X to clear/disable the goal.
  8. Observe: Codex shows Failed to clear goal.

This happens even after restarting Codex, logging out/in with codex --logout and codex login, and recreating goals_1.sqlite.

What is the expected behavior?

Setting a goal should persist it for the current thread without an error.

Clearing a goal should remove it without an error.

The Goal UI state should match the persisted state in the local goals database.

Additional information

Local goal database was recreated and appears valid:

  • C:\Users\quero\.codex\goals_1.sqlite
  • PRAGMA integrity_check returns ok
  • thread_goals table exists
  • database files are not read-only

Relevant logs/paths:

  • C:\Users\quero\.codex\log\codex-tui.log
  • C:\Users\quero\AppData\Local\Packages\OpenAI.Codex_2p2nqsd0c76g0\LocalCache\Local\Codex\Logs

The issue appeared after login/auth problems with Codex and ChatGPT, but relogging did not fix it.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Codex Desktop Windows: Goal feature fails with "Failed to set goal" and "Failed to clear goal"