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
The hang is caused by a Go 1.25 regression (golang/go#76391): Go 1.25 introduced a blocking call against the stdin handle during process startup, which conflicts with PSReadLine holding the same handle on the main thread. The process hangs before main() is reached. This is why piping empty input (e.g. "" |) works as a workaround — it replaces the inherited console handle with a pipe.
The fix was backported to Go 1.25.6 (CL 724640, golang/go#76392). For gh users specifically, gh 2.87.0 is the first release built with Go 1.25.7 and is no longer affected. The broader issue remains open in golang/go#76391 for Go 1.27.
If you are on gh 2.86.0 or earlier, prepending "" | gh is an effective workaround. The same applies to other Go-based tools until they are rebuilt with Go 1.25.6 or later. You can also tell your AI assistant about this workaround so it applies it automatically when invoking affected tools.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Symptom:
ghand other Go-based native executables hang indefinitely when called frominvoke_expressionin an interactive PowerShell session.Fix: Update
ghto 2.87.0 or later. For other affected tools, rebuild with Go 1.25.6 or later.Thanks to @doraemonkeys for sharing this in #36.
The hang is caused by a Go 1.25 regression (golang/go#76391): Go 1.25 introduced a blocking call against the stdin handle during process startup, which conflicts with PSReadLine holding the same handle on the main thread. The process hangs before
main()is reached. This is why piping empty input (e.g."" |) works as a workaround — it replaces the inherited console handle with a pipe.The fix was backported to Go 1.25.6 (CL 724640, golang/go#76392). For
ghusers specifically, gh 2.87.0 is the first release built with Go 1.25.7 and is no longer affected. The broader issue remains open in golang/go#76391 for Go 1.27.If you are on gh 2.86.0 or earlier, prepending
"" | ghis an effective workaround. The same applies to other Go-based tools until they are rebuilt with Go 1.25.6 or later. You can also tell your AI assistant about this workaround so it applies it automatically when invoking affected tools.Beta Was this translation helpful? Give feedback.
All reactions