High CPU Utilization Due To Repeated Git Process Invocations #6582

Open
opened 2026-02-16 18:04:40 -05:00 by yindo · 1 comment
Owner

Originally created by @markovejnovic on GitHub (Jan 17, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

Opencode appears to be invoking git in a loop which has caused very high CPU usage. The program was sitting idle waiting for further input on my end.

It seems it's making a bunch of git show calls -- each of which individually seems really cheap (as per btop reporting they only use 0.0% CPU) and ephemeral but it appears that many thousands of git calls were made.

I am, indeed, working in a monorepo, fwiw.

If the bug happens again, I'll try to get a lower bound for how many git show calls were made.

Plugins

No response

OpenCode version

1.15

Steps to reproduce

No response

Screenshot and/or share link

Image

Operating System

Darwin 25.2.0 arm64 arm

Terminal

Ghostty

Originally created by @markovejnovic on GitHub (Jan 17, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description Opencode appears to be invoking `git` in a loop which has caused very high CPU usage. The program was sitting idle waiting for further input on my end. It seems it's making a bunch of `git show` calls -- each of which individually seems really cheap (as per `btop` reporting they only use 0.0% CPU) and ephemeral but it appears that many thousands of `git` calls were made. I am, indeed, working in a monorepo, fwiw. If the bug happens again, I'll try to get a lower bound for how many `git show` calls were made. ### Plugins _No response_ ### OpenCode version 1.15 ### Steps to reproduce _No response_ ### Screenshot and/or share link <img width="1955" height="742" alt="Image" src="https://github.com/user-attachments/assets/ff2aaeaa-7a91-4053-b997-e6c41f6f8d4b" /> ### Operating System Darwin 25.2.0 arm64 arm ### Terminal Ghostty
yindo added the bugperf labels 2026-02-16 18:04:40 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 17, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #5220: Glob search uses 100% of CPU - similar CPU spike issue
  • #6172: High CPU usage (100%+) during LLM streaming in long sessions - extensive analysis of CPU/performance problems
  • #4818: Heavy CPU Usage and making my M1 mac laggy after updating
  • #3182: Very slow session due to 98GB of git snapshots - git snapshot optimization issues
  • #7690: LSP detection in monorepo not working - monorepo-specific issues
  • #6696: Project ID collision when repos cloned from same source share sessions - monorepo-related

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 17, 2026): This issue might be a duplicate of existing issues. Please check: - #5220: Glob search uses 100% of CPU - similar CPU spike issue - #6172: High CPU usage (100%+) during LLM streaming in long sessions - extensive analysis of CPU/performance problems - #4818: Heavy CPU Usage and making my M1 mac laggy after updating - #3182: Very slow session due to 98GB of git snapshots - git snapshot optimization issues - #7690: LSP detection in monorepo not working - monorepo-specific issues - #6696: Project ID collision when repos cloned from same source share sessions - monorepo-related Feel free to ignore if none of these address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#6582