fix: resolve_display_name fails on multi-hyphen tags#8
Closed
bloodcarter wants to merge 5 commits intoaannoo:mainfrom
Closed
fix: resolve_display_name fails on multi-hyphen tags#8bloodcarter wants to merge 5 commits intoaannoo:mainfrom
bloodcarter wants to merge 5 commits intoaannoo:mainfrom
Conversation
Allow `hcom r <session-id>` to find and resume sessions that were not originally launched through hcom. Searches Claude, Codex, and Gemini transcript files on disk, extracts the last working directory, and launches with full hcom wrapping (PTY, hooks, message delivery). Fork (`hcom f <session-id>`) gets this for free. Active-instance guard prevents resuming a session that is already running under another hcom instance. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When `hcom r <name>` is not a UUID and not a known hcom instance, look up ~/.codex/session_index.jsonl for a matching thread_name and resolve it to a session UUID. Picks the most recently updated match when duplicates exist. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
split_once('-') only tried the first hyphen, failing for tags like
"vc-p0-p1-parallel-vani". Now iterates all split points so compound
tags resolve correctly.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Covers multi-hyphen tag resolution, PTY wrapping requirement, and base-name fallback for agents hitting this failure mode. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Agents were using term inject for task delegation instead of hcom send, then listening for replies that never arrive. Added explicit guidance on when to use each, with correct/incorrect examples. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
aannoo
requested changes
Mar 13, 2026
Owner
aannoo
left a comment
There was a problem hiding this comment.
Looks like pr mixes other unrelated commits not just the name thing
Contributor
Author
|
Closing to resubmit with only the fix commit — sorry for the noise. |
2 tasks
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:
resolve_display_namebreaks on multi-hyphen tagsExpected behavior
hcom term vc-p0-p1-parallel-vanishould resolve display namevc-p0-p1-parallel-vanito base instancevani(with tagvc-p0-p1-parallel), then query its screen.All commands that use
resolve_display_nameorresolve_display_name_or_stopped(e.g.,hcom term,hcom resume,hcom send,hcom transcript) should correctly resolve display names where the tag contains hyphens.Actual behavior
hcom term vc-p0-p1-parallel-vanireturns:The instance IS running, but
resolve_display_namefails to resolve the name.Root cause
resolve_display_name(andresolve_display_name_or_stopped) usedsplit_once('-')to split the display name into(tag, base_name). This only splits on the first hyphen:Any display name with 2+ hyphens in the tag portion was broken. Single-hyphen tags (e.g.,
team-luna) worked by coincidence.Fix
Replace
split_once('-')with iteration over all hyphen positions viamatch_indices('-'). Each candidate split is checked against the DB until a matching(base_name, tag)pair is found.Testing
cargo test— 1239 passed, 0 failedhcom term vc-p0-p1-parallel-vaniresolves correctly after fixAlso included
skills/hcom-agent-messaging/SKILL.mdhcom resume <uuid>and Codex thread name resolution