[PR #11642] fix: opencode hanging when using client.app.log() during initialization #13874

Closed
opened 2026-02-16 18:18:42 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/11642

State: closed
Merged: Yes


What does this PR do?

Fixes #7741. OpenCode plugins hang indefinitely when calling client.app.log() during plugin initialization, preventing OpenCode from starting properly. The hang happens because client.app.log calls the server /log route, and the server middleware wrapped every request in Instance.provide, which triggers InstanceBootstrap → Plugin.init → your plugin → client.app.log again. That creates a circular dependency during startup. The change skips Instance.provide for /log, so /log no longer bootstraps the instance or plugins to fix it.

How did you verify your code works?

image
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/11642 **State:** closed **Merged:** Yes --- ### What does this PR do? Fixes #7741. OpenCode plugins hang indefinitely when calling `client.app.log()` during plugin initialization, preventing OpenCode from starting properly. The hang happens because client.app.log calls the server /log route, and the server middleware wrapped every request in Instance.provide, which triggers InstanceBootstrap → Plugin.init → your plugin → client.app.log again. That creates a circular dependency during startup. The change skips Instance.provide for /log, so /log no longer bootstraps the instance or plugins to fix it. ### How did you verify your code works? <img width="1091" height="66" alt="image" src="https://github.com/user-attachments/assets/3626e732-87ea-4a6a-9e38-d008b700debc" />
yindo added the pull-request label 2026-02-16 18:18:42 -05:00
yindo closed this issue 2026-02-16 18:18:42 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#13874