`/goal` slash command does not work in 0.128.0

Resolved 💬 22 comments Opened May 1, 2026 by amanshresthaa Closed May 1, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of Codex CLI is running?

OpenAI Codex (v0.128.0)

What subscription do you have?

Pro

Which model were you using?

gpt-5.5 high

What platform is your computer?

Darwin 25.4.0 arm64 arm

What terminal emulator and version are you using (if applicable)?

terminal Mac

What issue are you seeing?

"status": 400

What steps can reproduce the bug?

Uploaded thread: 019de27a-a7bf-7761-a22a-8a67057fcddd

What is the expected behavior?

_No response_

Additional information

_No response_

View original on GitHub ↗

22 Comments

github-actions[bot] contributor · 2 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #20548

Powered by Codex Action

etraut-openai contributor · 2 months ago

Can you provide more details about what you're doing and what problem you're seeing? Repro steps would be appreciated.

josephferrero · 2 months ago

I am having the same issue on linux

codex --version
codex-cli 0.128.0

<img width="1582" height="397" alt="Image" src="https://github.com/user-attachments/assets/d34ec661-fe13-4512-bb0f-0ec6ba43b4ba" />

obahareth · 2 months ago
codex --version
codex-cli 0.128.0

Also having the same issue on macOS, is it feature flagged perhaps?

Release notes mention that /goal is available on this version but I don't have it.

josephferrero · 2 months ago

@obahareth @amanshresthaa Are you using an enterprise sub?

obahareth · 2 months ago

No, personal.

A friend helped me enable it, apparently you need to do:

codex features enable goals
etraut-openai contributor · 2 months ago

This feature is still under development and is not generally ready for external use. We are testing and refining it internally, and we'll mark it as experimental in the next release. At that point, you'll be able to use the /experimental slash command to enable it.

waltstephen · 2 months ago

Same on my Codex too. Happened when using "/goal" in one session for second time. API-based account.

weibeu · 2 months ago

Exactly same issue on codex-cli 0.128.0 even though I have enabled this from the experimental features. Weird part is that it worked for prompt with shorter text / single sentence. However, keeps failing continuosly even in new chat if I provide it a longer text of a plan I had made.

For now, I just saved the longer plan in file and asked it to work like /goal Read the complete development instructions as per -> "....md" and finalize.

etraut-openai contributor · 2 months ago

@weibeu, when you say "keeps failing continuously", what do you mean? What is the failure mode?

weibeu · 2 months ago

I am not sure what you mean by failure mode. However, below is more context:

  • Tried multiple times keep happening
  • Occurs even after creating an entirely fresh session

Since normally, the /goal works. I expected something to be wrong with the text contents I am pasting after /goal. So I created a random markdown file with similar characters / lines my original plan had and it produced same error.
I have attached the markdown file as well whose content when pasted into the TUI produces the same error.

Appears to be some issue with the length of input character.

1.
<img width="467" height="114" alt="Image" src="https://github.com/user-attachments/assets/9a52e513-afb2-4a12-9f92-5d176e666727" />
2.
<img width="1207" height="416" alt="Image" src="https://github.com/user-attachments/assets/eb8c979f-67db-4e55-a6b5-815471614c51" />
3.

codex-goal-issue-input-markdown.md

etraut-openai contributor · 2 months ago

@weibeu, thanks for clarifying. The goal prompt cannot be that large. I will look at improving the error message. For a task like this, you should put the task description in a file, then refer to the file in the goal definition: /goal Implement the feature described in my_spec.md.

weibeu · 2 months ago

Right thanks. Exactly how I proceeded.

rgoggins · 2 months ago

workaround:
modify your config.toml and add

[features] 
goals = true

If you're on v0.128.0 , this should work.

tonydavis629 · 2 months ago

I get this same error with the goals = true config active, and a short prompt. v0.128.0, linux.
Failed to read thread goal: thread/goal/get failed in TUI

etraut-openai contributor · 2 months ago

@tonydavis629, please provide full repro steps, and I can take a look.

tonydavis629 · 2 months ago
➜  ~ codex --version
codex-cli 0.128.0
➜  ~ cat /etc/os-release 
PRETTY_NAME="Ubuntu 24.04.2 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04.2 LTS (Noble Numbat)"
VERSION_CODENAME=noble
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=noble
LOGO=ubuntu-logo
➜  ~ codex          
WARNING: failed to clean up stale arg0 temp dirs: Directory not empty (os error 39)
╭───────────────────────────────────────────────╮
│ >_ OpenAI Codex (v0.128.0)                    │
│                                               │
│ model:       gpt-5.5 xhigh   /model to change │
│ directory:   ~                                │
│ permissions: YOLO mode                        │
╰───────────────────────────────────────────────╯

  Tip: You can run any shell command from Codex using ! (e.g. !ls)


> /goal say hello

■ Failed to read thread goal: thread/goal/get failed in TUI

./codex/config.toml:

preferred_auth_method = "chatgpt"

[features]
goals = true

[tui.model_availability_nux]
"gpt-5.5" = 1

@etraut-openai uploaded thread ID 019dea72-f690-70e0-bb75-ab8e4ddea277

tonydavis629 · 2 months ago

@etraut-openai I was able to resolve this by deleting and regenerating the .codex/ directory, but it reoccurs after the first use.

etraut-openai contributor · 2 months ago

@tonydavis629, yeah good call. I'm guessing that your state db was corrupted. By any chance, have you built Codex from source and/or run a custom fork at some point?

tonydavis629 · 2 months ago

@etraut-openai no I haven't. I got the same issue again, but again I was able to resolve it by deleting the .codex folder. So seems like something in there is not cooperating with the /goal feature.

etraut-openai contributor · 2 months ago

If you're able to repro, please open a new issue, use /feedback and post the session ID. That will give me access to your logs so I can diagnose. Thanks!

If it happens again, you can probably fix by simply renaming the ~/.codex/state_5.sqlite db file. That will be less painful than regenerating the entire .codex directory.

MiaoDX · 2 months ago

@etraut-openai same here, works after remove ~/.codex/state_5.sqlite file for 0.128.0, mac os. install via npm.