Fission-AI/OpenSpec · error
The --language option must be a single line without control…
Error message
The --language option must be a single line without control or invisible formatting characters.
What it means
Sanitization guard for --language: the value contains control characters, bidi controls, or invisible formatting characters (zero-width, line/paragraph separators, BOM), which could corrupt the config or terminal output.
Solutions
- Retype the language value without pasted formatting characters
- Strip zero-width and bidi control characters from the string
- Keep the value to a single plain-text line and retry
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/core/init.ts:1035 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Fission-AI/OpenSpec@6926ccb18a (2026-08-25).
Data as JSON: /api/errors/7826e16554d87938.
Report an issue: GitHub.
Appendix: source
Thrown at src/core/init.ts:1035
skillsInvocableCommandSkips,
removedCommandCount,
removedSkillCount,
};
}
// ═══════════════════════════════════════════════════════════
// CONFIG FILE
// ═══════════════════════════════════════════════════════════
private normalizeLanguage(language: string | undefined): string | undefined {
if (language === undefined) return undefined;
const normalized = language.trim();
if (!normalized) {
throw new Error('The --language option requires a non-empty value.');
}
if (/\p{Cc}|\p{Bidi_Control}|[\u200B\u2028\u2029\uFEFF]/u.test(normalized)) {
throw new Error(
'The --language option must be a single line without control or invisible formatting characters.'
);
}
const serializedContext = `${formatLanguageContext(normalized)}\n`;
if (Buffer.byteLength(serializedContext, 'utf8') > MAX_CONTEXT_SIZE) {
throw new Error(
`The --language option is too long for OpenSpec's ${MAX_CONTEXT_SIZE / 1024}KB project context limit.`
);
}
return normalized;
}
private languageContext(): string | undefined {
if (!this.language) return undefined;
return formatLanguageContext(this.language);
}
private async assertLanguageCanBeApplied(View on GitHub (pinned to 6926ccb18a)