fix(cursor): fold merge/hide Tasks via safe _ppid parent fallback - #296
Open
zephyr110 wants to merge 8 commits into
Open
fix(cursor): fold merge/hide Tasks via safe _ppid parent fallback#296zephyr110 wants to merge 8 commits into
zephyr110 wants to merge 8 commits into
Conversation
Cap live closed-subagent ids with ordered O(1) lookups, tighten the Cursor routing probe, and report Kimi hooks only for the install-target config so migrated users are not false-positive "installed".
When transcript_path cannot name a parent, resolve a unique same-PID Cursor card so Agent Sub-Sessions merge/hide still work for IDE and CLI.
Do not _ppid-fold an already-established Cursor card onto a sibling Task, surface folded Task prompts/replies on the parent card, and refresh chat from role-keyed transcripts (stripping timestamp/user_query wrappers).
… text Keep Codex/plugin subagent prompts off the parent card, and compare normalized Cursor transcript chat so hook + tailer copies do not double up.
Infer mascot from termBundleId when hook source is empty, and show the CLI brand (not host IDE) when a foreign agent runs inside Cursor/etc.
Idle main + running Task sharing an IDE pid previously folded new Tasks onto the orphan card. Exclude foldable Task cards and prefer main-looking or older idle parents instead.
Add applyTranscriptDelta normalized-wrapper dedupe cases, assert Codex AfterAgentResponse does not overwrite parent chat, and test terminalBadgeLabel used by the session badge.
Cursor Tasks that fire Claude-format hooks without --source kept the default source=claude and showed as ghost Claude cards. Detect Cursor agent-transcript paths, rebrand to cursor, and fold under merge/hide.
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.
Depends on
#285 — merge first; until then the diff vs
mainincludes it.Summary
transcript_path: fold (or hide) via a narrow_ppidparent fallback — unique same-PID Cursor card only; never guess when ambiguous._ppid: prefer the main chat over an orphan Task (including idle mains); never parent onto a foldable Task card._ppid-fold an established main onto a sibling Task; dedupe Cursor transcript vs hook text.--sourceno longer leave default-claudeTask cards beside the real Cursor session — rebrand + fold via Cursoragent-transcriptspaths.中文说明
transcript_path的 Cursor Task: 用收紧的_ppid兜底合并/隐藏——只认唯一同 PID 父卡,对不上就不猜。_ppid认错父卡: 优先主会话(含 idle),不把孤儿 Task 当父卡。--source的 Claude 格式 hook 不再留下默认claude的 Task 卡——按 Cursoragent-transcripts路径重标并折叠。Test Plan
CursorSessionFoldingTests/HookServerCursorPpidFallbackTests/HookServerCursorProbeTestsAppStateCursorSubsessionTests— misbranded Claude-default Task rebrand + mergeMascotSourceConsistencyTests/ transcript dedupe / Codex reply gatetranscript_path