Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go

fix(i18n): localize task failure reasons [MUL-6565] (#7459)

iiwish9ecc6787b068
diff --git a/packages/views/agents/agents-i18n-parity.test.ts b/packages/views/agents/agents-i18n-parity.test.ts
index f1ecc4a898..7cf478a920 100644
--- a/packages/views/agents/agents-i18n-parity.test.ts
+++ b/packages/views/agents/agents-i18n-parity.test.ts
@@ -4,9 +4,36 @@ import en from "../locales/en/agents.json";
import zhHans from "../locales/zh-Hans/agents.json";
import ja from "../locales/ja/agents.json";
import ko from "../locales/ko/agents.json";
+import { FAILURE_REASON_I18N_KEYS } from "./components/tabs/task-failure";
const LOCALES = { en, "zh-Hans": zhHans, ja, ko } as const;
+describe("task failure reason i18n parity across all 4 locales", () => {
+ const expectedKeys = Object.values(FAILURE_REASON_I18N_KEYS).toSorted();
+
+ it("covers every mapped reason with the exact same key set", () => {
+ for (const [name, locale] of Object.entries(LOCALES)) {
+ expect(
+ Object.keys(locale.task_failure.reasons).toSorted(),
+ `${name}: task_failure.reasons keys drifted`,
+ ).toEqual(expectedKeys);
+ }
+ });
+
+ it("keeps every failure label and the system-cancel fallback non-empty", () => {
+ for (const [name, locale] of Object.entries(LOCALES)) {
+ expect(
+ locale.task_failure.cancelled_by_system.length,
+ `${name}: task_failure.cancelled_by_system is empty`,
+ ).toBeGreaterThan(0);
+ for (const [key, label] of Object.entries(locale.task_failure.reasons)) {
+ expect(typeof label, `${name}: ${key} is not a string`).toBe("string");
+ expect(label.length, `${name}: ${key} is empty`).toBeGreaterThan(0);
+ }
+ }
+ });
+});
+
/**
* Verify new access-scope / bulk-access keys are present in every locale
* with the same key set. This prevents silent regressions where one locale
diff --git a/packages/views/agents/components/tabs/activity-tab.tsx b/packages/views/agents/components/tabs/activity-tab.tsx
index e4f415d26a..9072a4996a 100644
--- a/packages/views/agents/components/tabs/activity-tab.tsx
+++ b/packages/views/agents/components/tabs/activity-tab.tsx
@@ -585,15 +585,15 @@ function TaskRow({
// Failure reason. The back-end emits "" on non-failed tasks (omitempty
// strips it on the wire) so the truthy guard is the right shape.
- // failureReasonLabel takes the raw open string — the taxonomy has 21
- // values and grows, so there is no enum to cast to. Cancelled rows get a
+ // failureReasonLabel takes the raw open string because the taxonomy grows,
+ // so there is no enum to cast to. Cancelled rows get a
// label only when the SERVER cancelled them for a persisted reason
// (worktree claim gate, preserved-work delivery); a user's own cancel
// stays a plain "Cancelled".
const failureLabel =
task.status === "failed"
- ? failureReasonLabel(task.failure_reason)
- : cancelReasonLabel(task);
+ ? failureReasonLabel(task.failure_reason, t)
+ : cancelReasonLabel(task, t);
// Only show duration for terminal rows. An active row's duration is
// inferred from the timeText already ("Started 2m ago") and adding a
diff --git a/packages/views/agents/components/tabs/task-failure.test.ts b/packages/views/agents/components/tabs/task-failure.test.ts
index db2fdef05f..416c296424 100644
--- a/packages/views/agents/components/tabs/task-failure.test.ts
+++ b/packages/views/agents/components/tabs/task-failure.test.ts
@@ -1,7 +1,39 @@
// @vitest-environment node
+import type { TFunction } from "i18next";
+import { createI18n } from "@multica/core/i18n/react";
+import type { SupportedLocale } from "@multica/core/i18n";
import { describe, expect, it } from "vitest";
+import enAgents from "../../../locales/en/agents.json";
+import jaAgents from "../../../locales/ja/agents.json";
+import koAgents from "../../../locales/ko/agents.json";
+import zhHansAgents from "../../../locales/zh-Hans/agents.json";
-import { cancelReasonLabel, failureReasonLabel } from "./task-failure";
+import {
+ FAILURE_REASON_I18N_KEYS,
+ cancelReasonLabel,
+ failureReasonLabel,
+} from "./task-failure";
+
+const AGENT_RESOURCES = {
+ en: enAgents,
+ "zh-Hans": zhHansAgents,
+ ja: jaAgents,
+ ko: koAgents,
+} as const;
+
+function fixedT(locale: SupportedLocale): TFunction<"agents"> {
+ const resources =
+ locale === "en"
+ ? { en: { agents: enAgents } }
+ : {
+ en: { agents: enAgents },
+ [locale]: { agents: AGENT_RESOURCES[locale] },
+ };
+ const i18n = createI18n(locale, resources);
+ return i18n.getFixedT(locale, "agents") as TFunction<"agents">;
+}
+
+const enT = fixedT("en");
// cancelReasonLabel decides which cancelled rows explain themselves. The rule
// it must hold: a SERVER-cancelled row (persisted reason) reads like a failed
@@ -9,48 +41,132 @@ import { cancelReasonLabel, failureReasonLabel } from "./task-failure";
// would bury the rows that actually need the user to act.
describe("cancelReasonLabel", () => {
it("returns null for a user-initiated cancel", () => {
- expect(cancelReasonLabel({ status: "cancelled", error: null, failure_reason: null })).toBeNull();
+ expect(
+ cancelReasonLabel(
+ { status: "cancelled", error: null, failure_reason: null },
+ enT,
+ ),
+ ).toBeNull();
});
it("only ever labels cancelled rows — failed rows have their own path", () => {
expect(
- cancelReasonLabel({ status: "failed", error: "boom", failure_reason: "timeout" }),
+ cancelReasonLabel(
+ { status: "failed", error: "boom", failure_reason: "timeout" },
+ enT,
+ ),
).toBeNull();
});
it("labels the worktree claim gate's cancellation", () => {
expect(
- cancelReasonLabel({
- status: "cancelled",
- error: "worktree mode needs daemon version 0.4.24 or newer",
- failure_reason: "local_directory_error",
- }),
+ cancelReasonLabel(
+ {
+ status: "cancelled",
+ error: "worktree mode needs daemon version 0.4.24 or newer",
+ failure_reason: "local_directory_error",
+ },
+ enT,
+ ),
).toBe("Local directory error");
});
- it("falls back to a generic system label when only error text was persisted", () => {
- expect(
- cancelReasonLabel({
- status: "cancelled",
- error: "work preserved in the worktree at /env/worktree",
- failure_reason: null,
- }),
- ).toBe("Cancelled by the system");
+ it("localizes a generic system cancellation in every supported locale", () => {
+ const expected: Record<SupportedLocale, string> = {
+ en: "Cancelled by the system",
+ "zh-Hans": "系统已取消",
+ ja: "システムによってキャンセルされました",
+ ko: "시스템에서 취소함",
+ };
+
+ for (const locale of Object.keys(expected) as SupportedLocale[]) {
+ expect(
+ cancelReasonLabel(
+ {
+ status: "cancelled",
+ error: "work preserved in the worktree at /env/worktree",
+ failure_reason: null,
+ },
+ fixedT(locale),
+ ),
+ ).toBe(expected[locale]);
+ }
});
});
describe("failureReasonLabel", () => {
- it("explains a runtime that never returned during reconnect grace", () => {
- expect(failureReasonLabel("runtime_reconnect_timeout")).toBe(
- "Daemon did not reconnect in time",
+ it("renders every known reason through i18n in every supported locale", () => {
+ for (const locale of Object.keys(AGENT_RESOURCES) as SupportedLocale[]) {
+ const t = fixedT(locale);
+ for (const reason of Object.keys(FAILURE_REASON_I18N_KEYS)) {
+ const label = failureReasonLabel(reason, t);
+ expect(label, `${locale}: ${reason}`).not.toBe(reason);
+ expect(label, `${locale}: ${reason}`).not.toContain("task_failure.");
+ expect(label, `${locale}: ${reason}`).not.toBe("");
+ }
+ }
+ });
+
+ it("covers platform reasons added after the original hardcoded map", () => {
+ expect(failureReasonLabel("invalid_task_identity", enT)).toBe(
+ "Task identity mismatch",
+ );
+ expect(failureReasonLabel("issue_window_restricted", enT)).toBe(
+ "Issue unavailable under workspace limits",
+ );
+ });
+
+ it("covers operational reasons emitted outside the canonical taxonomy", () => {
+ expect(failureReasonLabel("agent_fallback_message", enT)).toBe(
+ "Agent returned a fallback message",
+ );
+ expect(failureReasonLabel("idle_watchdog", enT)).toBe(
+ "Agent stopped after inactivity",
+ );
+ expect(failureReasonLabel("cancelled", enT)).toBe(
+ "Cancelled by the system",
+ );
+ });
+
+ it("localizes the legacy user cancellation value retained by the service", () => {
+ expect(failureReasonLabel("user_cancelled", enT)).toBe(
+ "Cancelled by user",
);
});
- it("covers the local_directory bucket the worktree paths write", () => {
- expect(failureReasonLabel("local_directory_error")).toBe("Local directory error");
+ it("uses native copy for representative refined reasons", () => {
+ expect(
+ failureReasonLabel(
+ "agent_error.provider_quota_limit",
+ fixedT("zh-Hans"),
+ ),
+ ).toBe("提供商配额已用尽");
+ expect(
+ failureReasonLabel("agent_error.context_overflow", fixedT("ja")),
+ ).toBe("コンテキストウィンドウを超過しました");
+ expect(
+ failureReasonLabel("agent_error.missing_config", fixedT("ko")),
+ ).toBe("API 키 또는 설정 누락");
});
it("still falls back to the raw wire value for unknown reasons", () => {
- expect(failureReasonLabel("brand_new_reason")).toBe("brand_new_reason");
+ for (const locale of Object.keys(AGENT_RESOURCES) as SupportedLocale[]) {
+ expect(failureReasonLabel("brand_new_reason", fixedT(locale))).toBe(
+ "brand_new_reason",
+ );
+ }
+ });
+
+ it.each(["constructor", "toString", "__proto__"])(
+ "treats inherited Object property %s as an unknown wire value",
+ (reason) => {
+ expect(failureReasonLabel(reason, enT)).toBe(reason);
+ },
+ );
+
+ it("returns null when the server supplied no reason", () => {
+ expect(failureReasonLabel(null, enT)).toBeNull();
+ expect(failureReasonLabel(undefined, enT)).toBeNull();
+ expect(failureReasonLabel("", enT)).toBeNull();
});
});
diff --git a/packages/views/agents/components/tabs/task-failure.ts b/packages/views/agents/components/tabs/task-failure.ts
index 175ac8dfa1..6f7a61225e 100644
--- a/packages/views/agents/components/tabs/task-failure.ts
+++ b/packages/views/agents/components/tabs/task-failure.ts
@@ -1,93 +1,97 @@
-// Human-readable copy for the back-end task failure reason. Surfaced in the
-// agent detail Recent Work list and the issue execution log — the two places
-// the front-end exposes failure_reason directly to the user, and the
-// destination the Usage page's Errors breakdown drills into.
-//
-// Lives next to the consuming tab (rather than in agents/presence) because
-// failed tasks no longer have a top-level workload state; failure context
-// is purely a detail-page concern now.
-//
-// Covers the canonical taxonomy in server/pkg/taskfailure — platform-side
-// reasons plus 14 `agent_error.*` sub-reasons — and the pre-MUL-1949 coarse
-// values still present on historical rows. This used to be a
-// `Record<TaskFailureReason, string>` indexed with a cast, which silently
-// resolved to `undefined` for every refined reason the backend has written
-// since MUL-1949: a task that failed on a provider 401 rendered no reason
-// at all.
-const REASON_LABEL: Record<string, string> = {
+import type { useT } from "../../../i18n";
+
+type AgentsT = ReturnType<typeof useT<"agents">>["t"];
+
+// Stable translation keys for the canonical server taxonomy, provider-specific
+// operational reasons, and coarse values still present on historical rows.
+// The wire value remains an open string: clients can meet a newer reason than
+// they know, and failureReasonLabel deliberately falls back to that raw value.
+export const FAILURE_REASON_I18N_KEYS = {
// Platform / scheduler side.
- queued_expired: "Expired in queue",
- runtime_offline: "Daemon offline",
- runtime_reconnect_timeout: "Daemon did not reconnect in time",
- runtime_recovery: "Daemon restarted",
- timeout: "Task timed out",
- iteration_limit: "Hit the iteration limit",
- agent_blocked: "Waiting on human input",
- api_invalid_request: "Rejected by the model API",
- skill_bundle_unavailable: "Couldn't download the agent's skills",
- runtime_cli_timeout: "Local runtime CLI timed out",
+ queued_expired: "queued_expired",
+ runtime_offline: "runtime_offline",
+ runtime_reconnect_timeout: "runtime_reconnect_timeout",
+ runtime_recovery: "runtime_recovery",
+ timeout: "timeout",
+ iteration_limit: "iteration_limit",
+ agent_blocked: "agent_blocked",
+ api_invalid_request: "api_invalid_request",
+ skill_bundle_unavailable: "skill_bundle_unavailable",
+ runtime_cli_timeout: "runtime_cli_timeout",
+ invalid_task_identity: "invalid_task_identity",
+ issue_window_restricted: "issue_window_restricted",
// Agent process side — provider.
- "agent_error.provider_auth_or_access": "Provider auth failed",
- "agent_error.provider_quota_limit": "Provider quota exhausted",
- "agent_error.provider_capacity_or_rate_limit": "Rate limited by provider",
- "agent_error.provider_server_error": "Provider server error",
- "agent_error.provider_network": "Network error reaching provider",
+ "agent_error.provider_auth_or_access":
+ "agent_error_provider_auth_or_access",
+ "agent_error.provider_quota_limit": "agent_error_provider_quota_limit",
+ "agent_error.provider_capacity_or_rate_limit":
+ "agent_error_provider_capacity_or_rate_limit",
+ "agent_error.provider_server_error": "agent_error_provider_server_error",
+ "agent_error.provider_network": "agent_error_provider_network",
// Agent process side — agent / runner.
- "agent_error.process_failure": "Agent process crashed",
- "agent_error.empty_or_unparseable_output": "Agent returned no usable output",
- "agent_error.agent_timeout": "Agent timed out",
- "agent_error.context_overflow": "Context window exceeded",
- "agent_error.missing_config": "Missing API key or configuration",
- "agent_error.model_not_found_or_unavailable": "Model unavailable",
- "agent_error.runtime_version_unsupported": "Runner CLI version unsupported",
- "agent_error.runtime_missing_executable": "Runner CLI not installed",
- "agent_error.unknown": "Agent execution error",
+ "agent_error.process_failure": "agent_error_process_failure",
+ "agent_error.empty_or_unparseable_output":
+ "agent_error_empty_or_unparseable_output",
+ "agent_error.agent_timeout": "agent_error_agent_timeout",
+ "agent_error.context_overflow": "agent_error_context_overflow",
+ "agent_error.missing_config": "agent_error_missing_config",
+ "agent_error.model_not_found_or_unavailable":
+ "agent_error_model_not_found_or_unavailable",
+ "agent_error.runtime_version_unsupported":
+ "agent_error_runtime_version_unsupported",
+ "agent_error.runtime_missing_executable":
+ "agent_error_runtime_missing_executable",
+ "agent_error.unknown": "agent_error_unknown",
- // Provider-specific operational reasons, outside the canonical taxonomy.
- codex_resume_oversized: "Session too large to resume",
- local_directory_error: "Local directory error",
+ // Daemon operational reasons, outside the canonical taxonomy.
+ agent_fallback_message: "agent_fallback_message",
+ codex_semantic_inactivity: "codex_semantic_inactivity",
+ codex_resume_oversized: "codex_resume_oversized",
+ idle_watchdog: "idle_watchdog",
+ local_directory_error: "local_directory_error",
+ cancelled: "cancelled",
// Pre-MUL-1949 coarse values, still present on historical rows.
- agent_error: "Agent execution error",
- codex_semantic_inactivity: "Codex semantic inactivity timeout",
- manual: "Cancelled by user",
-};
+ agent_error: "agent_error",
+ manual: "manual",
+ user_cancelled: "user_cancelled",
+} as const;
+
+type KnownFailureReason = keyof typeof FAILURE_REASON_I18N_KEYS;
/**
- * Label for a `failure_reason`, or `null` when there is nothing to show.
- *
- * `failure_reason` is an open string, not a closed enum: the taxonomy grows
- * as classifier rules land, and an installed desktop client will meet
- * reasons its build predates. Those fall back to the raw wire value rather
- * than to nothing — machine-y, but truthful, and it is the exact string an
- * operator would paste into a log search.
+ * Localized label for a `failure_reason`, or `null` when there is nothing to
+ * show. Unknown values remain raw so an older installed client degrades
+ * truthfully when a newer backend adds a reason.
*/
export function failureReasonLabel(
reason: string | null | undefined,
+ t: AgentsT,
): string | null {
if (!reason) return null;
- return REASON_LABEL[reason] ?? reason;
+ if (!Object.prototype.hasOwnProperty.call(FAILURE_REASON_I18N_KEYS, reason)) {
+ return reason;
+ }
+ const key = FAILURE_REASON_I18N_KEYS[reason as KnownFailureReason];
+ return t(($) => $.task_failure.reasons[key]);
}
/**
- * Label for a cancelled task the SERVER cancelled for a persisted reason —
- * the worktree claim gate refusing a too-old daemon, or a cancel-ack carrying
- * a preserved-work error. Those are conditions only the user can fix, so the
- * row must explain itself like a failed row does.
- *
- * Returns `null` for a user-initiated cancel (no persisted reason): the user
- * knows why they clicked, and stamping a label on every ordinary cancel would
- * bury the rows that actually need attention.
+ * Label for a cancelled task the server cancelled for a persisted reason.
+ * User-initiated cancellation has no reason and stays unlabeled.
*/
-export function cancelReasonLabel(task: {
- status: string;
- error?: string | null;
- failure_reason?: string | null;
-}): string | null {
+export function cancelReasonLabel(
+ task: {
+ status: string;
+ error?: string | null;
+ failure_reason?: string | null;
+ },
+ t: AgentsT,
+): string | null {
if (task.status !== "cancelled") return null;
- const reason = failureReasonLabel(task.failure_reason);
+ const reason = failureReasonLabel(task.failure_reason, t);
if (reason) return reason;
- return task.error ? "Cancelled by the system" : null;
+ return task.error ? t(($) => $.task_failure.cancelled_by_system) : null;
}
diff --git a/packages/views/common/task-transcript/agent-transcript-dialog.test.tsx b/packages/views/common/task-transcript/agent-transcript-dialog.test.tsx
index 0b31d7513c..cd62e46cd4 100644
--- a/packages/views/common/task-transcript/agent-transcript-dialog.test.tsx
+++ b/packages/views/common/task-transcript/agent-transcript-dialog.test.tsx
@@ -6,6 +6,7 @@ import userEvent from "@testing-library/user-event";
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import type { ButtonHTMLAttributes, ReactNode } from "react";
import { api } from "@multica/core/api";
+import type { SupportedLocale } from "@multica/core/i18n";
import type { AgentRuntime, AgentTask } from "@multica/core/types/agent";
import { useTranscriptViewStore } from "@multica/core/agents/stores";
import { renderWithI18n } from "../../test/i18n";
@@ -210,7 +211,11 @@ const items: TimelineItem[] = [
function renderDialog(
dialogItems: TimelineItem[] = items,
- options: { task?: AgentTask; isLive?: boolean } = {},
+ options: {
+ task?: AgentTask;
+ isLive?: boolean;
+ locale?: SupportedLocale;
+ } = {},
) {
return renderWithI18n(
<AgentTranscriptDialog
@@ -221,6 +226,7 @@ function renderDialog(
agentName="Codex"
isLive={options.isLive}
/>,
+ { locale: options.locale },
);
}
@@ -813,6 +819,23 @@ describe("AgentTranscriptDialog — cancel reason", () => {
expect(screen.getByText(gateError)).toBeInTheDocument();
});
+ it("renders a server cancellation reason in the active locale", () => {
+ renderDialog(items, {
+ locale: "zh-Hans",
+ task: {
+ ...baseTask,
+ status: "cancelled",
+ error: gateError,
+ failure_reason: "local_directory_error",
+ },
+ });
+
+ expect(screen.getByText(/本地目录出错/)).toBeInTheDocument();
+ expect(
+ screen.queryByText(/Local directory error/),
+ ).not.toBeInTheDocument();
+ });
+
it("keeps a user-initiated cancel a plain Cancelled", () => {
renderDialog(items, {
task: { ...baseTask, status: "cancelled", error: null },
diff --git a/packages/views/common/task-transcript/agent-transcript-dialog.tsx b/packages/views/common/task-transcript/agent-transcript-dialog.tsx
index c329908914..dd47e07b4e 100644
--- a/packages/views/common/task-transcript/agent-transcript-dialog.tsx
+++ b/packages/views/common/task-transcript/agent-transcript-dialog.tsx
@@ -716,7 +716,7 @@ export function AgentTranscriptDialog({
// delivery) carries a persisted reason the user must act on; surface
// it on the badge instead of a bare "Cancelled". User-initiated
// cancels have no reason and keep the plain label.
- const cancelReason = cancelReasonLabel(task);
+ const cancelReason = cancelReasonLabel(task, t);
return (
<span className={cn(base, "bg-muted text-muted-foreground")} title={task.error ?? undefined}>
<XCircle className="h-3 w-3" />
diff --git a/packages/views/issues/components/execution-log-section.test.tsx b/packages/views/issues/components/execution-log-section.test.tsx
index bd3a987622..737a96dcb1 100644
--- a/packages/views/issues/components/execution-log-section.test.tsx
+++ b/packages/views/issues/components/execution-log-section.test.tsx
@@ -1,6 +1,6 @@
// @vitest-environment jsdom
-import { cleanup, screen } from "@testing-library/react";
+import { cleanup, fireEvent, screen } from "@testing-library/react";
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import type { AgentTask } from "@multica/core/types";
import { renderWithI18n } from "../../test/i18n";
@@ -227,6 +227,35 @@ describe("TaskCommentCoverage", () => {
});
});
+describe("execution log failure reasons", () => {
+ it("renders a failed run's reason in the active locale", () => {
+ const queryClient = new QueryClient({
+ defaultOptions: { queries: { retry: false } },
+ });
+ queryClient.setQueryData(issueKeys.tasks("issue-1"), [
+ makeTask({
+ status: "failed",
+ completed_at: "2026-06-08T08:04:00Z",
+ error: "provider returned 402",
+ failure_reason: "agent_error.provider_quota_limit",
+ }),
+ ]);
+
+ renderWithI18n(
+ <QueryClientProvider client={queryClient}>
+ <ExecutionLogSection issueId="issue-1" />
+ </QueryClientProvider>,
+ { locale: "zh-Hans" },
+ );
+
+ fireEvent.click(screen.getByRole("button", { name: "显示历史运行(1)" }));
+ expect(screen.getByText(/提供商配额已用尽/)).toBeInTheDocument();
+ expect(
+ screen.queryByText(/Provider quota exhausted/),
+ ).not.toBeInTheDocument();
+ });
+});
+
// claude-opus-5 at 5 / 25 / 0.50 / 6.25 per million.
function usageSlice(overrides: Partial<TaskUsage> = {}): TaskUsage {
return {
diff --git a/packages/views/issues/components/execution-log-section.tsx b/packages/views/issues/components/execution-log-section.tsx
index 4a29249b28..163793aa1a 100644
--- a/packages/views/issues/components/execution-log-section.tsx
+++ b/packages/views/issues/components/execution-log-section.tsx
@@ -427,6 +427,7 @@ export function ActiveTaskRow({
function PastRow({ task, issueId }: { task: AgentTask; issueId: string }) {
const { t } = useT("issues");
+ const { t: tAgents } = useT("agents");
const timeAgo = useTimeAgo();
const [retrying, setRetrying] = useState(false);
const label = useStatusLabel(task.status);
@@ -437,8 +438,8 @@ function PastRow({ task, issueId }: { task: AgentTask; issueId: string }) {
// delivery) — a user-initiated cancel stays a plain "Cancelled".
const failureLabel =
task.status === "failed"
- ? failureReasonLabel(task.failure_reason)
- : cancelReasonLabel(task);
+ ? failureReasonLabel(task.failure_reason, tAgents)
+ : cancelReasonLabel(task, tAgents);
// Hovering the status mark reveals the actionable text ("upgrade the daemon
// on that machine", "work preserved at …"), not just the reason bucket.
const statusTitle =
diff --git a/packages/views/locales/en/agents.json b/packages/views/locales/en/agents.json
index cc42ca6c5d..f16bf37530 100644
--- a/packages/views/locales/en/agents.json
+++ b/packages/views/locales/en/agents.json
@@ -879,11 +879,44 @@
"tool_kind_misc": "Other"
},
"task_failure": {
- "agent_error": "Agent execution error",
- "timeout": "Task timed out",
- "runtime_offline": "Daemon offline",
- "runtime_recovery": "Daemon restarted",
- "manual": "Cancelled by user"
+ "cancelled_by_system": "Cancelled by the system",
+ "reasons": {
+ "queued_expired": "Expired in queue",
+ "runtime_offline": "Daemon offline",
+ "runtime_reconnect_timeout": "Daemon did not reconnect in time",
+ "runtime_recovery": "Daemon restarted",
+ "timeout": "Task timed out",
+ "iteration_limit": "Hit the iteration limit",
+ "agent_blocked": "Waiting on human input",
+ "api_invalid_request": "Rejected by the model API",
+ "skill_bundle_unavailable": "Couldn't download the agent's skills",
+ "runtime_cli_timeout": "Local runtime CLI timed out",
+ "invalid_task_identity": "Task identity mismatch",
+ "issue_window_restricted": "Issue unavailable under workspace limits",
+ "agent_error_provider_auth_or_access": "Provider auth failed",
+ "agent_error_provider_quota_limit": "Provider quota exhausted",
+ "agent_error_provider_capacity_or_rate_limit": "Rate limited by provider",
+ "agent_error_provider_server_error": "Provider server error",
+ "agent_error_provider_network": "Network error reaching provider",
+ "agent_error_process_failure": "Agent process crashed",
+ "agent_error_empty_or_unparseable_output": "Agent returned no usable output",
+ "agent_error_agent_timeout": "Agent timed out",
+ "agent_error_context_overflow": "Context window exceeded",
+ "agent_error_missing_config": "Missing API key or configuration",
+ "agent_error_model_not_found_or_unavailable": "Model unavailable",
+ "agent_error_runtime_version_unsupported": "Runner CLI version unsupported",
+ "agent_error_runtime_missing_executable": "Runner CLI not installed",
+ "agent_error_unknown": "Agent execution error",
+ "agent_fallback_message": "Agent returned a fallback message",
+ "codex_resume_oversized": "Session too large to resume",
+ "idle_watchdog": "Agent stopped after inactivity",
+ "local_directory_error": "Local directory error",
+ "cancelled": "Cancelled by the system",
+ "agent_error": "Agent execution error",
+ "codex_semantic_inactivity": "Codex semantic inactivity timeout",
+ "manual": "Cancelled by user",
+ "user_cancelled": "Cancelled by user"
+ }
},
"last_active": {
"today": "Today",
diff --git a/packages/views/locales/ja/agents.json b/packages/views/locales/ja/agents.json
index 8b48db79a9..b4ea9358a8 100644
--- a/packages/views/locales/ja/agents.json
+++ b/packages/views/locales/ja/agents.json
@@ -754,11 +754,44 @@
"tool_kind_misc": "その他"
},
"task_failure": {
- "agent_error": "エージェント実行エラー",
- "timeout": "作業がタイムアウトしました",
- "runtime_offline": "デーモンがオフライン",
- "runtime_recovery": "デーモンが再起動しました",
- "manual": "ユーザーがキャンセルしました"
+ "cancelled_by_system": "システムによってキャンセルされました",
+ "reasons": {
+ "queued_expired": "キュー内で期限切れになりました",
+ "runtime_offline": "デーモンがオフライン",
+ "runtime_reconnect_timeout": "デーモンが時間内に再接続しませんでした",
+ "runtime_recovery": "デーモンが再起動しました",
+ "timeout": "作業がタイムアウトしました",
+ "iteration_limit": "反復回数の上限に達しました",
+ "agent_blocked": "人による入力を待機中",
+ "api_invalid_request": "モデル API に拒否されました",
+ "skill_bundle_unavailable": "エージェントのスキルをダウンロードできませんでした",
+ "runtime_cli_timeout": "ローカルランタイム CLI がタイムアウトしました",
+ "invalid_task_identity": "作業のエージェント情報が一致しません",
+ "issue_window_restricted": "ワークスペースの制限によりタスクを利用できません",
+ "agent_error_provider_auth_or_access": "プロバイダーの認証に失敗しました",
+ "agent_error_provider_quota_limit": "プロバイダーのクォータを使い切りました",
+ "agent_error_provider_capacity_or_rate_limit": "プロバイダーによるレート制限",
+ "agent_error_provider_server_error": "プロバイダーのサーバーエラー",
+ "agent_error_provider_network": "プロバイダーへの接続でネットワークエラー",
+ "agent_error_process_failure": "エージェントプロセスがクラッシュしました",
+ "agent_error_empty_or_unparseable_output": "エージェントから使用可能な出力がありません",
+ "agent_error_agent_timeout": "エージェントがタイムアウトしました",
+ "agent_error_context_overflow": "コンテキストウィンドウを超過しました",
+ "agent_error_missing_config": "API キーまたは設定がありません",
+ "agent_error_model_not_found_or_unavailable": "モデルを利用できません",
+ "agent_error_runtime_version_unsupported": "ランナー CLI のバージョンはサポートされていません",
+ "agent_error_runtime_missing_executable": "ランナー CLI がインストールされていません",
+ "agent_error_unknown": "エージェント実行エラー",
+ "agent_fallback_message": "エージェントがフォールバックメッセージを返しました",
+ "codex_resume_oversized": "セッションが大きすぎて再開できません",
+ "idle_watchdog": "エージェントが長時間応答しなかったため停止しました",
+ "local_directory_error": "ローカルディレクトリエラー",
+ "cancelled": "システムによってキャンセルされました",
+ "agent_error": "エージェント実行エラー",
+ "codex_semantic_inactivity": "Codex に進行がないままタイムアウトしました",
+ "manual": "ユーザーがキャンセルしました",
+ "user_cancelled": "ユーザーがキャンセルしました"
+ }
},
"runtime_filter": {
"all": "すべてのランタイム",
diff --git a/packages/views/locales/ko/agents.json b/packages/views/locales/ko/agents.json
index 9f82acee5c..4d531520a3 100644
--- a/packages/views/locales/ko/agents.json
+++ b/packages/views/locales/ko/agents.json
@@ -762,11 +762,44 @@
"tool_kind_misc": "기타"
},
"task_failure": {
- "agent_error": "에이전트 실행 오류",
- "timeout": "작업 시간 초과",
- "runtime_offline": "데몬 오프라인",
- "runtime_recovery": "데몬 재시작됨",
- "manual": "사용자가 취소함"
+ "cancelled_by_system": "시스템에서 취소함",
+ "reasons": {
+ "queued_expired": "대기열에서 만료됨",
+ "runtime_offline": "데몬 오프라인",
+ "runtime_reconnect_timeout": "데몬이 제시간에 다시 연결되지 않음",
+ "runtime_recovery": "데몬 재시작됨",
+ "timeout": "작업 시간 초과",
+ "iteration_limit": "반복 횟수 제한에 도달함",
+ "agent_blocked": "사용자 입력 대기 중",
+ "api_invalid_request": "모델 API에서 요청을 거부함",
+ "skill_bundle_unavailable": "에이전트 스킬을 다운로드할 수 없음",
+ "runtime_cli_timeout": "로컬 런타임 CLI 시간 초과",
+ "invalid_task_identity": "작업 ID 정보가 일치하지 않음",
+ "issue_window_restricted": "워크스페이스 제한으로 태스크를 사용할 수 없음",
+ "agent_error_provider_auth_or_access": "공급자 인증 실패",
+ "agent_error_provider_quota_limit": "공급자 할당량 소진",
+ "agent_error_provider_capacity_or_rate_limit": "공급자 요청 한도에 도달함",
+ "agent_error_provider_server_error": "공급자 서버 오류",
+ "agent_error_provider_network": "공급자 연결 중 네트워크 오류",
+ "agent_error_process_failure": "에이전트 프로세스 충돌",
+ "agent_error_empty_or_unparseable_output": "에이전트가 사용 가능한 출력을 반환하지 않음",
+ "agent_error_agent_timeout": "에이전트 시간 초과",
+ "agent_error_context_overflow": "컨텍스트 창 한도 초과",
+ "agent_error_missing_config": "API 키 또는 설정 누락",
+ "agent_error_model_not_found_or_unavailable": "모델을 사용할 수 없음",
+ "agent_error_runtime_version_unsupported": "러너 CLI 버전이 지원되지 않음",
+ "agent_error_runtime_missing_executable": "러너 CLI가 설치되지 않음",
+ "agent_error_unknown": "에이전트 실행 오류",
+ "agent_fallback_message": "에이전트가 대체 메시지를 반환함",
+ "codex_resume_oversized": "세션이 너무 커서 재개할 수 없음",
+ "idle_watchdog": "에이전트가 장시간 응답하지 않아 중지됨",
+ "local_directory_error": "로컬 디렉터리 오류",
+ "cancelled": "시스템에서 취소함",
+ "agent_error": "에이전트 실행 오류",
+ "codex_semantic_inactivity": "Codex 의미 진행 없음 시간 초과",
+ "manual": "사용자가 취소함",
+ "user_cancelled": "사용자가 취소함"
+ }
},
"last_active": {
"today": "오늘",
diff --git a/packages/views/locales/zh-Hans/agents.json b/packages/views/locales/zh-Hans/agents.json
index bf24ce5981..140884bd8a 100644
--- a/packages/views/locales/zh-Hans/agents.json
+++ b/packages/views/locales/zh-Hans/agents.json
@@ -861,11 +861,44 @@
"tool_kind_misc": "其他"
},
"task_failure": {
- "agent_error": "智能体执行出错",
- "timeout": "task 超时",
- "runtime_offline": "守护进程离线",
- "runtime_recovery": "守护进程已重启",
- "manual": "用户取消"
+ "cancelled_by_system": "系统已取消",
+ "reasons": {
+ "queued_expired": "排队已过期",
+ "runtime_offline": "守护进程离线",
+ "runtime_reconnect_timeout": "守护进程未及时重新连接",
+ "runtime_recovery": "守护进程已重启",
+ "timeout": "task 超时",
+ "iteration_limit": "达到迭代次数上限",
+ "agent_blocked": "等待人工输入",
+ "api_invalid_request": "模型 API 拒绝了请求",
+ "skill_bundle_unavailable": "无法下载智能体的 skill",
+ "runtime_cli_timeout": "本地运行时 CLI 超时",
+ "invalid_task_identity": "task 身份不匹配",
+ "issue_window_restricted": "任务超出工作区可用范围",
+ "agent_error_provider_auth_or_access": "提供商认证失败",
+ "agent_error_provider_quota_limit": "提供商配额已用尽",
+ "agent_error_provider_capacity_or_rate_limit": "受到提供商速率限制",
+ "agent_error_provider_server_error": "提供商服务器出错",
+ "agent_error_provider_network": "连接提供商时网络出错",
+ "agent_error_process_failure": "智能体进程崩溃",
+ "agent_error_empty_or_unparseable_output": "智能体未返回可用输出",
+ "agent_error_agent_timeout": "智能体运行超时",
+ "agent_error_context_overflow": "上下文窗口已超限",
+ "agent_error_missing_config": "缺少 API 密钥或配置",
+ "agent_error_model_not_found_or_unavailable": "模型不可用",
+ "agent_error_runtime_version_unsupported": "运行器 CLI 版本不受支持",
+ "agent_error_runtime_missing_executable": "未安装运行器 CLI",
+ "agent_error_unknown": "智能体执行出错",
+ "agent_fallback_message": "智能体返回了兜底消息",
+ "codex_resume_oversized": "会话过大,无法恢复",
+ "idle_watchdog": "智能体长时间无活动,运行已停止",
+ "local_directory_error": "本地目录出错",
+ "cancelled": "系统已取消",
+ "agent_error": "智能体执行出错",
+ "codex_semantic_inactivity": "Codex 长时间没有语义进展",
+ "manual": "用户取消",
+ "user_cancelled": "用户取消"
+ }
},
"last_active": {
"today": "今天",