anomalyco / anomalyco/opencode
codemode: Object.values and Object.entries reject arrays
@neriousy is already working on this.
Since Sep 9, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
CodeMode supports arrays in Object.keys, but rejects the same arrays in Object.values and Object.entries.
Expected: these standard enumeration helpers return the array values and index-value pairs.
Actual: execution fails with Object.values expects a data object.
Tested on dev at 830d5eb5354874105cc31599635a80c1662609e8. I have a focused fix and regression test ready.
Plugins
None
OpenCode version
dev at 830d5eb5354874105cc31599635a80c1662609e8
Steps to reproduce
Run these CodeMode programs:
return Object.values(["a", "b"])
return Object.entries(["a", "b"])
Both should succeed. The first currently returns an ExecutionFailure.
Screenshot and/or share link
Not applicable. Reproduced with a unit test.
Operating System
macOS 26.5.2
Terminal
Not applicable
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.
Assessment
This issue has not been assessed yet.