Skip to content

fix(codex): 새 transcript 형식의 사용자 메시지 복원 - #51

Merged
devswha merged 1 commit into
devswha:mainfrom
Yoonwoo-Ha:fix/codex-response-user-history
Aug 13, 2026
Merged

fix(codex): 새 transcript 형식의 사용자 메시지 복원#51
devswha merged 1 commit into
devswha:mainfrom
Yoonwoo-Ha:fix/codex-response-user-history

Conversation

@Yoonwoo-Ha

Copy link
Copy Markdown
Contributor

문제

최신 Codex transcript에서는 사용자가 보낸 메시지가 기존의 event_msg:user_message 없이 response_itemrole: user 형식으로만 기록될 수 있습니다. 이 경우 ChatMux가 어시스턴트 답변은 표시하지만 사용자 메시지 말풍선은 누락했습니다.

변경 사항

  • response_item 형식의 사용자 메시지를 transcript에 포함합니다.
  • Codex가 내부적으로 주입하는 AGENTS.md instructionsenvironment_context는 채팅에서 제외합니다.
  • input_image 첨부도 사용자 메시지에서 복원합니다.
  • 구버전 transcript처럼 동일 메시지가 response_itemevent_msg 양쪽에 기록된 경우 중복을 제거합니다.
  • 두 형식이 함께 있으면 base64 이미지보다 가벼운 로컬 이미지 경로를 가진 event_msg를 우선합니다.

검증

  • Codex provider 테스트: 15/15 통과
  • Rust core 테스트: 19/19 통과
  • TypeScript typecheck, lint, identity check, production build 통과
  • 실제 누락 세션: 사용자 메시지 5개 복원, 내부 주입 메시지 0개 노출 확인
  • 기존 이중 기록 세션: 사용자 메시지 272개가 중복 없이 유지됨을 확인
  • 전체 테스트: 929개 통과. 로컬 HOME의 실제 skills 데이터가 fixture에 섞이는 기존 환경 의존 테스트 2개만 실패했으며 이번 변경 파일과는 무관합니다. GitHub CI의 격리 환경에서도 최종 확인하겠습니다.

@devswha devswha left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the parser, dedup accounting, and cache integration; validated the dedup window against real transcripts on this host (11,215 rollouts, latest 40 scanned): 40 response_item-only prompts confirm the new format is current Codex's primary record, and all 39 double-recorded pairs sit 0–1ms apart — well inside the 10ms window, with the 100ms backward-scan cutoff giving ample margin. normalizedBytes accounting is exact on both the replace and skip paths, and the event_msg-over-base64 preference keeps the cache budget honest. CI green on both Node lanes.

@devswha
devswha merged commit aa22818 into devswha:main Aug 13, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants