ruvnet/ruflo · error · TeammateError

MAILBOX_FULL

MAILBOX_FULL

Error message

JSON content exceeds maximum size of ${maxSize} bytes

What it means

safeJSONParse() refused to parse because content.length exceeds maxSize (default MAX_PAYLOAD_SIZE). A team config, saved state, messages, or mailbox file being loaded exceeds the configured byte cap — a defensive bound against oversized/untrusted persisted payloads.

Source

Thrown at v3/plugins/teammate-plugin/src/teammate-bridge.ts:219

  const resolvedTarget = path.resolve(targetPath);
  const resolvedBase = path.resolve(basePath);

  if (!resolvedTarget.startsWith(resolvedBase + path.sep) && resolvedTarget !== resolvedBase) {
    throw new TeammateError(
      'Path traversal attempt detected',
      TeammateErrorCode.PERMISSION_DENIED
    );
  }

  return resolvedTarget;
}

/**
 * Safely parse JSON with size limits
 */
function safeJSONParse<T>(content: string, maxSize: number = MAX_PAYLOAD_SIZE): T {
  if (content.length > maxSize) {
    throw new TeammateError(
      `JSON content exceeds maximum size of ${maxSize} bytes`,
      TeammateErrorCode.MAILBOX_FULL
    );
  }

  try {
    return JSON.parse(content) as T;
  } catch (error) {
    throw new TeammateError(
      'Invalid JSON content',
      TeammateErrorCode.PERMISSION_DENIED
    );
  }
}

/**
 * Sanitize environment variable value
 */

View on GitHub (pinned to fa13ee4ad6)

Solutions

  1. Reduce the input size/depth below the documented limit, or batch the input into smaller chunks.
  2. Validate the limit before processing and report the measured versus allowed value to the caller.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at v3/plugins/teammate-plugin/src/teammate-bridge.ts:219 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of ruvnet/ruflo@fa13ee4ad6 (2026-08-18). Data as JSON: /api/errors/af18d4c93fa08c02. Report an issue: GitHub.