windmill-labs/windmill · error · Error
Fork workspace name is too long (${effectiveName.length} cha
Error message
Fork workspace name is too long (${effectiveName.length} chars; max 50). Choose a shorter name. What it means
The backend's workspace.name column is varchar(50). The CLI validates the effective display name (`--create-workspace-name`, else the positional name, else the derived id) before creating anything, so you fail fast instead of after databases are cloned and the git branch created. Names over 50 characters are rejected.
Source
Thrown at cli/src/commands/workspace/fork.ts:215
} else {
workspaceId = idDefault;
}
}
log.info(colors.blue(`Creating forked workspace: ${workspaceName}...`));
const trueWorkspaceId = `${WM_FORK_PREFIX}-${workspaceId}`;
// Fail fast on an invalid id (e.g. an explicit positional id, or a long
// branch name under --yes) before existsWorkspace, datatable cloning, and
// branch creation — a late backend rejection would leave cloned databases
// behind.
validateForkWorkspaceId(trueWorkspaceId);
// The workspace.name column is character varying(50); reject an over-long name
// up front (matching the name actually sent to the backend below) instead of
// failing late after databases are cloned and the git branch is created.
const effectiveName = opts.createWorkspaceName ?? workspaceName ?? trueWorkspaceId;
if (effectiveName.length > 50) {
throw new Error(
`Fork workspace name is too long (${effectiveName.length} chars; max 50). Choose a shorter name.`
);
}
let alreadyExists = false;
try {
alreadyExists = await wmill.existsWorkspace({
requestBody: { id: trueWorkspaceId },
});
} catch (e) {
log.info(
colors.red.bold("! Credentials or instance is invalid. Aborting.")
);
throw e;
}
if (alreadyExists) {
throw new Error(
`This forked workspace '${workspaceId}' (${workspaceName}) already exists, possibly archived (archiving keeps the id reserved). ` +View on GitHub (pinned to e474e8803c)
Solutions
- Pass a shorter workspace_name (<= 50 chars)
- Shorten --create-workspace-name accordingly
- If the id is derived from a long branch name, use a shorter explicit workspaceId positional so the fallback name fits
Example fix
// before wmill workspace fork "my very long descriptive fork name that exceeds fifty characters in total" // after wmill workspace fork "my-short-fork"
Defensive patterns
Strategy: validation
Validate before calling
const effectiveName = opts.createWorkspaceName ?? workspaceName ?? workspaceId;
if (effectiveName && effectiveName.length > 50) {
throw new Error(`Fork name ${effectiveName.length} chars; max is 50.`);
}
await createWorkspaceFork(opts, workspaceName, workspaceId); Type guard
function isValidForkName(name: string | undefined): name is string {
return typeof name === 'string' && name.length > 0 && name.length <= 50;
} Try / catch
try {
await createWorkspaceFork(opts, name, id);
} catch (e) {
if ((e as Error).message.includes('name is too long')) {
console.error('Pass a workspace_name of 50 characters or fewer.');
} else throw e;
} Prevention
- Keep fork display names under 50 characters
- Shorten branch naming conventions if branch-derived ids become names under --yes
- Truncate/slugify scripted names before passing them to the CLI
When it happens
Trigger: Passing a workspace_name positional or --create-workspace-name longer than 50 characters to `wmill workspace fork`; an explicit workspace id so long that the prefixed id is used as the name.
Common situations: Long descriptive branch names converted into fork ids under --yes (branch-derived ids can be long); pasting a long sentence as the friendly name; scripted forks embedding branch slugs from ticket systems.
Related errors
- Invalid migration name '${name}': use only letters, digits,
- Fork workspace id \`${id}\` is invalid: ${reason}. Choose a
- Unknown workspace dependencies file format: ${path}. Valid f
- Cannot push flow ${remotePath}: step(s) reference non-worksp
- Completed jobs file must contain an array of jobs
AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03).
Data as JSON: /api/errors/84c50d30e72ef9a6.
Report an issue: GitHub.