Generate session titles from a lightweight text transcript - #787
Open
uvforce wants to merge 1 commit into
Open
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Generating a short session title currently replays the source system prompt, tool schemas, and conversation history, including tool results and reasoning. Tool-heavy sessions can therefore send substantially more context than is useful for naming.
Change
The temporary title agent receives a short naming system prompt, no tools, and one user message containing a plain-text transcript followed by the existing title instructions. This transcript is extracted locally; there is no extra summarization-model call.
The transcript keeps messages in order and includes:
Tool calls, tool results, thinking blocks, images, and other message roles are omitted. All user turns with text remain represented, including changes of goal in the middle of a session. The obsolete shadow-tool, tool-pair sanitization, and trailing-user folding helpers are removed.
Scope and relationship to #776
Related to #671. This PR is based directly on
mainand does not depend on #776 (dedicated title model selection). It changes the input, not the choice of model or thinking level. Both changes are complementary, but they touch the same implementation file and may need reconciliation when one lands.The manual trigger,
waitForIdle(), inherited model and thinking level, transport/credential hooks, 90-second generation timeout, title cleanup, usage reporting, and persistence route are unchanged. This PR does not add first-message automatic naming or any settings/UI changes.Trade-offs
The caps are heuristics, not a fixed total context or token budget: input still grows with the number of messages. Truncation can cut mid-sentence, and information present only in omitted tool/image content or after a cap is unavailable to the title model. The shorter prompt also stops deliberately matching the source conversation's cache prefix; this is not a claim of lower billed cost or latency for every provider/cache state. Custom conversion/context/payload hooks remain inherited as before.
Validation
npm test: 973 passed.git diff --check, and production build passed.