Skip to content

fix(app): MEMORY / OOM crash - add experimental flag to disable vcs diff auto-fetch#24079

Open
jeremyakers wants to merge 3 commits intoanomalyco:devfrom
jeremyakers:jeremy/vcs-diff-disable-flag
Open

fix(app): MEMORY / OOM crash - add experimental flag to disable vcs diff auto-fetch#24079
jeremyakers wants to merge 3 commits intoanomalyco:devfrom
jeremyakers:jeremy/vcs-diff-disable-flag

Conversation

@jeremyakers
Copy link
Copy Markdown

@jeremyakers jeremyakers commented Apr 24, 2026

Issue for this PR

Partially fixes #24049 and #22683

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds an experimental disable_vcs_diff config flag and uses it to skip the web app's automatic vcs.diff fetch.

This is a mitigation for workspaces where /vcs/diff can be very expensive or crash the server, especially umbrella workspaces with nested git repos/worktrees.

This does not fully fix the underlying /vcs/diff scalability issue in #24049. It preserves the current default behavior and gives affected users an opt-in escape hatch while broader fixes are considered.

How did you verify your code works?

Tested locally with a built opencode binary against a large umbrella workspace.

  • With experimental.disable_vcs_diff unset, the existing behavior is unchanged.
  • With experimental.disable_vcs_diff: true, the desktop-layout web UI no longer emits GET /vcs/diff from the automatic review/diff path.
  • During active web UI use with the flag enabled, no new /vcs/diff requests, heap warnings, or OOM crashes were observed in the logs.
  • Ran bun --cwd packages/opencode typecheck.
  • Ran bun --cwd packages/app typecheck.
  • Ran the repository pre-push hook, which completed bun turbo typecheck successfully.

Screenshots / recordings

N/A. This is a config-gated behavior change, not a visual UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions
Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@jeremyakers jeremyakers changed the title fix(app): add experimental flag to disable vcs diff auto-fetch fix(app): MEMORY / OOM crash - add experimental flag to disable vcs diff auto-fetch Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

/vcs/diff can OOM in desktop-layout web UI on umbrella workspaces with many nested git repos

1 participant