diegosouzapw/OmniRoute · error

Skill file exceeds the ${MAX_FILE_BYTES} byte read limit

Error message

Skill file exceeds the ${MAX_FILE_BYTES} byte read limit

What it means

Error "Skill file exceeds the ${MAX_FILE_BYTES} byte read limit" thrown in diegosouzapw/OmniRoute.

Source

Thrown at src/lib/skills/builtins.ts:214

export const builtinSkills: Record<string, SkillHandler> = {
  file_read: async (input, context) => {
    const { path: inputPath, encoding = "utf8" } = input as {
      path: string;
      encoding?: BufferEncoding;
    };
    if (!inputPath || typeof inputPath !== "string") {
      throw new Error("Missing required field: path");
    }
    if (encoding !== "utf8" && encoding !== "base64") {
      throw new Error("Unsupported encoding. Use utf8 or base64.");
    }

    const { resolved, relative } = resolveWorkspacePath(inputPath, context);
    const stat = await fs.stat(resolved);
    if (!stat.isFile()) throw new Error("Skill file path must point to a file");
    if (stat.size > MAX_FILE_BYTES) {
      throw new Error(`Skill file exceeds the ${MAX_FILE_BYTES} byte read limit`);
    }

    return {
      success: true,
      path: relative,
      content: await fs.readFile(resolved, encoding),
      bytesRead: stat.size,
      encoding,
      context: context.apiKeyId,
    };
  },

  file_write: async (input, context) => {
    const {
      path: inputPath,
      content,
      append = false,
      overwrite = true,

View on GitHub (pinned to a179ffed5b)

When it happens

Trigger: Thrown at src/lib/skills/builtins.ts:214 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/752038399d6bc6f3. Report an issue: GitHub.