Skip to content

feature: implement something like claude's session title #1018

Closed

Description

@galmasi

Summary

It would be nice for cortex to print out session titles in addition to session IDs in the session summary. By using the top analogy, the session ID would correspond to the PID and the session title would be akin to the process command line.

Supporting material

This is an incomplete summary of what can be found out from claude-code using introspection of the agent's subdirectory created in ~/.claude. The tool I wrote only looks at completed (exited) sessions for now.

Note that one of claude's nicer features is that the AI assigns a title to each session. The title is not guaranteed to be unique, and is generated several times.

  • Each session has a JSONL file in claude (named by the session ID)
  • There are periodic entries in the JSONL file that are of type ai-title and contain a heading called aiTitle. These are generally identical across multiple such entries, but the fact that there are multiple entries tells me that claude reserves the right to rename a session based on ongoing activity in it.
SESSION ID | TITLE                                    | STATUS   |     COST |     IN TOK |    OUT TOK | UPDATED            
---------------------------------------------------------------------------------------------------------------------------
3eb6d5ce-# | DAM keycloak.local OpenID misconfigurat# | idle     |    $0.00 |          0 |          0 | 2026-09-16 20:17:57
f7997777-# | Claude Code session storage location     | idle     |    $0.00 |          0 |          0 | 2026-09-16 19:43:14
b60cb9ec-# | test1.py results pretty table            | waiting  |    $0.00 |          0 |          0 | 2026-09-16 19:33:33
d8c7cc74-# | BMC ipmitool power-off from ks.json      | idle     |    $0.00 |          0 |          0 | 2026-09-16 19:31:12
0c632a55-# | Cortex plugin registration               | idle     |    $0.00 |          0 |          0 | 2026-09-16 19:22:35
f141b2a3-# | /home/galmasi                            | exited   |    $0.08 |          3 |         12 | 2026-09-15 12:34:11
6a52c577-# | /home/galmasi                            | exited   |    $0.30 |          3 |         12 | 2026-09-14 17:22:13
4d4eee3f-# | IBM RIMT onboarding process              | exited   |    $0.32 |        905 |        213 | 2026-09-13 20:01:10
d5e489a4-# | w3id.sh associative array from spreadsh# | exited   |   $13.66 |       8.1K |      32.4K | 2026-09-13 20:00:00
6388c0dc-# | /home/galmasi                            | exited   |    $0.00 |          0 |          0 | 2026-09-10 17:31:49
d7e3acaa-# | Vault SSH key-signing policy for W3ID u# | exited   |    $4.76 |       8.0K |      11.1K | 2026-09-02 13:47:53
e5a67ccd-# | setup-step-ca-ssh                        | exited   |    $0.00 |          0 |          0 | 2026-09-01 19:10:58
5a99886c-# | /home/galmasi                            | exited   |    $0.00 |          0 |          0 | 2026-09-01 17:35:21
8d1c256e-# | /home/galmasi                            | exited   |    $0.00 |          0 |          0 | 2026-09-01 17:35:02
2cddde10-# | nus_outpost_install.txt                  | exited   |    $0.45 |       1.3K |        912 | 2026-08-31 13:09:34
5e451d27-# | claude_network_trace.txt REST API extra# | exited   |    $0.52 |        977 |       1.3K | 2026-08-28 17:45:55
e8c4ef9d-# | roleflatten-plugin                       | exited   |   $12.10 |      81.2K |      34.8K | 2026-08-28 17:34:09
b63ae72e-# | /home/galmasi/.claude                    | exited   |    $0.30 |          3 |         12 | 2026-08-26 15:44:55
43243108-# | /home/galmasi                            | exited   |    $0.00 |          0 |          0 | 2026-08-26 14:17:16
91789848-# | Asking about image processing capability | exited   |    $0.00 |          0 |          0 | 2026-08-24 12:37:20

Immediate Todos

  • Do other tools (like bob, codex, openclaw, pi) have similar ways to introspect and find session titles?
  • Is any of the claude information available to read in interactions as opposed to the static session information? (which would be simpler to reach for a tool like cortex)
  • Are other things like tool use similarly documented in claude sessions? ... because we may want to use the python tool I'm using as "ground truth checker" for cortex
  • The claude checker script should be checked into a repository somewhere (or at least a gist).

Title interception with cortex

Paraphrasing a claude prompt/response on this topic: claude code title generation happens when claude code sends its first request to the LLM in a new session. It then sends a separate short call to the messages API that requests the LLM to generate a title for the conversations.

This is "your tokens at work" being spent on something that is normally useless. Since claude code spends the tokens on generating a title for its own sessions (that it doesn't share with the user), we might as well use the feature in cortex.

Activity

  1. self-assigned this
    on Sep 18, 2026
  2. esnible commented on Sep 18, 2026

    @esnible
    Member

    Note that ~/.claude is the default. I am testing using LiteLLM with ~/.claude/settings.json and Anthropic endpoints with ~/.claude-pro/settings.json (my own name). Users will want a way to specify multiple configuration directories, even for the same harness.

    Other harness issue trackers:

  3. galmasi commented on Sep 18, 2026

    @galmasi
    Author

    I have a half-written authbridge plugin that discerns the "purpose" of an LLM API request and finds Claude Code title requests. It's a fuzzy kind of tool, looking for message sizes and keywords in the request, so I don't have a great deal of trust in it. I think the best we could hope for is that if the fuzzy match works we can replace the session ID in the abctl display. I'm not crazy about this. Looking at ~/.claude is a lot simpler than intercepting traffic. ¯\_(ツ)_/¯

    @esnible if you want my python code for analyzing ~/.claude structure just say the word. I don't think the code is good for anything but reference, but it may save you a few minutes looking at the directory structure of ~/.claude.

  4. huang195 commented on Sep 18, 2026

    @huang195
    Member

    I'd rather not hard code anything Claude Code specific - a plugin is a good fit. Since we're already extracting information from live traffic, if we can extract the session title from there, that'll be preferred over having to fiddle with the file system.

  5. moved this from New/ToDo to In progress in Rossoctl Issue Prioritizationon Sep 21, 2026
  6. added this to the Release V0.9.0 milestone on Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions