OC often hangs at commit request #1615

Closed
opened 2026-02-16 17:31:46 -05:00 by yindo · 10 comments
Owner

Originally created by @imajus on GitHub (Sep 5, 2025).

Originally assigned to: @thdxr on GitHub.

I experience intermittent hanging specifically when requesting OC to commit changes in the repository.
Pressing Esc twice doesn't stop the execution. Only force exit helps (Ctrl+C twice) but if I then restart OC with --continue argument, it instantly hangs again.

I've just faced it again and before exiting checked the logs with tail -f. And I noticed the same log entry repeating frequently and seemingly indefinitely:

INFO  2025-09-05T13:55:56 +88ms service=project directory=/home/denis/Workspaces/hackathons/somnia/ember fromDirectory
INFO  2025-09-05T13:55:56 +92ms service=project directory=/home/denis/Workspaces/hackathons/somnia/ember fromDirectory
INFO  2025-09-05T13:55:56 +90ms service=project directory=/home/denis/Workspaces/hackathons/somnia/ember fromDirectory
INFO  2025-09-05T13:55:57 +91ms service=project directory=/home/denis/Workspaces/hackathons/somnia/ember fromDirectory
INFO  2025-09-05T13:55:57 +91ms service=project directory=/home/denis/Workspaces/hackathons/somnia/ember fromDirectory
...

And here is a beginning of the log output after restarting with --contunue.

Originally created by @imajus on GitHub (Sep 5, 2025). Originally assigned to: @thdxr on GitHub. I experience intermittent hanging specifically when requesting OC to commit changes in the repository. Pressing Esc twice doesn't stop the execution. Only force exit helps (Ctrl+C twice) but if I then restart OC with `--continue` argument, it instantly hangs again. I've just faced it again and before exiting checked the logs with `tail -f`. And I noticed the same log entry repeating frequently and seemingly indefinitely: ``` INFO 2025-09-05T13:55:56 +88ms service=project directory=/home/denis/Workspaces/hackathons/somnia/ember fromDirectory INFO 2025-09-05T13:55:56 +92ms service=project directory=/home/denis/Workspaces/hackathons/somnia/ember fromDirectory INFO 2025-09-05T13:55:56 +90ms service=project directory=/home/denis/Workspaces/hackathons/somnia/ember fromDirectory INFO 2025-09-05T13:55:57 +91ms service=project directory=/home/denis/Workspaces/hackathons/somnia/ember fromDirectory INFO 2025-09-05T13:55:57 +91ms service=project directory=/home/denis/Workspaces/hackathons/somnia/ember fromDirectory ... ``` And [here](https://gist.github.com/imajus/ca4975e749277ed794281a64d248290a) is a beginning of the log output after restarting with `--contunue`.
yindo closed this issue 2026-02-16 17:31:46 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Sep 5, 2025):

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

  • #1734: Esc not working on agent hangs - Similar issue with ESC not stopping hangs and requiring Ctrl+C
  • #2086: opencode --continue should not resume from subagent tasks - Also mentions --continue flag hanging behavior
  • #1207: Support a --continue flag to persist context in a new session - Related to --continue functionality
  • #854: On exit - hangs in terminal - General hanging issues after operations
  • #731: Critical Stability Issues: App Freezing & Hanging Analysis - Comprehensive analysis of hanging issues including commit-related hangs
  • #1431: opencode hangs when trying to end it - Hanging issues that require force termination

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

@github-actions[bot] commented on GitHub (Sep 5, 2025): This issue might be a duplicate of existing issues. Please check: - #1734: Esc not working on agent hangs - Similar issue with ESC not stopping hangs and requiring Ctrl+C - #2086: opencode --continue should not resume from subagent tasks - Also mentions --continue flag hanging behavior - #1207: Support a --continue flag to persist context in a new session - Related to --continue functionality - #854: On exit - hangs in terminal - General hanging issues after operations - #731: Critical Stability Issues: App Freezing & Hanging Analysis - Comprehensive analysis of hanging issues including commit-related hangs - #1431: opencode hangs when trying to end it - Hanging issues that require force termination Feel free to ignore if none of these address your specific case.
Author
Owner

@rekram1-node commented on GitHub (Sep 5, 2025):

interesting thx for raising

@rekram1-node commented on GitHub (Sep 5, 2025): interesting thx for raising
Author
Owner

@kkoch986 commented on GitHub (Sep 6, 2025):

im seeing the same thing, seems to happen on almost every file write (maybe 80% or so), seeing the same fromDirectory thing in the logs

i can see theres really only a few spots that could generate that log
https://github.com/search?q=repo%3Asst%2Fopencode%20fromDirectory&type=code

i started a new session to try again and it seems like that log is just firing all the time even when its not stuck or writing a file so idk maybe its not related

@kkoch986 commented on GitHub (Sep 6, 2025): im seeing the same thing, seems to happen on almost every file write (maybe 80% or so), seeing the same `fromDirectory` thing in the logs i can see theres really only a few spots that could generate that log https://github.com/search?q=repo%3Asst%2Fopencode%20fromDirectory&type=code i started a new session to try again and it seems like that log is just firing all the time even when its not stuck or writing a file so idk maybe its not related
Author
Owner

@kkoch986 commented on GitHub (Sep 6, 2025):

played around with it a bit more today, i seem to still have the same problem going back to v0.5.1 (havent tried going back further yet). interestingly it seems like most of the time, it makes the change then gets stuck. i have to ctr-c to get out, then opencode -c and basically prompt it to keep going which can be somewhat disruptive to whatever trajectory it was on initially

@kkoch986 commented on GitHub (Sep 6, 2025): played around with it a bit more today, i seem to still have the same problem going back to v0.5.1 (havent tried going back further yet). interestingly it seems like most of the time, it makes the change then gets stuck. i have to ctr-c to get out, then `opencode -c` and basically prompt it to keep going which can be somewhat disruptive to whatever trajectory it was on initially
Author
Owner

@randomm commented on GitHub (Sep 10, 2025):

This happens a lot to me, on two separate machines. I have always the latest release running offered and automatically installed by OC. Only thing that helps is restarting the whole machine... clearing caches seems to do nothing, nor removal of any hanged processes.

@randomm commented on GitHub (Sep 10, 2025): This happens a lot to me, on two separate machines. I have always the latest release running offered and automatically installed by OC. Only thing that helps is restarting the whole machine... clearing caches seems to do nothing, nor removal of any hanged processes.
Author
Owner

@kkoch986 commented on GitHub (Sep 10, 2025):

im noticing it seems to be working much better today in one project but still having problems in another. only things i can think of that are different:

Project it seems to work in is using Go and git
Project its not working well in is a platformio/cpp project that i have not set up a git repo for yet so theres no version control in place yet

not sure if thats helpful, ill try to gather any more info i can think of

i also noticed my opencode update to 0.6.6 this morning not sure if thats also a factor yet ill try to make some changes later in the other project and see how it goes

@kkoch986 commented on GitHub (Sep 10, 2025): im noticing it seems to be working much better today in one project but still having problems in another. only things i can think of that are different: Project it seems to work in is using Go and git Project its not working well in is a platformio/cpp project that i have not set up a git repo for yet so theres no version control in place yet not sure if thats helpful, ill try to gather any more info i can think of i also noticed my opencode update to 0.6.6 this morning not sure if thats also a factor yet ill try to make some changes later in the other project and see how it goes
Author
Owner

@rekram1-node commented on GitHub (Sep 10, 2025):

curious... @kkoch986 what happens if you create an opencode.json in the cpp project like this:

{
  "lsp": {
    "clangd": {
      "disabled": true,
    },
  },
}

and then try it again?

@rekram1-node commented on GitHub (Sep 10, 2025): curious... @kkoch986 what happens if you create an opencode.json in the cpp project like this: ```json { "lsp": { "clangd": { "disabled": true, }, }, } ``` and then try it again?
Author
Owner

@kkoch986 commented on GitHub (Sep 10, 2025):

@rekram1-node that seems to have helped!

i did test on 0.7.0 with a git repo (didnt want to live on the edge anymore and risk messing up where i was at) and it was still hanging. once i added the above config though it successfully edited a bunch of files without getting stuck.

🤞 thanks!

@kkoch986 commented on GitHub (Sep 10, 2025): @rekram1-node that seems to have helped! i did test on 0.7.0 with a git repo (didnt want to live on the edge anymore and risk messing up where i was at) and it was still hanging. once i added the above config though it successfully edited a bunch of files without getting stuck. 🤞 thanks!
Author
Owner

@rekram1-node commented on GitHub (Sep 10, 2025):

Okay perfect, I think the clangd lsp is misconfigured on our end I will try to get to fixing that this isn't the first time that's been the issue

@rekram1-node commented on GitHub (Sep 10, 2025): Okay perfect, I think the clangd lsp is misconfigured on our end I will try to get to fixing that this isn't the first time that's been the issue
Author
Owner

@rekram1-node commented on GitHub (Dec 27, 2025):

[automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!

@rekram1-node commented on GitHub (Dec 27, 2025): [automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1615