diegosouzapw/OmniRoute · error
Skill file write exceeds the
Error message
Skill file write exceeds the ${MAX_FILE_BYTES} byte limit What it means
Size-limit guard in file_write: Buffer.byteLength of the submitted content (in utf8) exceeds MAX_FILE_BYTES. This bounds per-write payload size so a skill invocation cannot flood the workspace disk; use append-mode chunking or raise the configured limit for genuinely large writes.
Solutions
- Split the content into chunks below MAX_FILE_BYTES and append sequentially
- Raise MAX_FILE_BYTES in server configuration if large writes are intentional
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/lib/skills/builtins.ts:245 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25).
Data as JSON: /api/errors/0a4be0a4aa442050.
Report an issue: GitHub.
Appendix: source
Thrown at src/lib/skills/builtins.ts:245
file_write: async (input, context) => {
const {
path: inputPath,
content,
append = false,
overwrite = true,
} = input as {
path: string;
content: string;
append?: boolean;
overwrite?: boolean;
};
if (!inputPath || typeof inputPath !== "string" || typeof content !== "string") {
throw new Error("Missing required fields: path, content");
}
const bytesWritten = Buffer.byteLength(content, "utf8");
if (bytesWritten > MAX_FILE_BYTES) {
throw new Error(`Skill file write exceeds the ${MAX_FILE_BYTES} byte limit`);
}
const { resolved, relative } = resolveWorkspacePath(inputPath, context);
await fs.mkdir(path.dirname(resolved), { recursive: true });
await fs.writeFile(resolved, content, {
encoding: "utf8",
flag: append ? "a" : overwrite ? "w" : "wx",
});
return { success: true, path: relative, bytesWritten, context: context.apiKeyId };
},
http_request: async (input, context) => {
const {
url,
method = "GET",
headers: rawHeaders,
body,View on GitHub (pinned to a179ffed5b)