Description
While working in an interactive OpenCode TUI session, the assistant repeatedly got stuck while preparing an apply_patch call. The UI briefly leaked internal/tool-preparation text such as:
Need patch lines...
~ Preparing patch...
▣ Build · GPT-5.5
No actual tool execution followed. The session returned to idle / stopped progressing.
This happened during a Windows local script editing task involving PowerShell/VBS/CMD files under a path with spaces and non-ASCII characters:
C:\\Users\\<user>\\Desktop\\<local-project>\\
I checked the local OpenCode logs and database. The relevant entries show that OpenCode recorded an interrupted/orphaned apply_patch tool call before any patch input was received:
WARN ... service=session.prompt session.id=ses_17f16cb17fferKVQxLeeY3CXO3 messageID=msg_e904b15de001uKlUuk0BC1CoZK tool=apply_patch callID=call_l3e8ODy4J0Cer9xH7QSOGC22 loop exit with orphaned interrupted tool
WARN ... service=session.prompt session.id=ses_17f16cb17fferKVQxLeeY3CXO3 messageID=msg_e905063ea001iD6jKmLWAFBd0r tool=apply_patch callID=call_zZ7xhBdiIknyy835gw1xHP1v loop exit with orphaned interrupted tool
The corresponding part.data rows in opencode.db look like this:
{
"type": "tool",
"tool": "apply_patch",
"callID": "call_l3e8ODy4J0Cer9xH7QSOGC22",
"state": {
"status": "error",
"input": {},
"raw": "",
"error": "Tool execution aborted",
"metadata": { "interrupted": true }
}
}
There were also upstream streaming errors around the same session:
AI_APICallError ... providerID=github-copilot modelID=gpt-5.5 ... cause.code=ECONNRESET ... url=https://api.githubcopilot.com/responses
ERROR ... stream error
ERROR ... error=The operation timed out
So this looks like a streamed tool call was interrupted before its arguments were complete, then OpenCode left an orphaned interrupted tool state and the TUI exposed internal preparation text instead of showing a clean error/retry state.
Related but not identical: #22222. That issue is about acpx/non-interactive mode on an older OpenCode version. This report is for the interactive TUI on Windows with OpenCode 1.15.13 and GitHub Copilot GPT-5.5, with concrete orphaned interrupted tool evidence.
One additional safety concern: earlier in the same work, the assistant mistakenly tried to use apply_patch to delete a large .wim file (~600 MB), which caused OpenCode to crash. It would be good if apply_patch refused large/binary files instead of trying to process them.
Plugins
Built-in GitHub Copilot provider/plugin. No MCP involved.
OpenCode version
1.15.13
Steps to reproduce
I do not have a minimal deterministic repro yet, but this happened multiple times in one real session.
Likely repro path:
- Start an interactive OpenCode TUI session on Windows.
- Use GitHub Copilot
gpt-5.5 with the build agent.
- Work on a local task that requires multi-file edits with
apply_patch.
- Have the model generate a relatively large/multi-file patch.
- Interrupt the network stream, wait for a Copilot timeout, or otherwise trigger a stream interruption while the model is still producing the tool-call arguments.
- Observe that the UI may show internal preparation text and no tool actually runs.
- Check logs for
loop exit with orphaned interrupted tool.
- Check
opencode.db for an apply_patch part with input:{}, raw:"", and metadata.interrupted:true.
Screenshot and/or share link
No screenshot/share link. The local logs and DB evidence above are from session ses_17f16cb17fferKVQxLeeY3CXO3.
Operating System
Windows 11 Insider / Windows NT 10.0.26200.0
Terminal
PowerShell 7 / Windows terminal environment
Description
While working in an interactive OpenCode TUI session, the assistant repeatedly got stuck while preparing an
apply_patchcall. The UI briefly leaked internal/tool-preparation text such as:Need patch lines...~ Preparing patch...▣ Build · GPT-5.5No actual tool execution followed. The session returned to idle / stopped progressing.
This happened during a Windows local script editing task involving PowerShell/VBS/CMD files under a path with spaces and non-ASCII characters:
C:\\Users\\<user>\\Desktop\\<local-project>\\I checked the local OpenCode logs and database. The relevant entries show that OpenCode recorded an interrupted/orphaned
apply_patchtool call before any patch input was received:The corresponding
part.datarows inopencode.dblook like this:{ "type": "tool", "tool": "apply_patch", "callID": "call_l3e8ODy4J0Cer9xH7QSOGC22", "state": { "status": "error", "input": {}, "raw": "", "error": "Tool execution aborted", "metadata": { "interrupted": true } } }There were also upstream streaming errors around the same session:
So this looks like a streamed tool call was interrupted before its arguments were complete, then OpenCode left an orphaned interrupted tool state and the TUI exposed internal preparation text instead of showing a clean error/retry state.
Related but not identical: #22222. That issue is about acpx/non-interactive mode on an older OpenCode version. This report is for the interactive TUI on Windows with OpenCode 1.15.13 and GitHub Copilot GPT-5.5, with concrete
orphaned interrupted toolevidence.One additional safety concern: earlier in the same work, the assistant mistakenly tried to use
apply_patchto delete a large.wimfile (~600 MB), which caused OpenCode to crash. It would be good ifapply_patchrefused large/binary files instead of trying to process them.Plugins
Built-in GitHub Copilot provider/plugin. No MCP involved.
OpenCode version
1.15.13
Steps to reproduce
I do not have a minimal deterministic repro yet, but this happened multiple times in one real session.
Likely repro path:
gpt-5.5with thebuildagent.apply_patch.loop exit with orphaned interrupted tool.opencode.dbfor anapply_patchpart withinput:{},raw:"", andmetadata.interrupted:true.Screenshot and/or share link
No screenshot/share link. The local logs and DB evidence above are from session
ses_17f16cb17fferKVQxLeeY3CXO3.Operating System
Windows 11 Insider / Windows NT 10.0.26200.0
Terminal
PowerShell 7 / Windows terminal environment