Skip to content

Claude export auto-detection fails on bare-list format #79

@marklubin

Description

@marklubin

Bug

The Claude export auto-detection in synix.adapters.registry._parse_json_autodetect fails to recognize Claude exports that are a bare JSON list rather than an object with a "conversations" key.

Observed Behavior

Claude's "Export data" feature (as of early 2026) produces a bare list:

[
  {
    "uuid": "3df46a88-...",
    "name": "Restart Mouse Service on macOS",
    "chat_messages": [...]
  },
  ...
]

The auto-detector at registry.py:91-98 checks:

if (
    isinstance(data, dict)
    and "conversations" in data
    ...
):
    return parse_claude(filepath)

This fails because the top-level value is a list, not a dict. The file also doesn't match the ChatGPT detector (no "mapping" key), so _parse_json_autodetect returns [] — silently dropping all Claude conversations.

Expected Behavior

The auto-detector should also match a bare list of objects containing chat_messages keys and route them to parse_claude.

Workaround

Wrap the export manually:

import json
with open("claude_export.json") as f:
    data = json.load(f)
with open("claude_export.json", "w") as f:
    json.dump({"conversations": data}, f)

Environment

  • synix 0.15.0
  • Claude export from claude.ai, February 2026

Suggested Fix

Add a third detection branch in _parse_json_autodetect:

# Claude format (bare list): list of objects with "chat_messages" key
if (
    isinstance(data, list)
    and data
    and isinstance(data[0], dict)
    and "chat_messages" in data[0]
):
    return parse_claude(filepath)

And update parse_claude to accept both wrapped and bare formats:

if isinstance(data, list):
    conversations = data
else:
    conversations = data.get("conversations", [])

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