bytebase/bytebase · error
Another chat is already using a page-changing tool. Wait for
Error message
Another chat is already using a page-changing tool. Wait for it to finish, then retry this chat.
What it means
BatchGetUsers wraps a convertToUser failure as INTERNAL with 'failed to convert user' while building the response. The store lookup and name matching succeeded; converting a found store user into its protobuf representation (with IAM enrichment) failed.
Source
Thrown at frontend/src/modules/agent/logic/tools/index.ts:385
interface CreateToolExecutorOptions {
chatId?: string;
onNavigate?: () => void;
}
const PAGE_MUTATION_TOOL_NAMES = new Set(["navigate", "dom_action"]);
let pageMutationChatId: string | null = null;
const withPageMutationLock = async <T>(
chatId: string | undefined,
toolName: string,
run: () => Promise<T>
): Promise<T> => {
if (!PAGE_MUTATION_TOOL_NAMES.has(toolName) || !chatId) {
return run();
}
if (pageMutationChatId && pageMutationChatId !== chatId) {
throw new Error(
"Another chat is already using a page-changing tool. Wait for it to finish, then retry this chat."
);
}
pageMutationChatId = chatId;
try {
return await run();
} finally {
if (pageMutationChatId === chatId) {
pageMutationChatId = null;
}
}
};
export function createToolExecutor(
router: AppRouterInstance,
options: CreateToolExecutorOptions = {}
): ToolExecutor {View on GitHub (pinned to 1870550677)
Solutions
- Find which user failed from server logs (the loop index/name identifies it).
- Inspect that user's IAM role bindings for references to deleted projects or unknown roles.
- Repair or remove the orphaned binding and retry the batch call.
- If it started after an upgrade, confirm migrations completed cleanly.
Defensive patterns
Strategy: try-catch
Try / catch
resp, err := client.BatchGetUsers(ctx, req)
if connect.CodeOf(err) == connect.CodeInternal && strings.Contains(err.Error(), "failed to convert user") {
// IAM data inconsistency for one member of the batch
return fallbackToIndividualLookups(ctx, client, names)
} Prevention
- Cascade-delete IAM bindings with their owning project or role.
- Audit IAM rows after upgrades for unknown role names.
- Keep per-user conversion failures isolated by falling back to single lookups.
When it happens
Trigger: BatchGetUsers where one of the matched users has inconsistent IAM data, so convertToUser errors mid-loop.
Common situations: One user in the batch has an IAM role bound to a deleted project, or an unrecognized role after a version upgrade; corrupted policy JSON for that user.
Understand the failure class
Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.
Related errors
AI-assisted analysis of bytebase/bytebase@1870550677 (2026-09-06).
Data as JSON: /api/errors/584815f4d87a530a.
Report an issue: GitHub.