Skip to content

Preserve session names in native metadata stores for import/conversion #158

@akolotov

Description

@akolotov

Summary

Follow up to #157.

We are separating session_name from first_message, and cloud sync can be made schema-safe by carrying both fields in the canonical payload. However, some flows still do not persist the session name back into the native metadata stores that the scanners rely on.

The main example today is Codex:

  • cloud import can recreate the session transcript and history entry
  • Claude -> Codex conversion can recreate the session transcript and history entry
  • but neither path writes the session name into session_index.jsonl

As a result, after a round-trip or conversion, the imported/converted Codex session can lose its true metadata-derived session name and fall back to prompt text.

Why this should be addressed separately

This is broader than the immediate review fix.

The immediate review fix is:

  • add sessionName to the cloud canonical schema
  • keep firstMessage separate

That preserves the distinction in transport.

Writing session names back into native metadata stores is a larger follow-up because it affects:

  • cloud import
  • Claude -> Codex conversion
  • potentially other cross-agent/import paths later

Proposed follow-up

When importing or converting into Codex, if a session name is available, write it into ~/.codex/session_index.jsonl so the existing scanner can rebuild session_name natively.

Potentially do the equivalent for other tools where native title metadata exists.

Acceptance criteria

  • Imported Codex sessions preserve session_name
  • Claude -> Codex converted sessions preserve session_name
  • Existing scans continue to prefer native metadata sources
  • Backward compatibility is preserved for older payloads without sessionName

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions