{"record":{"id":"d3232d9d9eda385f","repo":"thedotmack/claude-mem","slug":"claude-mem-banner-frame-decoding-failed-skipping","errorCode":null,"errorMessage":"claude-mem: banner frame decoding failed, skipping banner:","messagePattern":"claude-mem: banner frame decoding failed, skipping banner:","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"src/npx-cli/banner.ts","lineNumber":38,"sourceCode":"  if (!truecolor) return '\\x1b[38;5;215m';\n  const r = Math.min(255, Math.round(255 * brightness));\n  const g = Math.min(255, Math.round(180 * brightness));\n  const b = Math.min(255, Math.round(122 * brightness));\n  return `\\x1b[38;2;${r};${g};${b}m`;\n}\n\nlet frames: string[] | null = null;\nfunction getFrames(): string[] {\n  if (frames) return frames;\n  // Banner is decorative — if frame payload decoding fails for any reason\n  // (corrupted bundle, mismatched zlib, etc.) we must not break the CLI.\n  // Fail open by returning an empty frame list; playBanner() bails on empty.\n  try {\n    const raw = inflateRawSync(Buffer.from(BANNER.compressed, 'base64')).toString('utf8');\n    frames = raw.split(FRAME_SEP).filter(Boolean);\n  } catch (error) {\n    const err = error instanceof Error ? error : new Error(String(error));\n    console.warn('claude-mem: banner frame decoding failed, skipping banner:', err);\n    frames = [];\n  }\n  return frames;\n}\n\n/** One character of a parsed frame plus whether it sits inside an accent span. */\nexport interface FrameCell {\n  ch: string;\n  accent: boolean;\n}\n\n/**\n * Parse a raw span-marked frame (`<x>…</x>` accent markers, `\\n` row\n * separators) into per-character cells carrying an accent flag. Span state\n * carries across newlines, matching the original single-pass styling.\n */\nexport function parseFrameCells(frame: string): FrameCell[][] {\n  const rows: FrameCell[][] = [[]];","sourceCodeStart":20,"sourceCodeEnd":56,"githubUrl":"https://github.com/thedotmack/claude-mem/blob/d8bc9755e74915e5c3b999181e10a67c889bce2a/src/npx-cli/banner.ts#L20-L56","documentation":"getFrames() decompresses the base64+raw-deflate banner animation bundled with claude-mem. If inflation or parsing fails, it logs this warning and returns an empty frame list; playBanner() then skips the banner entirely — the CLI continues normally without the animation.","triggerScenarios":"The embedded BANNER.compressed payload fails inflateRawSync (corrupted base64 data, wrong compression format) or the decompressed content splits into zero valid frames.","commonSituations":"Corrupted install/broken build where the banner asset was mangled; an npm install that truncated files; a build pipeline that transformed/minified the embedded constant; exotic encodings altering the asset.","solutions":["Reinstall the package (npm cache clean + fresh install) to restore the banner asset.","Rebuild with `npm run build-and-sync` if running from source.","Verify the BANNER.compressed constant is intact in the built plugin.","No action strictly needed — the banner is cosmetic and failure is fail-open by design."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"// sanity-check the embedded asset at build time\nconst raw = Buffer.from(BANNER.compressed, 'base64');\nif (raw.length === 0) throw new Error('BANNER.compressed is empty — build asset corrupted');","typeGuard":null,"tryCatchPattern":"try {\n  const raw = inflateRawSync(Buffer.from(BANNER.compressed, 'base64')).toString('utf8');\n  frames = raw.split(FRAME_SEP).filter(Boolean);\n} catch (error) {\n  console.warn('claude-mem: banner frame decoding failed, skipping banner:', error);\n  frames = []; // fail open: playBanner bails on empty\n}","preventionTips":["Verify build pipeline does not minify/mangle the compressed banner constant.","Reinstall the package if the CLI binary/asset looks truncated.","Treat the banner as cosmetic — empty frames simply skip the animation."],"tags":["banner","decompression","cosmetic","fail-open"],"backgroundTag":"json-unmarshal-failed","analyzedSha":"d8bc9755e74915e5c3b999181e10a67c889bce2a","analyzedAt":"2026-09-17T16:40:26.182Z","contentChangedAt":"2026-09-17T16:40:26.182Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}