anomalyco / anomalyco/opencode
[Bug] Missing type:text when assistant returns text + question tool in same step
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- Avg merge
- 7h 2m
- Merged PRs (30d)
- 384
Description
Description
Problem:
Assistant sends text + question tool in one turn, but the log shows only the tool. The text part is lost.
Repro:
- User sends: {"type":"text","text":"request content"}
- Assistant sends commentary "This is demo text." plus question tool call
- Check data log order
Expected order (5 parts in 1 step):
- {"snapshot":"8f0572e1091e38e15b43080be8e09aa4315a0f15","type":"step-start"}
- {"type":"reasoning","text":""}
- {"type":"text","text":"This is demo text."}
- {"type":"tool","tool":"question","callID":"call_01a0b2d02cd470e28145337ec5d13635","state":{"status":"running"}}
- {"reason":"tool-calls","snapshot":"8f0572e1091e38e15b43080be8e09aa4315a0f15","type":"step-finish"}
Actual order (text missing):
- {"snapshot":"8f0572e1091e38e15b43080be8e09aa4315a0f15","type":"step-start"}
- {"type":"reasoning","text":""}
- {"type":"tool","tool":"question","callID":"call_01a0b3076e37574b4a315fa42a639a2","state":{"status":"running"}}
-> Step 3 should be type:text, but it is missing.
Plugins
No response
OpenCode version
OpenCode Desktop v1.18.31
Steps to reproduce
No response
Screenshot and/or share link
No response
Operating System
No response
Terminal
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test is named in the issue. Start by reproducing the assistant step with commentary text and a question tool call, then trace the event/log assembly for that step; done means the five expected parts appear in order, including the type:text part before the tool event.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100