You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
rtk git branch --show-current loop in opencode #732
I've experienced these issues using Opencode on 3 different computers. When it tries to check the current branch, it just keeps going in an infinite loop.
Opencode v1.2.27
Model: Claude Opus 4.6
Reacted by karacala, Imri Paran, Alexander Morozov, Bogdan Tselobanov and amnesia
I have just installed rtk on my opencode 1.4.7 (on Windows 11) and I'm getting similar results for git status command:
It figured out it's being intercepted but it's stuck in the loop anyway. Not sure that's the problem with rtk itself. Maybe it's the model taught to interpret plain command outputs. I gave it another try like this:
Now it handled that without any loop so maybe the problem is elsewhere.
I use opencode on Windows 11 and I did rtk init -g --opencode which successfully installed a hook but did not update my %USERPROFILE%\.config\opencode\AGENTS.md so maybe that's the root cause?
Related: #1848 adds a skill file that teaches agents about RTK_DISABLED=1 to break out of exactly this kind of loop. When the agent detects compressed/unusable output, it can prefix the retry with RTK_DISABLED=1 to get raw output instead of looping indefinitely.
Activity
pszymkowiak commentedon Apr 12, 2026
🔍 Automated Triage
bughighSummary
RTK rewrites
git branch --show-currentin a way that triggers an infinite loop in OpenCode; a related PR (#1848) adding an opt-out is already open.Triaged automatically by wshm · This is an automated analysis, not a human review.
ipatalas commentedon Apr 17, 2026
I have just installed rtk on my opencode 1.4.7 (on Windows 11) and I'm getting similar results for git status command:
It figured out it's being intercepted but it's stuck in the loop anyway. Not sure that's the problem with rtk itself. Maybe it's the model taught to interpret plain command outputs. I gave it another try like this:
Now it handled that without any loop so maybe the problem is elsewhere.
I use opencode on Windows 11 and I did
rtk init -g --opencodewhich successfully installed a hook but did not update my%USERPROFILE%\.config\opencode\AGENTS.mdso maybe that's the root cause?bb1 commentedon May 12, 2026
Related: #1848 adds a skill file that teaches agents about
RTK_DISABLED=1to break out of exactly this kind of loop. When the agent detects compressed/unusable output, it can prefix the retry withRTK_DISABLED=1to get raw output instead of looping indefinitely.