Skip to content

有人试过用 OpenCode 分析 OpenCode 源码吗?我好像把程序搞崩了。/Has anyone tried using OpenCode to analyze its own source code? I think I ended up crashing the program. #29496

Closed as not planned

Description

@splashjump

Description

版本是最新的 1.15.10。时间2026.5.27
我拉取了 dev 分支的源码,想用 OpenCode 来分析 OpenCode 自身。用 CLI 运行的时候还算正常,但当我用 OpenCode Web 打开页面查看后,网页直接卡死,任何操作都没反应。
当时我还没意识到是 OpenCode 源码导致的问题,于是又用桌面版新建了一个工作空间,结果在问第一个问题的中途就卡死了……
最后 Web 端和桌面端都完全无法操作,只有 CLI 命令行模式还活着。
最后的解决办法是:趁 Web 刚启动还能短暂操作的那一小会儿,趁程序不注意,把 /opencode 项目的工作空间删掉,才恢复正常。

原理我猜是自己读取自己导致了某种死循环,很神必

===========================================================================

Has anyone tried using OpenCode to analyze its own source code? I think I ended up crashing the program.

Version is the latest, 1.15.10. Date: May 27, 2026.
I pulled the dev branch source code and wanted to use OpenCode to analyze OpenCode itself. Running it via CLI worked fine at first, but when I opened the OpenCode Web interface to take a look, the page completely froze—no response to any action.

At the time, I didn't realize it was the OpenCode source code causing the issue, so I tried creating a new workspace in the desktop version. Midway through asking the first question, it froze again...
Eventually, both the web version and desktop version became completely unresponsive, leaving only the CLI command-line mode still alive.

In the end, the way I resolved it was: during that brief moment when the web interface just starts up and is still barely operational—while the program wasn't paying attention—I deleted the /opencode project workspace. Only then did it return to normal.

My guess is that it's some kind of infinite loop caused by self-referential analysis. Quite mysterious.

Plugins

nothing

OpenCode version

1.15.10

Steps to reproduce

执行opencode web
使用opencode web打开opencode源码根目录
web界面卡死无法操作

桌面端同理

Screenshot and/or share link

No response

Operating System

windows10

Terminal

vscode opencode插件,vscode自带的powershell终端也有使用

Activity

  1. github-actions commented on Jul 27, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions