fix(core): preserve structured error messages by rekram1-node · Pull Request #33530 · anomalyco/opencode · GitHub
Skip to content

fix(core): preserve structured error messages#33530

Merged
rekram1-node merged 3 commits into
devfrom
error-rendering
Jun 23, 2026
Merged

fix(core): preserve structured error messages#33530
rekram1-node merged 3 commits into
devfrom
error-rendering

Conversation

@rekram1-node

Copy link
Copy Markdown
Collaborator

Summary

  • add one shared, non-empty renderer for unknown errors and Effect Causes
  • use it at BackgroundJob, integration status, and session tool-failure boundaries instead of squashing to .message
  • give provider, model-resolution, process, tool-output, decode, filesystem, and system-context errors meaningful derived messages
  • reuse the core renderer from the TUI while keeping diagnostic stack formatting separate

Why

Schema.TaggedErrorClass does not derive .message from structured fields. Errors such as ProviderModelNotFoundError therefore reached BackgroundJob with an empty message, producing Error for foreground tasks and an empty <task_error> for background tasks.

Verification

  • bun typecheck in packages/core
  • bun typecheck in packages/tui
  • bun typecheck in packages/opencode
  • 62 focused core tests across error rendering, BackgroundJob, process, model resolution, and tool output
  • 4 TUI error utility tests
  • 88 provider tests
  • oxlint on changed files (no new warnings)
  • git diff --check

@rekram1-node rekram1-node merged commit c17b955 into dev Jun 23, 2026
8 checks passed
@rekram1-node rekram1-node deleted the error-rendering branch June 23, 2026 23:44
JeongEEE added a commit to JeongEEE/opencode that referenced this pull request Jun 24, 2026
- permission.tsx 충돌 해결: bash 권한 title 커스텀(data.description 우선 + t().permission_shell_command i18n fallback) 유지, upstream의 하드코딩 "Shell command" 미반영
- 커스텀 보존 확인: JeongEEE URL, logo 5초 자동효과, pcode, i18n, I18nProvider 순서, SDK EventPluginRefreshed, 플러그인 자동 최신화 toast
- upstream 신규: OpenAI/opencode 통합(anomalyco#33555), 구조화된 에러 메시지 보존(anomalyco#33530) 등

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
BenGu3 pushed a commit to BenGu3/opencode that referenced this pull request Jun 27, 2026
josechifflet pushed a commit to josechifflet/opencode that referenced this pull request Jun 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant