Fix: preserve [CLONED]/[HALF-CLONE] tag in cloned session title#26
Open
Yan-Cheng-Hsu wants to merge 1 commit intoykdojo:mainfrom
Open
Fix: preserve [CLONED]/[HALF-CLONE] tag in cloned session title#26Yan-Cheng-Hsu wants to merge 1 commit intoykdojo:mainfrom
Yan-Cheng-Hsu wants to merge 1 commit intoykdojo:mainfrom
Conversation
Claude Code 2.1.x stores session titles in jsonl as type:custom-title and type:agent-name records. clone-conversation.sh copies these unchanged, so cloned sessions inherit the source's auto-generated name (e.g. "career-reset-strategy") instead of "[CLONED ...] career-reset- strategy" in claude -r, terminal tabs, and the TUI title bar. Append a fresh custom-title + agent-name record with the clone tag prepended after each clone — Claude Code reads the last occurrence, so this overrides. Same fix applied to half-clone-conversation.sh. Bumps plugin to 0.14.13. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
Cloned conversations created via
/cloneand/half-clonewere inheriting the source session's auto-generated kebab-case title (e.g.career-reset-strategy) instead of showing the[CLONED ...]/[HALF-CLONE ...]tag inclaude -r, terminal tabs, and the TUI title bar.Root cause
Claude Code 2.1.x persists session titles as
custom-title/agent-namerecords embedded in the jsonl. The clone scripts copy these records (with rewritten sessionId) but do not modify the title string itself — Claude Code reads the last matching record when resuming, so cloned sessions show the source's name.Fix
After writing the cloned/half-cloned jsonl, append a fresh
custom-titleandagent-namerecord with the clone tag prepended (e.g.[CLONED Apr 27 14:11] career-reset-strategy). Because Claude Code reads the last occurrence, this overrides the inherited records.Files
scripts/clone-conversation.sh— append override records after file writescripts/half-clone-conversation.sh— same fix, parallel logic.claude-plugin/plugin.json/.claude-plugin/marketplace.json— bump 0.14.12 → 0.14.13Test plan
/clonein an active session; verify new jsonl ends withcustom-title+agent-namerecords containing the[CLONED ...]prefixclaude -r; verify session title shows[CLONED ...]prefix~/.claude/sessions/<new-pid>.jsonhasnamefield with[CLONED ...]prefix/half-clone🤖 Generated with Claude Code