mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
Fix missing resume hint on zero-token exits (#16987)
Addresses #16421 Problem: Resumed interactive sessions exited before new token usage skipped all footer lines, hiding the `codex resume` continuation command. It's not clear whether this was an intentional design choice, but I think it's reasonable to expect this message under these circumstances. Solution: Compose token usage and resume hints independently so resumable sessions still print the continuation command with zero usage.
This commit is contained in:
committed by
GitHub
Unverified
parent
cd591dc457
commit
2b9bf5d3d4
@@ -438,15 +438,14 @@ fn format_exit_messages(exit_info: AppExitInfo, color_enabled: bool) -> Vec<Stri
|
||||
..
|
||||
} = exit_info;
|
||||
|
||||
if token_usage.is_zero() {
|
||||
return Vec::new();
|
||||
let mut lines = Vec::new();
|
||||
if !token_usage.is_zero() {
|
||||
lines.push(format!(
|
||||
"{}",
|
||||
codex_protocol::protocol::FinalOutput::from(token_usage)
|
||||
));
|
||||
}
|
||||
|
||||
let mut lines = vec![format!(
|
||||
"{}",
|
||||
codex_protocol::protocol::FinalOutput::from(token_usage)
|
||||
)];
|
||||
|
||||
if let Some(resume_cmd) =
|
||||
codex_core::util::resume_command(thread_name.as_deref(), conversation_id)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user