Skip to content

fix: capture claude-cli stream errors and surface real error to user#885

Open
henkedk wants to merge 5 commits intonextlevelbuilder:mainfrom
henkedk:fix/claude-cli-stream-error-capture
Open

fix: capture claude-cli stream errors and surface real error to user#885
henkedk wants to merge 5 commits intonextlevelbuilder:mainfrom
henkedk:fix/claude-cli-stream-error-capture

Conversation

@henkedk
Copy link
Copy Markdown
Contributor

@henkedk henkedk commented Apr 13, 2026

Fixes #884

Claude-cli reports API errors via stdout stream-json, not stderr. The error events were silently discarded — users saw generic 'something went wrong' instead of the real error.

Fix: parse is_error/error fields from stream events, use captured stream error when stderr is empty, classify 'usage limit' as rate-limit for proper user messaging.

Jens Henke added 5 commits April 13, 2026 10:38
Re-applied 4 local patches not yet upstream:
- NoSandbox browser option (3 files)
- Telegram Groups config wiring from DB
- SharedKG context injection in bridge middleware
- Softer confidentiality rules for owner diagnostics
- bridge_server.go: remove BridgeToolNames allowlist, register all tools from registry
- message.go: add buildMessageOutMeta for forum topic/thread routing in proactive messages
- agents.go: restrict_to_workspace comment fix from stash
…routing

- team_tasks_lifecycle.go executeComplete: read local_key from task metadata
  instead of member agent context (which doesn't have the originating topic key)
- gateway_consumer_post_turn.go: extract taskLocalKey from task metadata and
  include WithLocalKey in all three auto-complete/auto-fail broadcasts
  (agent error, loop-detector kill, auto-complete)
Previously task_number was scoped per (team_id, chat_id), allowing duplicate
numbers across different chats in the same team. Fixed to be unique per team.

- pg/teams_tasks.go: MAX query now uses WHERE team_id = $1 only
- sqlitestore/teams_tasks.go: same fix for SQLite
- migrations/000050: deduplicate existing rows + add UNIQUE(team_id, task_number)
- sqlitestore/schema.sql: add idx_tt_team_number unique index
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