v0.41.1: remove sessionTitle overwrite (use additive statusline)#40
Merged
Conversation
v0.36.0 set the Claude Code window/tab title to `[TP] Nk saved` via
the `sessionTitle` SessionStart return field. Problem: sessionTitle
OVERWRITES Claude Code's own session name — an intrusive clobber.
A user hit it in the wild ("он перекрывает название сессии. и это
хреново") and asked the obvious question: why not do it like caveman?
Caveman is right: the badge belongs in the STATUSLINE — an additive
UI line that sits ALONGSIDE the session name, not on top of it.
token-pilot already ships exactly that (hooks/tp-statusline.sh +
statusline-chain.sh, which renders `[TP deny 12k]` next to caveman's
badge). The sessionTitle write was redundant with it AND destructive.
Fix: drop the entire sessionTitle block from hook-session-start
(both the saved-tokens and the workflow-progress variants). The
SessionStart hook now returns only additionalContext + watchPaths.
Cumulative savings continue to show via the statusline badge (doctor
already nudges users to configure it); the session name stays the
user's. Workflow progress can ride the statusline too if wanted —
tp-statusline.sh can read the active workflow — rather than hijacking
the title.
No tests referenced sessionTitle; clean removal.
Tests: 1333/1333 pass.
Build: clean (25 agents under 0.41.1).
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.
Bug: v0.36.0 set the CC window/tab title to
[TP] Nk savedvia thesessionTitleSessionStart return — but sessionTitle OVERWRITES the session name. Intrusive clobber, hit in the wild.Right answer (the user's instinct): do it like caveman — the badge belongs in the statusline (additive, sits alongside the name). token-pilot already ships that (
hooks/tp-statusline.sh→[TP deny 12k]). The sessionTitle write was redundant AND destructive.Fix: drop the whole sessionTitle block (saved-tokens + workflow-progress variants). SessionStart now returns only additionalContext + watchPaths. Savings show via the statusline badge; the session name stays the user's.
No tests referenced sessionTitle. 1333/1333 pass.