Skip to content

feat(cli): snapshot native continuation sources - #959

Closed
Neonforge98 wants to merge 1 commit into
codex/conversation-continuation-episodesfrom
codex/continuation-native-snapshot
Closed

feat(cli): snapshot native continuation sources#959
Neonforge98 wants to merge 1 commit into
codex/conversation-continuation-episodesfrom
codex/continuation-native-snapshot

Conversation

@Neonforge98

Copy link
Copy Markdown
Collaborator

Problem

ORG2 can discover, read, and resume managed Codex/Claude native sessions, but portability work had no trustworthy source identity. Imported-history cache paths scan across profiles, normalized SessionEvent rows are lossy, and a caller-provided path would cross the account/security boundary.

Solution

  • Add an internal, read-only native source snapshot inventory for managed OwnKey Codex and Claude Code sessions.
  • Resolve only from the persisted managed session, exact runtime, account-scoped native-id ledger, and that account's profile root; no arbitrary path or broad cross-profile cache lookup is accepted.
  • Require a quiescent session under the existing session control lock, revalidate status/PID/runtime/account/native binding, refuse symlink/path escape, and bound scans to 50,000 entries/depth 12.
  • Hash the source twice with a 64 MiB ceiling, compare file identity/metadata, record the final-record and domain-separated source digests, and fail when the source changes mid-snapshot.
  • Probe bounded Codex/Claude format metadata and record CLI version as parseable-only evidence. Every materialization capability remains false; same-profile resume is explicitly distinct from cross-account or cross-runtime rebase.

Potential risks

  • Explicit snapshots may scan a large account profile and read a native transcript twice; limits cap the work and there is no background/idle invocation.
  • Only OwnKey account-scoped Codex and Claude Code profiles are supported. Hosted profiles and other CLIs fail closed.
  • This PR provides no Tauri command, writer, materializer, cloud upload, or behavior change. Rollback is git revert e26a121be.

Verification

  • cargo test -p org2 native_snapshot --lib (13 tests passed)
  • cargo fmt --check -p org2
  • cargo check -p org2 --lib
  • Commit hook: scoped cargo clippy --lib -p org2 passed
  • git diff --check

Stack

Base: #957 (codex/conversation-continuation-episodes)

This read-only identity/digest layer is the precondition for transactional execution persistence and later plan/apply materialization; it does not claim session migration is implemented.

@Harry19081 Harry19081 added enhancement New feature or request agent Agent runtime, behavior, memory, providers, or orchestration sessions Sessions, history, replay, sidebar, workspace, or worktrees security Security-sensitive behavior, credentials, secrets, or advisories labels Aug 25, 2026
@Neonforge98

Copy link
Copy Markdown
Collaborator Author

Closing this experimental continuation stack after architecture review. ORG2 will reuse the existing full Team Session continuation path instead of shipping a parallel checkpoint/materializer system. The branch is preserved for audit; nothing from this stack should be merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent Agent runtime, behavior, memory, providers, or orchestration enhancement New feature or request security Security-sensitive behavior, credentials, secrets, or advisories sessions Sessions, history, replay, sidebar, workspace, or worktrees

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants