mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Improve /goal error messages for ephemeral sessions (#23796)
## 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: ```text 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.
This commit is contained in:
1 parent
c07f66c9ec
commit
b132fec000
2 files changed
+93
-7
No files matched your search
+9
@@ -0,0 +1,9 @@
|
||||
---
|
||||
source: tui/src/app/thread_goal_actions.rs
|
||||
expression: terminal.backend()
|
||||
---
|
||||
|
||||
|
||||
■ Goals need a saved session. This session is temporary.
|
||||
Run `codex` to start a saved session, or `codex resume` / `/resume` to
|
||||
reopen one.
|
||||
Reference in new issue
Block a user