codex - 💡(How to fix) Fix user input when using /goal should be printed even if there's error [2 comments, 3 participants]

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…
GitHub stats
openai/codex#21258Fetched 2026-05-06 06:24:04
View on GitHub
Comments
2
Participants
3
Timeline
7
Reactions
0
Author
Timeline (top)
labeled ×4commented ×2closed ×1

Error Message

This is not a bug but a UX issue. Even if there is a character limit for the /goal command, a better UX would be to print the prompt onto the screen before throwing the error. prompt is persisted and printed to the screen before surfacing the error.

RAW_BUFFERClick to expand / collapse

What version of Codex CLI is running?

0.128.0

What subscription do you have?

PRO

Which model were you using?

gpt-5.5

What platform is your computer?

macOs

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

No response

What issue are you seeing?

I entered a long prompt when using the /goal feature and got this: Failed to set thread goal: thread/goal/set failed in TUI

I lost the whole prompt which I spent 20 minutes crafting which is incredibly frustrating. It is not persisted in my sessions, nor captured as an event etc...

This is not a bug but a UX issue. Even if there is a character limit for the /goal command, a better UX would be to print the prompt onto the screen before throwing the error. alternatively, show something if the character limit is reached.

What steps can reproduce the bug?

/goal [some decently long prompt]

What is the expected behavior?

prompt is persisted and printed to the screen before surfacing the error.

or show something when the character limit is reached.

Additional information

No response

extent analysis

TL;DR

The issue can be mitigated by printing the prompt to the screen before attempting to set the goal, allowing the user to recover their input in case of an error.

Guidance

  • Consider modifying the /goal command to display the user's input before attempting to set the goal, ensuring that the input is not lost in case of an error.
  • If a character limit exists for the /goal command, implement a check to display a warning or error message when the limit is reached, rather than silently failing.
  • Review the current error handling for the /goal command to determine why the input is not being persisted or captured as an event.
  • Investigate adding a feature to persist user input for the /goal command, allowing users to recover their work in case of an error.

Example

No code example is provided as the issue does not specify the programming language or implementation details.

Notes

The issue is reported as a UX issue rather than a bug, and the solution will depend on the specific implementation of the /goal command and the Codex CLI.

Recommendation

Apply workaround: Modify the /goal command to print the user's input before attempting to set the goal, and consider adding a character limit check to display a warning or error message when the limit is reached. This will improve the user experience and prevent loss of user input.

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 user input when using /goal should be printed even if there's error [2 comments, 3 participants]