Skip to content

Improve /goal error messages for ephemeral sessions#23796

Open
etraut-openai wants to merge 2 commits into
mainfrom
etraut/improve-goal-temporary-session-error
Open

Improve /goal error messages for ephemeral sessions#23796
etraut-openai wants to merge 2 commits into
mainfrom
etraut/improve-goal-temporary-session-error

Conversation

@etraut-openai
Copy link
Copy Markdown
Collaborator

@etraut-openai etraut-openai commented May 21, 2026

Why

When a user runs /goal in a temporary session, the TUI can currently surface an internal app-server failure such as thread/goal/get failed in TUI. That message is technically true, but it does not explain the actual constraint: goals require a saved session because goal state is persisted with the thread.

This is especially confusing when codex doctor reports the background app-server as running in ephemeral mode, since that wording is easy to conflate with ephemeral thread/session behavior.

What changed

  • Added a TUI-side formatter for thread-goal RPC failures in codex-rs/tui/src/app/thread_goal_actions.rs.
  • Detects app-server/core errors that indicate goals are unsupported for an ephemeral thread/session.
  • Replaces the internal RPC failure with a user-facing explanation:
Goals need a saved session. This session is temporary.
Run `codex` to start a saved session, or `codex resume` / `/resume` to reopen one.
  • Preserves the existing generic failure wording for non-ephemeral goal errors.

Verification

  • cargo test -p codex-tui thread_goal_error_message --lib

I also tried cargo test -p codex-tui; it built successfully but the test runner aborted in an unrelated side-thread stack overflow (app::tests::discard_side_thread_removes_agent_navigation_entry), which reproduced when run by itself.

@etraut-openai etraut-openai marked this pull request as ready for review May 21, 2026 01:43
Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c17adc520e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread codex-rs/tui/src/app/thread_goal_actions.rs
@etraut-openai etraut-openai changed the title [codex] Clarify /goal errors for temporary sessions Improve /goal error messages for ephemeral sessions May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants