anomalyco / anomalyco/opencode

codemode: Object.values and Object.entries reject arrays

Open
#48,097 0 comments 0 reactions 1 assignee View on GitHub

@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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.