Merged
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add session field to ParsedMessage (session:new, session:<uuid>) - Extract extractPrefix helper to eliminate 3x repeated parsing blocks - Add tests for session parsing and combined prefix usage Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Extract last session ID from bot messages in thread via regex
- Add resolveSessionId with priority: session:new > session:<id> > thread > new
- Return SessionResolution { sessionId, isResuming } to eliminate duplicated logic
- Skip thread context injection when resuming (Claude session has history)
- Fix SESSION_ID_RE to match both block format and text fallback
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Verify regex matches both text fallback and block format - Test last-wins behavior with multiple session messages - Test non-UUID strings are rejected Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
--session-id creates a new conversation with a specific UUID, which causes "Session ID already in use" errors when trying to continue an existing session. Use --resume for session resumption instead. Co-Authored-By: Claude Opus 4.6 <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
--session-id로 전달session:new(새 세션 강제),session:<uuid>(특정 세션 지정) 프리픽스 지원Changes
parser.tssession:prefix 파싱 +extractPrefix헬퍼로 중복 제거handler.tsresolveSessionId(우선순위 기반 세션 결정),fetchThreadContext반환 타입 확장,SESSION_ID_REhandler.test.tsresolveSessionId5개 분기 테스트parser.test.tssession:파싱 테스트Test plan
bun test— 60개 전체 통과biome check— 린트 클린session:new로 새 세션 강제 시작 확인session:<uuid>로 다른 쓰레드 세션 이어가기 확인🤖 Generated with Claude Code