Skip to content

[FEATURE]: Print some info when exiting: title, command to resume, usage stats #4801

Closed

Description

@abourget

Feature hasn't been suggested before.

  • 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.

Activity

  1. added
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on Nov 26, 2025
  2. rekram1-node commented on Nov 26, 2025

    @rekram1-node
    Contributor

    That's actually an interesting idea i kinda like this

  3. ara303 commented on Nov 26, 2025

    @ara303

    "Me too"ing on this. Being able to resume a session would be really good.

  4. rekram1-node commented on Nov 26, 2025

    @rekram1-node
    Contributor

    @ara303 you can already do that in multiple ways:

    opencode -c // continue last session
    opencode --session <id> // continue specified session
    opencode -> /sessions -> select session

  5. rruusu commented on Jan 15, 2026

    @rruusu
    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.

    Example:

    ┌────────────────────────────────────────────────────────┐
    │                       OVERVIEW                         │
    ├────────────────────────────────────────────────────────┤
    │ Messages                                           571 │
    │ Days                                                 2 │
    └────────────────────────────────────────────────────────┘
    
    ┌────────────────────────────────────────────────────────┐
    │                    COST & TOKENS                       │
    ├────────────────────────────────────────────────────────┤
    │ Total Cost                                      $19.88 │
    │ Avg Cost/Day                                     $9.94 │
    │ Input                                   88.4K ( $0.27) │
    │ Output                                 231.8K ( $3.48) │
    │ Cache Read                              33.8M ( $3.38) │
    │ Cache Write                              3.4M ($12.75) │
    └────────────────────────────────────────────────────────┘
    
    ┌────────────────────────────────────────────────────────┐
    │                      TOOL USAGE                        │
    ├────────────────────────────────────────────────────────┤
    │ read               ████████████████████ 216 (33.7%)    │
    │ bash               ████████████         135 (21.1%)    │
    │ edit               █████████            105 (16.4%)    │
    │ todowrite          ██████                65 (10.1%)    │
    │ glob               ████                  53 ( 8.3%)    │
    │ grep               ████                  47 ( 7.3%)    │
    │ write              █                     15 ( 2.3%)    │
    │ task               █                      4 ( 0.6%)    │
    │ list               █                      1 ( 0.2%)    │
    └────────────────────────────────────────────────────────┘
    
  6. rruusu commented on Jan 15, 2026

    @rruusu

    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?

  7. ara303 commented on Jan 16, 2026

    @ara303

    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.

  8. thdxr commented on Mar 25, 2026

    @thdxr
    Member

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionUsed for feature requests, proposals, ideas, etc. Open discussion

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions