Skip to content

feat(errors): explain reply failures with actions - #94

Merged
nixuuu merged 1 commit into
fix/bots-wizard-refreshfrom
feat/reply-error-classes
Nov 4, 2026
Merged

nixuuu merged 1 commit into
fix/bots-wizard-refreshfrom
feat/reply-error-classes

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 4, 2026

Copy link
Copy Markdown
Member

Thread and bot reply failures now say what went wrong and what to do.

  • Stable failure classes travel alongside native turn codes (proto additive) from Claude, Codex and Grok harnesses and from bots: not signed in / expired login, configuration, model unavailable, usage limit, proxy/endpoint, network, cut-off stream, process exit, internal.
  • Thread and bot error rows share one component with the matching action (Sign in, Open provider settings, Change model, Test connection, Retry) and redacted, copyable details.
  • Bot error codes and sources are persisted.
  • Grok bot "answer got cut off": documented the investigation of the direct-API path (to be replaced by harness-run bots) and removed its fixed completion cap; the exact nightly failure is not confirmed.

Checks for both PRs: install, gen:check, typecheck, lint, format:check, check:tmp (1,040 pass, 152 skip, 0 fail), web build; browser checked light/dark at desktop and phone widths.

Refs: d14cc36

Carry stable failure classes alongside native turn codes, persist bot error codes and sources, and share actionable thread and bot error rows with redacted copyable details. Preserve Grok ACP failures and document the direct API investigation; remove its fixed completion cap.

Validate representative auth, model, usage, process and connection failures across gateway, worker and bot APIs, including provider invalidation and current-connection eligibility.

Refs: d14cc36
@nixuuu
nixuuu added this pull request to stack #95 November 4, 2026 20:18
@nixuuu
nixuuu marked this pull request as ready for review November 4, 2026 20:21
@nixuuu
nixuuu merged commit fb6c455 into dev Nov 4, 2026
9 checks passed
@nixuuu
nixuuu deleted the feat/reply-error-classes branch November 4, 2026 20:21
nixuuu added a commit that referenced this pull request Nov 4, 2026
)

Stage 3 (final) of bots on official harnesses, on top of #104.

- **Errors:** harness failures in bot turns (Claude SDK, Codex
app-server, Grok ACP: not signed in / expired login, missing CLI, model
not found, usage limit, proxy/endpoint, network, process exit, cut-off
stream, worker offline, pinned worker without the bot's instance) map
onto the shared reply error classes from #94, with actions in the bot
conversation: sign in on that worker, open provider settings, change
model, pick another worker ("Runs on"), retry, show details. Reuses the
thread turn error codes.
- **Runtime switch finished:** regression pass over routines/schedules,
handoffs, wakeups, connectors through the bus, create-bot, approvals,
multi-bot mentions and bot settings. Fixed: Grok `create_bot`, Claude
assistant errors, Codex startup recovery.
- **Runs on:** defaults confirmed (desktop local mode → its own worker;
server → first eligible worker) with guidance when no worker has the
bot's provider.
- Migration `0071`, docs updated.

Checks: install, gen:check, typecheck, lint, format:check, check:tmp
(1106 pass, 154 skip, 0 fail), web build; merges cleanly into current
dev. Paid live tests and native shells not run; the mobile app keeps its
generic failure bubble.

Draft until the stack merges.
nixuuu added a commit that referenced this pull request Nov 12, 2026
nixuuu added a commit that referenced this pull request Nov 12, 2026
nixuuu added a commit that referenced this pull request Nov 12, 2026
nixuuu added a commit that referenced this pull request Nov 12, 2026
Retrying a failed turn now sends exactly **Continue**, without copying
the original request into the user bubble. Once a later turn starts, the
older failure becomes a compact title and **Show details** entry. Its
explanation, hints, recovery actions and retry feedback disappear
immediately, using the existing feed anchoring without a height
animation. Queued messages do not hide actions before dispatch.

Mobile gets the same compact historical failure entry through JS-only
changes. It already has no retry/settings buttons in thread failure
cards. No native configuration or dependencies changed.

## Session recovery

Existing provider sessions retain their own context. The worker saves
the latest substantive request privately in its SQLite journal,
surviving event ACKs and restarts. If Retry needs a fresh Codex session
because its rollout is missing, or a fresh Claude session because its
transcript is missing, the request is supplied as developer/system
context with a reminder to inspect completed side effects. The user
message stays **Continue**. Grok requires a successful session load and
has no silent empty-session fallback.

This fallback restores the saved request, not a complete lost provider
transcript. Requests predating this worker change have no private
recovery copy.

## Validation

- Rebased onto `dev` at `a73e5c1bf`. Resolved the mobile `TimelineTurn`
conflict by retaining #554's `TimelineDisclosure`, UI-thread anchoring
and local group state. Historical failure state now passes through
`ThreadTimeline`'s memoized cell, including its equality check, so an
older card updates when a new turn starts. Web retains #554's
`VirtualFeed.keep` behavior for the latest summary. No disclosure or
motion changes were reverted.
- `bun install` and `bun run gen:check` pass on the final head. Focused
worker tests pass: **5 tests, 28 assertions**, covering native session
resumption, missing-rollout recovery, journal ACKs/restarts, repeated
retries, request replacement and thread isolation. The emitted user
message is exactly **Continue** and excludes the prior request. No web
UI tests added.
- After conflict resolution, `bun run format`, `bun run lint`, mobile
typecheck, `bun install`, generated-code checks and the 5 focused tests
pass. GitHub CI runs the final head's static checks, build and full test
shards. The full local `check:tmp` was not repeated, as requested.
- Real-browser review used an isolated gateway/PostgreSQL fixture,
scripted worker, and the real web BFF/SSE. Checked light and dark at
**1440 × 900** and **390 × 844**: initial failure recovery actions;
Retry bubble exactly **Continue**; compact historical failure during
streaming; latest failure retaining actions; and working **Show
details**. Sending an ordinary new message also removes older actions.
No horizontal overflow. Frame sampling around Retry kept the failure
title at **y = 212 px** while its card changed directly from **148 px to
56 px**, with no intermediate height animation. Navigation cancellation
logged a thread-watch warning; subsequent streams and sends succeeded.
- EAS production-profile fingerprints match final head and `dev`,
generated with identical checkout paths and installed dependencies: iOS
**`6ddec9ef559ee0095ac33e94ff9418a942053b17`**, Android
**`5f6eae3ab278f1cd543e9ed763f923a319b65ec9`**. No native-device visual
review is claimed. The browser tab, web server, gateway and disposable
database were stopped after review.
- Repeated the real-browser failure-card check after conflict resolution
at 1280 × 800 light and 390 × 844 dark: **Continue** only, compact older
cards during a new turn/streaming, working details, latest failure
recovery actions, and no horizontal overflow. Recomputed both EAS
fingerprints against this new base; both hashes above remain identical.
All disposable processes and the browser tab were stopped again.

## Copy audit — docs/copy.md §8

- **Continue the previous request after the failed turn. Check what was
already done before repeating anything with side effects. Previous
request: <original prompt>** → **Continue**. One imperative, one word,
sentence case, no duplicated request or internal jargon in the user
bubble.
- Reused **Could not finish this turn**, **Show details**, **Copy error
details** and existing action labels. Historical failures stop asking
for action after work resumes; technical details remain available on
demand. No new glossary terms, empty states, confirmations, duplicate
facts or humor. Text supplies meaning independently of color or icons.
- Visual copy audit: checked the short **Continue** bubble, a multiline
original request, and wrapping failure explanation/action labels at
desktop and phone widths, light and dark. Changed failure copy contains
no interpolated user names. Existing long labels stay within the phone
width; historical entries retain their title and disclosure.

History inspection (`git log -S`) identifies #94 as the source of the
long Retry message. #530 changed failure grouping/presentation but did
not introduce that text.

Fixes: #94
Related: #530
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