Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

fix(desktop): 技能账号边界按实例记录,避免多开实例互相阻断新建任务 (#5420)

Dash11a5ae259606
diff --git a/apps/desktop/src/main/__tests__/authBoundaryQuarantine.test.ts b/apps/desktop/src/main/__tests__/authBoundaryQuarantine.test.ts
index 37fa822996..a9df303d65 100644
--- a/apps/desktop/src/main/__tests__/authBoundaryQuarantine.test.ts
+++ b/apps/desktop/src/main/__tests__/authBoundaryQuarantine.test.ts
@@ -4,7 +4,11 @@ import path from 'node:path';
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
-const lockMock = vi.hoisted(() => ({ held: true }));
+const lockMock = vi.hoisted(() => ({
+ held: true,
+ busyPaths: new Set<string>(),
+ acquired: [] as string[],
+}));
const pathMock = vi.hoisted(() => ({ homeDir: '', userDataDir: '' }));
vi.mock('node:os', async () => {
@@ -26,10 +30,16 @@ vi.mock('../logger.js', () => ({
vi.mock('../device-link/crossProcessLock.js', () => ({
withSecurityBoundaryLock: async (
- _lockPath: string,
+ lockPath: string,
_options: unknown,
task: (status: { held: true } | { held: false; reason: 'busy' }) => Promise<unknown>,
- ) => task(lockMock.held ? { held: true } : { held: false, reason: 'busy' }),
+ ) => {
+ if (!lockMock.held || lockMock.busyPaths.has(lockPath)) {
+ return task({ held: false, reason: 'busy' });
+ }
+ lockMock.acquired.push(lockPath);
+ return task({ held: true });
+ },
}));
import {
@@ -39,22 +49,35 @@ import {
withGhostSkillProjectionOwnerCommit,
withGhostSkillProjectionReadOnlyOwner,
withGhostSkillProjectionReconcile,
+ withSharedGlobalSkillProjectionMutation,
+ withSharedSkillRootsLock,
withStableOwnerBoundaryMutation,
} from '../authBoundaryQuarantine.js';
function readPersistedState(): unknown {
return JSON.parse(
fs.readFileSync(
- path.join(pathMock.homeDir, '.cindy', 'ghost-skill-projection-boundary.json'),
+ path.join(pathMock.userDataDir, 'ghost-skill-projection-boundary.json'),
'utf8',
),
);
}
+async function commitOwner(ownerId: string | null): Promise<void> {
+ await withGhostSkillProjectionOwnerCommit({
+ previousOwnerId: null,
+ nextOwnerId: ownerId,
+ prepareTransition: async () => {},
+ commit: () => undefined,
+ });
+}
+
beforeEach(() => {
pathMock.homeDir = fs.mkdtempSync(path.join(os.tmpdir(), 'cindy-auth-boundary-'));
pathMock.userDataDir = path.join(pathMock.homeDir, 'profile-user-data');
lockMock.held = true;
+ lockMock.busyPaths.clear();
+ lockMock.acquired.length = 0;
delete process.env.XDT_PASSIVE_SHARED_USER_DATA;
__testing.resetProcessQuarantine();
});
@@ -67,11 +90,87 @@ afterEach(() => {
});
describe('Ghost skill projection boundary state', () => {
- it('stores the machine-user projection marker beside the shared home skill roots', () => {
+ it('stores owner state per instance and keeps only the shared-roots lock machine-wide', () => {
expect(__testing.filePath()).toBe(
- path.join(pathMock.homeDir, '.cindy', 'ghost-skill-projection-boundary.json'),
+ path.join(pathMock.userDataDir, 'ghost-skill-projection-boundary.json'),
+ );
+ expect(__testing.quarantinePath()).toBe(
+ path.join(pathMock.userDataDir, 'ghost-skill-projection-boundary.quarantine.json'),
+ );
+ expect(__testing.lockPath()).toBe(`${__testing.filePath()}.lock`);
+ // Same path as the former machine-wide marker lock, so older builds still
+ // serialize their shared-root writes with this one.
+ expect(__testing.sharedSkillRootsLockPath()).toBe(
+ path.join(pathMock.homeDir, '.cindy', 'ghost-skill-projection-boundary.json.lock'),
+ );
+ });
+
+ it('keeps one instance stable while another instance commits a different owner', async () => {
+ const instanceA = pathMock.userDataDir;
+ const instanceB = path.join(pathMock.homeDir, 'isolated-dev-user-data');
+ await commitOwner('cloud-user');
+
+ pathMock.userDataDir = instanceB;
+ await commitOwner('local-v1');
+ expect(isGhostSkillProjectionBoundaryStableForOwner('local-v1')).toBe(true);
+
+ pathMock.userDataDir = instanceA;
+ expect(isGhostSkillProjectionBoundaryStableForOwner('cloud-user')).toBe(true);
+ await expect(
+ withSharedGlobalSkillProjectionMutation('cloud-user', async () => 'codex-home'),
+ ).resolves.toBe('codex-home');
+ await expect(
+ withGhostSkillProjectionReconcile('cloud-user', async () => 'reconciled'),
+ ).resolves.toBe('reconciled');
+ });
+
+ it('ignores a legacy machine-wide marker owned by another account', async () => {
+ const legacyDir = path.join(pathMock.homeDir, '.cindy');
+ fs.mkdirSync(legacyDir, { recursive: true });
+ fs.writeFileSync(
+ path.join(legacyDir, 'ghost-skill-projection-boundary.json'),
+ JSON.stringify({
+ version: 1,
+ phase: 'stable',
+ ownerId: 'local-v1',
+ transitionId: 'legacy',
+ updatedAt: 1,
+ }),
);
- expect(__testing.filePath()).not.toContain(pathMock.userDataDir);
+ await commitOwner('cloud-user');
+
+ expect(isGhostSkillProjectionBoundaryStableForOwner('cloud-user')).toBe(true);
+ expect(isGhostSkillProjectionBoundaryStableForOwner('local-v1')).toBe(false);
+ });
+
+ it('treats a missing instance marker as unstable until this instance commits', async () => {
+ expect(isGhostSkillProjectionBoundaryStableForOwner('cloud-user')).toBe(false);
+ await expect(
+ withSharedGlobalSkillProjectionMutation('cloud-user', async () => undefined),
+ ).rejects.toThrow('not stable');
+ });
+
+ it('takes the owner lock before the shared-roots lock', async () => {
+ await commitOwner('owner-a');
+ lockMock.acquired.length = 0;
+
+ await withSharedGlobalSkillProjectionMutation('owner-a', async () => undefined);
+ expect(lockMock.acquired).toEqual([__testing.lockPath(), __testing.sharedSkillRootsLockPath()]);
+
+ lockMock.acquired.length = 0;
+ await withSharedSkillRootsLock(async () => undefined);
+ expect(lockMock.acquired).toEqual([__testing.sharedSkillRootsLockPath()]);
+ });
+
+ it('fails closed while another process holds the shared roots', async () => {
+ await commitOwner('owner-a');
+ lockMock.busyPaths.add(__testing.sharedSkillRootsLockPath());
+ const shared = vi.fn(async () => undefined);
+
+ await expect(withSharedGlobalSkillProjectionMutation('owner-a', shared)).rejects.toThrow(
+ 'lock is busy or unavailable',
+ );
+ expect(shared).not.toHaveBeenCalled();
});
it('accepts only versioned stable and pending records', () => {
@@ -411,6 +510,27 @@ describe('Ghost skill projection boundary state', () => {
expect(fs.readFileSync(__testing.filePath(), 'utf8')).toBe(before);
});
+ it('fails closed when a passive process only finds the legacy machine-wide marker', async () => {
+ const legacyDir = path.join(pathMock.homeDir, '.cindy');
+ fs.mkdirSync(legacyDir, { recursive: true });
+ fs.writeFileSync(
+ path.join(legacyDir, 'ghost-skill-projection-boundary.json'),
+ JSON.stringify({
+ version: 1,
+ phase: 'stable',
+ ownerId: 'owner-a',
+ transitionId: 'legacy',
+ updatedAt: 1,
+ }),
+ );
+ process.env.XDT_PASSIVE_SHARED_USER_DATA = '1';
+
+ await expect(withGhostSkillProjectionReadOnlyOwner('owner-a', async () => 42)).rejects.toThrow(
+ 'another active session',
+ );
+ expect(fs.existsSync(__testing.filePath())).toBe(false);
+ });
+
it('serializes owner commit and reconcile inside one process', async () => {
let releaseCommit!: () => void;
const commitBlocked = new Promise<void>((resolve) => {
diff --git a/apps/desktop/src/main/__tests__/authSessionExpiredDetection.test.ts b/apps/desktop/src/main/__tests__/authSessionExpiredDetection.test.ts
index 7f4ba30ff5..9a36a071f1 100644
--- a/apps/desktop/src/main/__tests__/authSessionExpiredDetection.test.ts
+++ b/apps/desktop/src/main/__tests__/authSessionExpiredDetection.test.ts
@@ -189,7 +189,8 @@ describe('desktop auth session-expiry detection', () => {
const body = ghostSource.slice(start, end);
expect(body).toContain('const roots = listGhostOwnerProjectionRoots();');
- expect(body).toContain('await removeGhostSkillLinksForRoots(roots, undefined,');
+ expect(body).toContain('await withSharedSkillRootsLock(() =>');
+ expect(body).toContain('removeGhostSkillLinksForRoots(roots, undefined,');
expect(body).toContain("roots.map((root) => path.join(ghostSkillPluginRoot(root), 'skills'))");
expect(body).toContain('throw new Error(`ghost owner skill cleanup incomplete');
expect(body).not.toContain('AuthBoundaryQuarantine');
diff --git a/apps/desktop/src/main/authBoundaryQuarantine.ts b/apps/desktop/src/main/authBoundaryQuarantine.ts
index 05f6ba7e3c..89f9c11063 100644
--- a/apps/desktop/src/main/authBoundaryQuarantine.ts
+++ b/apps/desktop/src/main/authBoundaryQuarantine.ts
@@ -1,10 +1,20 @@
/**
- * Cross-process state machine for the globally visible Ghost skill projection.
+ * Durable owner boundary for this instance's skill projections, plus the
+ * machine-wide lock for the shared home-level skill roots.
*
- * Owner-scoped plugin bytes live under userData, but the links consumed by
- * agents live in shared home directories. Every owner transition and every
- * Ghost reconcile therefore uses the same strict lock and durable owner state.
- * Missing, malformed, or pending state never authorizes a reconcile.
+ * Two independent layers:
+ * - Owner state (stable / pending / quarantined) lives under userData. Ghost
+ * and built-in skill bytes are projected into owner-private roots, so the
+ * question "is my owner stable?" belongs to this instance only. Another
+ * Cindy instance (a different build, region, or isolated dev sandbox) using
+ * another account must not be able to flip it.
+ * - The shared roots (~/.agents/skills, ~/.claude/skills, ~/.codex/skills and
+ * the appData built-in bundle) are touched by every instance of this OS
+ * user. Mutations there only need cross-process serialization; Cindy-owned
+ * entries in them are identified by link targets inside each instance's own
+ * userData, so no machine-wide owner is required.
+ *
+ * Missing, malformed, or pending owner state never authorizes a reconcile.
*/
import fs from 'node:fs';
import path from 'node:path';
@@ -76,20 +86,25 @@ type QuarantineRead =
| { kind: 'missing' | 'invalid' };
function filePath(): string {
- // This marker deliberately lives beside the shared home-level Ghost skill
- // projection. It must be visible to every Cindy instance using this OS user;
- // profile-scoped application state remains under app.getPath('userData').
- return path.join(os.homedir(), '.cindy', FILE_NAME);
+ // Instance-scoped: instances sharing one userData (passive dev joins) share
+ // this marker, separate userData directories never observe each other.
+ return path.join(app.getPath('userData'), FILE_NAME);
}
function quarantinePath(): string {
- return path.join(os.homedir(), '.cindy', QUARANTINE_FILE_NAME);
+ return path.join(app.getPath('userData'), QUARANTINE_FILE_NAME);
}
function lockPath(): string {
return `${filePath()}.lock`;
}
+function sharedSkillRootsLockPath(): string {
+ // Same path as the former machine-wide marker lock, so builds that still use
+ // the home-level marker keep serializing their shared-root writes with ours.
+ return path.join(os.homedir(), '.cindy', `${FILE_NAME}.lock`);
+}
+
function normalizeOwnerId(value: unknown): string | null | undefined {
if (value === null) return null;
if (typeof value !== 'string') return undefined;
@@ -183,6 +198,9 @@ function normalizeQuarantineRecord(raw: unknown): QuarantineState | null {
};
}
+// Only this instance's marker is authoritative. A passive join beside an older
+// primary that still publishes the legacy machine-wide marker fails closed
+// (known boundary for mixed dev builds; --isolated is unaffected).
function readState(): StateRead {
return readStateFile(filePath(), normalizeRecord);
}
@@ -265,43 +283,65 @@ function clearQuarantineState(transitionId: string): void {
});
}
-async function withStrictBoundaryLock<T>(task: () => Promise<T>): Promise<T> {
+type StrictLock = <T>(task: () => Promise<T>) => Promise<T>;
+
+function createStrictLock(label: string, resolveLockPath: () => string): StrictLock {
// The in-process tail and the cross-process security lock are complementary:
// the tail preserves ordering inside this Main process, while the strict lock
- // proves the owner of the globally shared projection transition. This is an
- // authorization boundary, so busy/unavailable must fail closed and must not
- // be replaced with the ordinary advisory tier.
- const previous = inProcessBoundaryTail;
- let releaseInProcess: () => void = () => undefined;
- inProcessBoundaryTail = new Promise<void>((resolve) => {
- releaseInProcess = () => resolve();
- });
- await previous;
- try {
- const file = filePath();
- fs.mkdirSync(path.dirname(file), { recursive: true });
- return await withSecurityBoundaryLock(
- lockPath(),
- {
- label: 'ghost-skill-projection-boundary',
- waitMs: 12_000,
- },
- async (status) => {
- if (!status.held) {
- throw new Error('Ghost skill projection boundary lock is busy or unavailable');
- }
- return task();
- },
- );
- } finally {
- releaseInProcess();
- }
+ // serializes other processes. This is an authorization boundary, so
+ // busy/unavailable must fail closed and must not be replaced with the
+ // ordinary advisory tier. Each lock keeps its own tail so the owner lock may
+ // hold the shared-roots lock without waiting on itself.
+ let inProcessTail: Promise<void> = Promise.resolve();
+ return async <T>(task: () => Promise<T>): Promise<T> => {
+ const previous = inProcessTail;
+ let releaseInProcess: () => void = () => undefined;
+ inProcessTail = new Promise<void>((resolve) => {
+ releaseInProcess = () => resolve();
+ });
+ await previous;
+ try {
+ const target = resolveLockPath();
+ fs.mkdirSync(path.dirname(target), { recursive: true });
+ return await withSecurityBoundaryLock(
+ target,
+ {
+ label,
+ waitMs: 12_000,
+ },
+ async (status) => {
+ if (!status.held) {
+ throw new Error('Ghost skill projection boundary lock is busy or unavailable');
+ }
+ return task();
+ },
+ );
+ } finally {
+ releaseInProcess();
+ }
+ };
}
-let inProcessBoundaryTail: Promise<void> = Promise.resolve();
+/** Owner state of this instance. Always taken before the shared-roots lock. */
+const withStrictBoundaryLock = createStrictLock('ghost-skill-projection-boundary', lockPath);
+
+const withSharedRootsLock = createStrictLock(
+ 'shared-skill-roots',
+ sharedSkillRootsLockPath,
+);
/**
- * Serialize an application owner commit with the global Ghost skill projection.
+ * Serialize a write to the machine-wide skill roots with every other Cindy
+ * process of this OS user. Carries no owner check: callers that need one go
+ * through withSharedGlobalSkillProjectionMutation, which takes the owner lock
+ * first (lock order: owner → shared roots).
+ */
+export async function withSharedSkillRootsLock<T>(task: () => Promise<T>): Promise<T> {
+ return withSharedRootsLock(task);
+}
+
+/**
+ * Serialize an application owner commit with this instance's Ghost skill projection owner state.
*
* A stable matching owner may commit without another sweep, but still commits
* under the same lock as reconcile. Missing/invalid/pending/mismatched state
@@ -427,7 +467,10 @@ export async function withGhostSkillProjectionOwnerCommit<T>(
});
}
-/** Allow link mutation only for the globally stable owner, under the same lock. */
+/**
+ * Allow link mutation only for this instance's stable owner. Reconcile also
+ * retires legacy links in the shared roots, so it holds both locks.
+ */
export async function withGhostSkillProjectionReconcile<T>(
ownerId: string,
reconcile: () => Promise<T>,
@@ -437,7 +480,11 @@ export async function withGhostSkillProjectionReconcile<T>(
return withSharedGlobalSkillProjectionMutation(normalizedOwnerId, reconcile);
}
-/** Serialize every mutation of the shared home-level skill discovery roots. */
+/**
+ * Mutate the shared home-level skill discovery roots for this instance's
+ * stable owner: owner check under the instance lock, then the shared-roots
+ * lock around the mutation.
+ */
export async function withSharedGlobalSkillProjectionMutation<T>(
ownerId: string | null,
mutation: () => Promise<T>,
@@ -445,7 +492,7 @@ export async function withSharedGlobalSkillProjectionMutation<T>(
if (isPassiveSharedUserDataInstance()) {
throw new Error('Passive shared-userData instances cannot mutate global skill projections');
}
- return withStableOwnerBoundaryMutation(ownerId, mutation);
+ return withStableOwnerBoundaryMutation(ownerId, () => withSharedRootsLock(mutation));
}
/** Serialize non-projection state that must agree with the same durable owner. */
@@ -524,6 +571,7 @@ export const __testing = {
filePath,
quarantinePath,
lockPath,
+ sharedSkillRootsLockPath,
normalizeRecord,
readState,
resetProcessQuarantine: () => {
diff --git a/apps/desktop/src/main/cindy-brain/index.ts b/apps/desktop/src/main/cindy-brain/index.ts
index ed4dc8cdd4..78171c741c 100644
--- a/apps/desktop/src/main/cindy-brain/index.ts
+++ b/apps/desktop/src/main/cindy-brain/index.ts
@@ -240,7 +240,10 @@ import { GhostConnectionManager } from './ghostConnections.js';
import { getResolvedMainLocale, t } from '../i18n.js';
import { getDeepLinkMainWindow } from '../deepLink.js';
import { reconcileGhostSkillLinks, removeGhostSkillLinksForRoots, ghostSkillPluginRoot } from './skillSlot.js';
-import { assertGhostSkillProjectionStableOwner } from '../authBoundaryQuarantine.js';
+import {
+ assertGhostSkillProjectionStableOwner,
+ withSharedSkillRootsLock,
+} from '../authBoundaryQuarantine.js';
import { type GhostOwnerScope } from './ghostOwnerScope.js';
import {
assertTrustedAppRendererEvent,
@@ -1136,8 +1139,10 @@ export async function suspendAllGhosts(): Promise<void> {
resetNodeRuntimeBrokerForAccountBoundary();
brainRootCache = null;
const roots = listGhostOwnerProjectionRoots();
- const skillCleanup = await removeGhostSkillLinksForRoots(roots, undefined,
- roots.map((root) => path.join(ghostSkillPluginRoot(root), 'skills')));
+ // Legacy links live in the shared home roots; serialize with other Cindy processes.
+ const skillCleanup = await withSharedSkillRootsLock(() =>
+ removeGhostSkillLinksForRoots(roots, undefined,
+ roots.map((root) => path.join(ghostSkillPluginRoot(root), 'skills'))));
for (const warning of skillCleanup.warnings) {
log.warn('ghost owner skill cleanup warning', { warning });
}
diff --git a/apps/desktop/src/main/maker-host/__tests__/codexAuthBindingClaim.test.ts b/apps/desktop/src/main/maker-host/__tests__/codexAuthBindingClaim.test.ts
index 9ba96989b2..37742e76be 100644
--- a/apps/desktop/src/main/maker-host/__tests__/codexAuthBindingClaim.test.ts
+++ b/apps/desktop/src/main/maker-host/__tests__/codexAuthBindingClaim.test.ts
@@ -97,7 +97,7 @@ function readBindingFile(bindingFile: string): Record<string, unknown> {
}
function writeStableProjectionOwner(ownerId: string | null): void {
- const markerDir = path.join(os.homedir(), '.cindy');
+ const markerDir = h.userDataDir;
fs.mkdirSync(markerDir, { recursive: true });
fs.writeFileSync(
path.join(markerDir, 'ghost-skill-projection-boundary.json'),
diff --git a/apps/desktop/src/renderer/components/chat/ErrorBanner.tsx b/apps/desktop/src/renderer/components/chat/ErrorBanner.tsx
index 88f8b531d4..61f8c0e2aa 100644
--- a/apps/desktop/src/renderer/components/chat/ErrorBanner.tsx
+++ b/apps/desktop/src/renderer/components/chat/ErrorBanner.tsx
@@ -176,6 +176,13 @@ export function ErrorBanner({
// 必须等其它本地 Codex 任务全部结束。main 侧用 CREDENTIAL_SWITCH_BUSY: 前缀编码
// (makerSendTransaction),这里换成可操作文案;Retry 保留 —— 其它任务结束后重试即成功。
const isCredentialSwitchBusy = error.startsWith('CREDENTIAL_SWITCH_BUSY:');
+ // Main 侧账号边界未稳定(换号中 / 状态待修复 / 边界锁被占)时的内部错误,原文对用户
+ // 无意义。锁被占与换号会在边界提交后自愈;状态待修复要等下一次账号提交(重启时冷启动
+ // 必然提交),所以文案同时给出「稍后重试」与「一直出现就重启」。原始错误仍可展开查看。
+ const isAccountBoundaryPending =
+ /Ghost skill projection (?:is not stable|is quarantined)|projection boundary lock is busy/.test(
+ error,
+ );
// Codex 单例 app-server 切换鉴权模式(或服务重启)后,旧会话的 thread 随旧进程销毁,
// 续聊会撞 codex 'thread not found'。把这个看不懂的协议错换成可操作的友好提示:
// 新建会话即可在新模式下生效(重开本会话走 thread/resume 也可)。'thread not found'
@@ -368,6 +375,8 @@ export function ErrorBanner({
displayError = t('ipcError.PI_IMAGE_INPUT_UNSUPPORTED');
} else if (isCredentialSwitchBusy) {
displayError = t('chat.errorBanner.credentialSwitchBusy');
+ } else if (isAccountBoundaryPending) {
+ displayError = t('chat.errorBanner.accountBoundaryPending');
} else if (isCodexAppServerForceRetired) {
displayError = t('chat.errorBanner.codexAppServerRetired');
} else if (isCodexThreadStale) {
diff --git a/apps/desktop/src/renderer/components/chat/__tests__/ErrorBannerCodexOAuth.test.tsx b/apps/desktop/src/renderer/components/chat/__tests__/ErrorBannerCodexOAuth.test.tsx
index 19c706cd6d..843600b52d 100644
--- a/apps/desktop/src/renderer/components/chat/__tests__/ErrorBannerCodexOAuth.test.tsx
+++ b/apps/desktop/src/renderer/components/chat/__tests__/ErrorBannerCodexOAuth.test.tsx
@@ -147,6 +147,19 @@ describe('ErrorBanner OpenAI connection recovery', () => {
expect(screen.queryByText(error)).toBeNull();
});
+ it('replaces an unsettled account boundary error with retry guidance', () => {
+ const error =
+ 'LAZY_CREATE_FAILED: Ghost skill projection is not stable for the active owner';
+ const onRetry = vi.fn();
+ render(
+ <ErrorBanner error={error} retryText="retry this turn" onRetry={onRetry} agentKind="codex" />,
+ );
+
+ expect(screen.getByText('chat.errorBanner.accountBoundaryPending')).toBeTruthy();
+ expect(screen.queryByText(error)).toBeNull();
+ expect(screen.getByRole('button', { name: 'chat.errorBanner.retry' })).toBeTruthy();
+ });
+
it('uses cause-neutral Codex app-server retirement copy and does not suggest switching models', () => {
render(
<ErrorBanner
diff --git a/apps/desktop/src/renderer/i18n/locales/en/common.json b/apps/desktop/src/renderer/i18n/locales/en/common.json
index 70ae377f0a..c52df65f8d 100644
--- a/apps/desktop/src/renderer/i18n/locales/en/common.json
+++ b/apps/desktop/src/renderer/i18n/locales/en/common.json
@@ -9682,6 +9682,7 @@
"viewBalance": "View balance",
"viewBalanceTitle": "Open Usage & Billing to check your balance and add funds",
"credentialSwitchBusy": "Another Codex task is still running, so the provider for this session can't be applied yet (the shared Codex process needs a restart). Retry after those tasks finish.",
+ "accountBoundaryPending": "Cindy is still switching account state, so this task can't start yet. Wait a moment, then press Retry. If this keeps happening, restart Cindy.",
"codexThreadStale": "Codex auth mode changed — this session can't continue. Start a new session to apply it.",
"codexResumeNotReady": "Codex can't resume this task right now. Try again in a little while.",
"claudeGatewayOpusPlanMismatch": "This Opus request went through XD Gateway, not your Claude.ai subscription. That gateway route rejected the model. Switch to your Claude.ai subscription and retry, or choose another model.",
diff --git a/apps/desktop/src/renderer/i18n/locales/ja/common.json b/apps/desktop/src/renderer/i18n/locales/ja/common.json
index 1b2a482d9c..4efad3f846 100644
--- a/apps/desktop/src/renderer/i18n/locales/ja/common.json
+++ b/apps/desktop/src/renderer/i18n/locales/ja/common.json
@@ -9665,6 +9665,7 @@
"viewBalance": "残高を見る",
"viewBalanceTitle": "「使用量と請求」を開いて残高を確認・チャージ",
"credentialSwitchBusy": "他の Codex タスクが実行中のため、このセッションで選択したプロバイダーへまだ切り替えられません(共有 Codex プロセスの再起動が必要です)。他のタスクの終了後に「再試行」を押してください。",
+ "accountBoundaryPending": "Cindy がアカウント状態を切り替え中のため、まだこのタスクを開始できません。少し待ってから「再試行」を押してください。繰り返し表示される場合は Cindy を再起動してください。",
"codexThreadStale": "Codex の認証モードが切り替わりました。このセッションは続行できません。新しいセッションを開始してください。",
"codexResumeNotReady": "Codex は現在このタスクを再開できません。しばらくしてからもう一度お試しください。",
"claudeGatewayOpusPlanMismatch": "この Opus リクエストは Claude.ai サブスクリプションではなく、XD Gateway 経由で送信され、このモデルが拒否されました。Claude.ai サブスクリプションに切り替えて再試行するか、別のモデルを選択してください。",
diff --git a/apps/desktop/src/renderer/i18n/locales/ko/common.json b/apps/desktop/src/renderer/i18n/locales/ko/common.json
index 25fa485c13..ce2d74007a 100644
--- a/apps/desktop/src/renderer/i18n/locales/ko/common.json
+++ b/apps/desktop/src/renderer/i18n/locales/ko/common.json
@@ -9665,6 +9665,7 @@
"viewBalance": "잔액 보기",
"viewBalanceTitle": "「사용량 및 청구」를 열어 잔액을 확인하고 충전",
"credentialSwitchBusy": "다른 Codex 작업이 실행 중이어서 이 세션에서 선택한 제공자로 아직 전환할 수 없습니다(공유 Codex 프로세스 재시작 필요). 다른 작업이 끝난 후 ‘재시도’를 눌러 주세요.",
+ "accountBoundaryPending": "Cindy가 계정 상태를 전환하는 중이라 아직 이 작업을 시작할 수 없습니다. 잠시 후 ‘재시도’를 눌러 주세요. 계속 표시되면 Cindy를 다시 시작해 주세요.",
"codexThreadStale": "Codex 인증 모드가 변경되었습니다. 이 세션은 계속할 수 없습니다. 새 세션을 시작하세요.",
"codexResumeNotReady": "Codex에서 현재 이 작업을 재개할 수 없습니다. 잠시 후 다시 시도해 주세요.",
"claudeGatewayOpusPlanMismatch": "이 Opus 요청은 Claude.ai 구독이 아니라 XD Gateway를 통해 전송되었고, 해당 게이트웨이 경로에서 모델을 거부했습니다. Claude.ai 구독으로 전환해 다시 시도하거나 다른 모델을 선택하세요.",
diff --git a/apps/desktop/src/renderer/i18n/locales/zh-CN/common.json b/apps/desktop/src/renderer/i18n/locales/zh-CN/common.json
index 8eefede6e7..98fdffbca8 100644
--- a/apps/desktop/src/renderer/i18n/locales/zh-CN/common.json
+++ b/apps/desktop/src/renderer/i18n/locales/zh-CN/common.json
@@ -9665,6 +9665,7 @@
"viewBalance": "查看余额",
"viewBalanceTitle": "打开「用量和计费」查看余额并充值",
"credentialSwitchBusy": "Codex 正在其它任务中运行,暂时无法按本任务选择的模型来源切换(需要重启共享的 Codex 后台进程)。等它结束后点「重试」即可。",
+ "accountBoundaryPending": "Cindy 正在切换账号状态,暂时无法开始这个任务。稍等片刻后点「重试」;如果一直出现,请重启 Cindy。",
"codexThreadStale": "Codex 鉴权模式已切换,当前任务无法继续 —— 请新建任务后生效。",
"codexResumeNotReady": "Codex 暂时无法恢复这个任务,请稍后重试",
"claudeGatewayOpusPlanMismatch": "这次 Opus 请求实际走的是 XD Gateway,不是你的 Claude.ai 订阅;该网关路由拒绝了此模型。可切换到 Claude.ai 订阅后重试,或换一个模型。",
diff --git a/apps/desktop/src/renderer/i18n/locales/zh-TW/common.json b/apps/desktop/src/renderer/i18n/locales/zh-TW/common.json
index 01e1ccc02a..51f96693f1 100644
--- a/apps/desktop/src/renderer/i18n/locales/zh-TW/common.json
+++ b/apps/desktop/src/renderer/i18n/locales/zh-TW/common.json
@@ -9664,6 +9664,7 @@
"viewBalance": "檢視餘額",
"viewBalanceTitle": "開啟「用量和計費」檢視餘額並充值",
"credentialSwitchBusy": "Codex 正在其它任務中執行,暫時無法按本任務選擇的模型來源切換(需要重啟共享的 Codex 後臺處理程序)。等它結束後點「重試」即可。",
+ "accountBoundaryPending": "Cindy 正在切換帳號狀態,暫時無法開始這個任務。稍等片刻後點「重試」;如果一直出現,請重新啟動 Cindy。",
"codexThreadStale": "Codex 鑑權模式已切換,當前任務無法繼續 —— 請新建任務後生效。",
"codexResumeNotReady": "Codex 暫時無法恢復這個任務,請稍後重試",
"claudeGatewayOpusPlanMismatch": "這次 Opus 請求實際走的是 XD Gateway,不是你的 Claude.ai 訂閱;該閘道器路由拒絕了此模型。可切換到 Claude.ai 訂閱後重試,或換一個模型。",