Skip to content

fix(agents): add file_not_found correlation status for missing transcripts - #538

Open
gokhanozdemir wants to merge 1 commit into
codemie-ai:mainfrom
gokhanozdemir:fix/523-transcript-correlation
Open

fix(agents): add file_not_found correlation status for missing transcripts#538
gokhanozdemir wants to merge 1 commit into
codemie-ai:mainfrom
gokhanozdemir:fix/523-transcript-correlation

Conversation

@gokhanozdemir

Copy link
Copy Markdown
Contributor

Summary

Add file_not_found correlation status to handle cases where Claude Code doesn't persist transcripts for interactive PTY sessions.

Motivation

Interactive Claude sessions don't persist transcripts at the reported path for PTY-driven sessions. The correlation logic was marking them as "matched" even when the file didn't exist, causing metrics processing to fail with "0 records processed" errors and masking the actual issue.

Changes

  • Updated src/agents/core/session/types.ts to add 'file_not_found' to CorrelationStatus type
  • Modified src/cli/commands/hook.ts to check file existence before marking correlation as "matched"
  • Updated src/providers/plugins/sso/session/SessionSyncer.ts to handle 'file_not_found' status gracefully by skipping sync instead of failing

Testing

  • Verified correlation logic checks file existence before marking as matched
  • SessionSyncer now skips sync for file_not_found status instead of failing
  • Build, lint, and typecheck all pass
  • Followed Conventional Commits format for commit message

Breaking Changes

None

Related Issues

Fixes #523

@gokhanozdemir gokhanozdemir changed the title fix(agents): add file_not_found correlation status for missing transcripts fix: add file_not_found correlation status for missing transcripts Sep 5, 2026
@gokhanozdemir gokhanozdemir changed the title fix: add file_not_found correlation status for missing transcripts fix(agents): add file_not_found correlation status for missing transcripts Sep 5, 2026
@gokhanozdemir
gokhanozdemir force-pushed the fix/523-transcript-correlation branch from 1bb4605 to 2991cec Compare September 5, 2026 16:46
@gokhanozdemir gokhanozdemir changed the title fix(agents): add file_not_found correlation status for missing transcripts fix(session): add file_not_found correlation status for missing transcripts Sep 5, 2026
…ripts

Interactive Claude sessions don't persist transcripts at the reported path
for PTY-driven sessions. The correlation logic now checks if the transcript
file actually exists on disk before marking it as 'matched'. If the file doesn't
exist, correlation status is set to 'file_not_found' instead, preventing metrics
processing failures and providing better error handling for interactive sessions
where transcript persistence is expected to be absent.

Fixes codemie-ai#523
@gokhanozdemir
gokhanozdemir force-pushed the fix/523-transcript-correlation branch from 2991cec to 6a7b7f6 Compare September 5, 2026 16:52
@gokhanozdemir gokhanozdemir changed the title fix(session): add file_not_found correlation status for missing transcripts chore(session): add file_not_found correlation status for missing transcripts Sep 5, 2026
@gokhanozdemir gokhanozdemir changed the title chore(session): add file_not_found correlation status for missing transcripts fix(agents): add file_not_found correlation status for missing transcripts Sep 5, 2026
@gokhanozdemir
gokhanozdemir marked this pull request as ready for review September 5, 2026 17:22
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.

Interactive Claude sessions: transcript not persisted at reported path → session metrics silently empty (0 records)

1 participant