Skip to content

Session hangs in very large repos (chromium) due to snapshot git add --all #31797

@dmtrKovalenko

Description

@dmtrKovalenko

Description

Starting a session in a very large git repo (chromium checkout, ~500k files) hangs and the process never returns. The first prompt's snapshot step (Snapshot.track) runs git add --all into a fresh, empty snapshot repo under ~/.local/share/opencode/snapshot/..., which forces git to hash the entire working tree from scratch. On a chromium checkout this takes minutes (git add --all did not finish within 90s in my testing), so session.prompt never resolves and opencode appears to shut down.

OpenCode version

1.17.3 (local dev build)

Steps to reproduce

  1. Open opencode in a huge git repo (e.g. a full chromium checkout, ~500k files)
  2. Send any prompt
  3. The first turn hangs; the snapshot git add --all runs for minutes and the process never returns

Operating System

macOS

Terminal

Ghostty

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions