Skip to content

Unify live scanner ingest and fix Claude Desktop events#7

Merged
Amorpheuz merged 3 commits into
mainfrom
codex/live-scanners-canonical-ingest-events
Jul 16, 2026
Merged

Unify live scanner ingest and fix Claude Desktop events#7
Amorpheuz merged 3 commits into
mainfrom
codex/live-scanners-canonical-ingest-events

Conversation

@Amorpheuz

@Amorpheuz Amorpheuz commented Jul 14, 2026

Copy link
Copy Markdown
Member

Summary

  • route Claude, Cursor, and Codex live transcript scanning through the same canonical Ingest Event parsers used by transcript import
  • centralize event preparation, wire adaptation, origin-scoped deduplication, usage folding, interruption handling, and live-shell fallback responses
  • add Cursor plan support, whole-transcript subagent preparation, consecutive-response collapse, and interruption-during-tool coverage
  • fix Claude Desktop lifecycle semantics: Stop ends a turn, SessionEnd closes the Session, and a later SessionStart reopens it
  • keep Claude Desktop's internal follow-up suggestion subagents out of the timeline while retaining them as ignored raw-ingest evidence, including migration repair for existing Sessions
  • keep hook-data-wins reconciliation covered at the Collector seam

Why

Live hooks and transcript import previously encoded transcript behavior independently. That duplication caused response loss, repeated Cursor commentary, and Origin drift. Claude Desktop also exposed two existing Collector assumptions: turn-level Stop hooks were treated as Session termination, and internal suggestion generators appeared as user subagents.

This change makes each per-agent parser and the canonical adapter authoritative for both Origins, while keeping trigger-only behavior in thin live shells. Collector lifecycle classification is now shared by display and persistence.

Developer impact

  • transcript-format and payload fixes land once for live and imported Sessions
  • live scanner Events use origin-namespaced explicit keys without changing hook-data-wins reconciliation
  • raw ingest evidence is preserved even when Claude Desktop's internal suggestion Events are intentionally excluded from the timeline
  • migration v9 repairs stored Claude Desktop lifecycle state and removes previously projected internal suggestions

Validation

  • python3 -m ruff check backend
  • npx tsc --noEmit
  • Python compilation pass for backend/app and backend/tests
  • full backend suite under Python 3.12: 155 passed
  • local semantic replay: 11 Claude and 20 readable Codex transcripts matched expected response, attachment, and web-search behavior; Codex gained only standalone reasoning-summary Events
  • real Cursor fixture replay: plan and AskQuestion semantics matched, exactly two expected consecutive duplicates collapsed, and main/subagent interruption records flagged the retained Events
  • live smoke: Codex CLI and Claude Code Desktop Sessions were captured successfully; the Claude smoke exposed and now covers the lifecycle and internal-suggestion fixes above

Remaining draft gate

  • confirm a disposable Cursor live-hook Session against the current raw ingest ledger

@Amorpheuz
Amorpheuz force-pushed the codex/live-scanners-canonical-ingest-events branch from 814a531 to 6ffb4a5 Compare July 15, 2026 13:17
@Amorpheuz Amorpheuz changed the title Route live scanners through canonical ingest events Unify live scanner ingest and fix Claude Desktop events Jul 16, 2026
@Amorpheuz
Amorpheuz marked this pull request as ready for review July 16, 2026 09:16
@Amorpheuz
Amorpheuz merged commit c18c8b7 into main Jul 16, 2026
1 check passed
@Amorpheuz
Amorpheuz deleted the codex/live-scanners-canonical-ingest-events branch July 16, 2026 09:16
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.

1 participant