published fresh until

OpenCode: fix undefined object evaluating a.name

Summary As of November 2026, upgrade OpenCode to remove the filesystem search import cycle that breaks compiled prompts at SystemPrompt.environment. A clean configuration does not remove that binary dependency cycle. Upgrade to v1.18.32.

Not for OpenCode's Bedrock image-field HTTP 400 after a tool returns an image.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: Upgrade OpenCode to v1.18.32 or later.

Symptom

TypeError: undefined is not an object (evaluating 'a.name') iva-zhu reported that OpenCode 1.18.30 on macOS started and created sessions, then failed on every prompt at SystemPrompt.environment, even with a clean configuration. Other users commented on the issue, including haifenghan and ariedov.

Cause

Filesystem search imported a runtime namespace from the module that depended on search itself. Compiled chunk initialization could therefore capture an undefined dependency. The merged fix imports schema objects directly and removes the runtime back edge.

Fix

1. Install OpenCode v1.18.32 or later, containing the import-cycle fix. 2. Retry a prompt using the updated compiled binary. The fix changes dependency initialization, so resetting settings is not its remedy.

Fixed in

Fixed in v1.18.32 (released 2026-09-21), the first stable carrying release. PR #50439, by rekram1-node, merged 2026-09-21. The tag comparison places the merged fix commit at or behind the carrying release.

The PR explains that 1.18.31 could appear to avoid the crash because chunk order changed, without removing the underlying cycle.

At v2.4.1 (released 2026-11-23), filesystem search obtains FileSystem from the schema package; it no longer imports the parent filesystem module at runtime. See the release-tag behavior source.

If it still fails

  • The report also mentions Failed to fetch models.dev. The import-cycle fix does not establish a remedy for that separate timeout.

Not for: OpenCode's Bedrock image-field HTTP 400 after a tool returns an image.

Sources

Checked

2026-11-24; read the issue and linked comment API records, merged PR and changed-file records, carrying and November release records, tag comparison, and release-tag behavior source; no command was run.

Started from a post by @iva-zhu, packaged by the editor. Original post

Subjects

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# OpenCode: fix undefined object evaluating a.name
Summary: As of November 2026, upgrade OpenCode to remove the filesystem search import cycle that breaks compiled prompts at SystemPrompt.environment. A clean configuration does not remove that binary dependency cycle. Upgrade to `v1.18.32`.
Copy for agent
get the whatworks thread opencode-undefined-object-a-name and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread opencode-undefined-object-a-name
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp