Skip to content

Make failed Sessions actionable - #699

Merged
SaladDay merged 3 commits into
mainfrom
make-failed-sessions-actionable
Oct 14, 2026
Merged

SaladDay merged 3 commits into
mainfrom
make-failed-sessions-actionable

Conversation

@SaladDay

@SaladDay SaladDay commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

What

  • Failure reasons and next steps. Each diagnostics code now has a specific reason and, where one exists, one concrete next step that holds for every Session kind and deployment.
    • invalid_request reads "The model provider rejected the request. Check the model and parameters, starting with the model on the Session page." It does not claim the model ID is wrong, because Codex also reports some of its own errors as badRequest.
    • authentication_error, connection_failed, invalid_request, resource_not_found and harness_error add where the model provider comes from: "Without a model provider set on the Session or its saved Agent, a hosted sandbox Session uses the default in Settings → Models and credentials". A self-hosted Session never uses that default.
    • runtime_unavailable and runtime_disconnected read "Retry later. For a self-hosted Session, check Host connection on the Session page; for a hosted sandbox Session, check Settings → Sandbox and scheduling". This holds for E2B too, which has no nodes.
    • cyber_policy gets a next step, and model_provider_required names the Session, its saved Agent and the hosted default.
    • The Session page shows the reason and then the next step. List rows show only the reason, with the full text in the tooltip.
    • Provider observations in Settings → Models and credentials show the reason alone, because the next steps are Session-centric.
    • harness_error is kept for unclassified failures only, and its copy says Core does not show the Harness's own message.
    • Copy uses the pages' exact names: "Model provider", "API key" / "API 密钥", "Base URL", "Host connection" / "主机连接", and "Needs attention" / "需要处理".
  • Overview "Needs attention".
    • The section is bounded to Sessions active in the existing 24-hour activity window, and the tile counts the same set ("Last 24 hours: N failed, M waiting for caller").
    • The tile and the section header carry the page's existing Partial chip when a project's Session read failed or hit its cap. The chip's help names the projects. On a narrow tile, it wraps under the label.
    • Each row shows the Session name, when it was last active, a one-line classified reason, and a link to the Session.
    • When the window is empty, the section says "Nothing needs attention", plus how many older attention Sessions are in the Session log.
    • The loader no longer reads past the window to find old attention Sessions.
  • Session names. lib/session-title.ts holds the single fallback rule: metadata title, then the Agent's name, then "Untitled Session" / "未命名 Session". It is used on Overview, the Session log, the Session page and Sandbox metrics. This replaces three local copies and two per-page "untitled" strings.
  • Docs. apps/web/PRODUCT.md, docs/web/index.md and docs/web/console-api-usage.md (EN+zh, source_hash refreshed) describe the 24-hour bound, the partial qualification, the reason plus next step, and the naming rule.

No new route, field, setting or stored state. The only new names are locale keys: diagnostics.next.*, diagnostics.sentenceGap (en " ", zh ""), common.untitledSession and overview.attention.emptyOlder*.

Why

On mx, an operator who opened a failed Session saw "the Harness did not report a reason" with no next step, even for a plain unknown-model rejection. The attention list mixed in failures from days ago. Untitled Sessions also got different fallback names on different pages.

#694 makes Codex report that rejection as invalid_request. This PR makes Web say what that means and what to check. The two PRs are independent.

The Harness or provider message stays out of Web. The session-diagnostics contract keeps native text out of diagnostics, and the public Session error is fixed text. Instead, the harness_error copy says that Core does not show the message.

Verification

  • pnpm --filter @oac/web typecheck: pass.
  • vitest run on the sessions, overview, metrics, i18n, lib and provider-observations tests: 31 files and 191 tests pass. The diagnostics test checks exact en and zh text for invalid_request, and the runtime_unavailable and connection_failed 502 steps. It also checks harness_error, and that truncated rows keep the next step in the tooltip. The Overview tests cover attention filtering by the window.
  • Playwright e2e/diagnostics.spec.ts, e2e/overview-readiness.spec.ts and e2e/provider-observations.spec.ts, against the fixture with bundled Chromium: 14 passed. The partial-refresh test now also checks the Partial chip on the Needs attention tile and section.
  • Website build plus pnpm test (22 tests, including the translation, source_hash and link guards): pass.
  • make check-names check-docs: pass.
  • Visual check against the fixture in zh and en at 1440 px and 390 px. Scenarios: Overview with recent attention Sessions, with only older ones, and with one project's Session read failing; the Session page; and the Session log filtered to Failed. Diagnostics codes were injected by route interception, because the fixture always returns internal_error.

Skipped

  • Full make check: skipped under the focused-checks rule.
  • The rest of the local Playwright suite: skipped. CI runs it.
  • Live check against a Core deployment: skipped. The mx deployment is read-only for this lane.

@blacksmith-sh

This comment has been minimized.

@SaladDay
SaladDay force-pushed the make-failed-sessions-actionable branch from 6202f70 to 2c3e78d Compare October 14, 2026 06:59
@SaladDay
SaladDay merged commit 5dbf400 into main Oct 14, 2026
17 checks passed
@SaladDay
SaladDay deleted the make-failed-sessions-actionable branch October 14, 2026 07:08
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