You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: Print some info when exiting: title, command to resume, usage stats #4801
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Upon leaving, codex outputs something like:
Token usage: total=3,728 input=3,713 output=15
To continue this session, run codex resume 019ac229-77e1-7d22-bc19-c63042eefdb7
This is neat, and allows to jump back into the session very quickly.
I'd add the Title of the session, so I can get back to a Terminal tab, and know what that session was about, and jump back at it if need be.
Token usage: total=3,728 input=3,713 output=15
To continue this session, run codex resume 019ac229-77e1-7d22-bc19-c63042eefdb7
This should include the "COST & TOKENS" and "TOOL USAGE" sections shown by /stats, without the per session statistics, which should also be available by a session specific /stats command.
It could also include starting and ending times of the session and a single sentence description of the session.
It would be nice to also get both the total cost broken down by token type, which could be also added to the /stats output.
In addition to a session-specific stats command, there should be a project-specific stats command. Currently the stats command outputs statistics across all projects, which is not very helpful for use in cost accounting.
This should probably be a separate issue, if not already created.
Is there any existing way to get the cost or token counts for a single project?
I don't think all of the above two comments is necessary.
A brief summary of token use and a way to easily continue the session is adequate, I feel. For my take, that's something I did really like from Codex which I then realised I missed when switching back to OC.
Activity
rekram1-node commentedon Nov 26, 2025
That's actually an interesting idea i kinda like this
ara303 commentedon Nov 26, 2025
"Me too"ing on this. Being able to resume a session would be really good.
rekram1-node commentedon Nov 26, 2025
@ara303 you can already do that in multiple ways:
opencode -c // continue last session
opencode --session <id> // continue specified session
opencode -> /sessions -> select session
rruusu commentedon Jan 15, 2026
This should include the "COST & TOKENS" and "TOOL USAGE" sections shown by
/stats, without the per session statistics, which should also be available by a session specific/statscommand.It could also include starting and ending times of the session and a single sentence description of the session.
It would be nice to also get both the total cost broken down by token type, which could be also added to the
/statsoutput.Example:
rruusu commentedon Jan 15, 2026
In addition to a session-specific
statscommand, there should be a project-specificstatscommand. Currently thestatscommand outputs statistics across all projects, which is not very helpful for use in cost accounting.This should probably be a separate issue, if not already created.
Is there any existing way to get the cost or token counts for a single project?
ara303 commentedon Jan 16, 2026
I don't think all of the above two comments is necessary.
A brief summary of token use and a way to easily continue the session is adequate, I feel. For my take, that's something I did really like from Codex which I then realised I missed when switching back to OC.
thdxr commentedon Mar 25, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.