Skip to content

Push fails when session message files exceed GitHub's 100MB file size limit #45

@jcoffi

Description

@jcoffi

Problem

When includeSessions is enabled, session message files in data/storage/message/ can grow well beyond 100MB. This causes push to fail because GitHub rejects files over 100MB.

The error from git:

remote: error: File data/storage/message/XXXX.json is 170.44 MB; this exceeds GitHub's file size limit of 100.00 MB

Current behavior

push calls commitAll then pushBranch using standard git operations. There is no check for file size, no chunking, no compression, and no Git LFS integration. When a file exceeds the limit, the push fails silently from the plugin's perspective -- users must manually resolve it in the local sync repo at ~/.local/share/opencode/opencode-synced/repo.

The resolve command also does not handle this case.

Expected behavior

Session sync should work regardless of file size. Possible approaches:

  • Git LFS: automatically track data/storage/message/*.json (or files above a size threshold) with LFS
  • File chunking: split large session files into smaller pieces before committing
  • Compression: gzip or similar before committing
  • Pre-push validation: check file sizes before committing and warn/skip files that would fail

Workaround

Disable session message syncing (includeSessions: false) to avoid the issue entirely, at the cost of losing session history in the sync repo.

Environment

  • opencode-synced: latest (installed via npx)
  • GitHub as remote

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