affaan-m/ECC · error

MEMORY_READ_INCOMPLETE

MEMORY_READ_INCOMPLETE

Error message

Memory lookup is incomplete. Inspect the authorized vault before retrying.

What it means

toolFailure maps internal memory-read exceptions to a client-facing result. When the underlying error carries code ECC_MEMORY_INCOMPLETE, the read partially failed (e.g. some vault files unreadable), so the server returns a structured MEMORY_READ_INCOMPLETE error result (isError: true) telling the caller the lookup is not trustworthy and to inspect the authorized vault before retrying.

Solutions

  1. Manually inspect the authorized memory vault for unreadable, corrupted, or partially-written files and repair or remove them
  2. Check file permissions on vault entries and restore read access
  3. Pause/complete any sync process writing to the vault, then retry memory_read
  4. Re-run memory_save for entries that are missing or damaged to rebuild them
Defensive patterns

Strategy: fallback

Try / catch

const res = await readMemory();
if (res.isError && res.error?.code === 'MEMORY_READ_INCOMPLETE') {
  // treat all returned entries as possibly stale; fall back to manual vault inspection
}

Prevention

When it happens

Trigger: A memory_read operation where one or more vault files/entries could not be read or parsed, causing the reader to surface ECC_MEMORY_INCOMPLETE, which toolFailure rewrites into MEMORY_READ_INCOMPLETE.

Common situations: Vault directory partially synced (cloud sync in progress); permission changes making some memory files unreadable; corrupted or partially written memory file; symlinked/external paths outside the authorized vault root.


AI-assisted analysis of affaan-m/ECC@8321021c54 (2026-09-16). Data as JSON: /api/errors/1af973e49bd626b0. Report an issue: GitHub.

Appendix: source

Thrown at scripts/memory-mcp.mjs:216

function textResult(payload) {
  const text = JSON.stringify(payload, null, 2);
  if (Buffer.byteLength(text, 'utf8') > MAX_RESPONSE_BYTES) {
    throw new JsonRpcError(-32001, 'Memory tool response exceeds the bounded output limit.');
  }
  return {
    content: [{
      type: 'text',
      text,
    }],
  };
}

function toolFailure(code, error) {
  if (code === 'MEMORY_READ_FAILED' && error?.code === 'ECC_MEMORY_INCOMPLETE') {
    return {
      ...textResult({ error: {
        code: 'MEMORY_READ_INCOMPLETE',
        message: 'Memory lookup is incomplete. Inspect the authorized vault before retrying.',
      } }),
      isError: true,
    };
  }
  const suspectedSecret = error instanceof Error
    && error.message.toLowerCase().includes('suspected secret');
  const message = suspectedSecret
    ? 'Memory operation rejected a suspected secret.'
    : {
      MEMORY_WRITE_REJECTED: 'Memory write was rejected by validation.',
      MEMORY_SEARCH_FAILED: 'Memory search failed validation.',
      MEMORY_READ_FAILED: 'Memory could not be read. It may be missing, not visible, or invalid.',
      MEMORY_DOCTOR_FAILED: 'Memory doctor could not inspect the authorized vault.',
    }[code] || 'Memory operation failed.';
  return {
    ...textResult({
      error: {

View on GitHub (pinned to 8321021c54)