thedotmack/claude-mem · info
claude-mem: banner frame decoding failed, skipping banner:
Error message
claude-mem: banner frame decoding failed, skipping banner:
What it means
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.
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.
Defensive patterns
Strategy: fallback
Validate before calling
// sanity-check the embedded asset at build time
const raw = Buffer.from(BANNER.compressed, 'base64');
if (raw.length === 0) throw new Error('BANNER.compressed is empty — build asset corrupted'); Try / catch
try {
const raw = inflateRawSync(Buffer.from(BANNER.compressed, 'base64')).toString('utf8');
frames = raw.split(FRAME_SEP).filter(Boolean);
} catch (error) {
console.warn('claude-mem: banner frame decoding failed, skipping banner:', error);
frames = []; // fail open: playBanner bails on empty
} Prevention
- 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.
When it happens
Trigger: The embedded BANNER.compressed payload fails inflateRawSync (corrupted base64 data, wrong compression format) or the decompressed content splits into zero valid frames.
Common situations: 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.
Understand the failure class
Background: "failed to unmarshal" / json.Unmarshal errors: why parsing a response into a Go struct fails and how to fix it — this error's family across 23 libraries.
AI-assisted analysis of thedotmack/claude-mem@d8bc9755e7 (2026-09-17).
Data as JSON: /api/errors/d3232d9d9eda385f.
Report an issue: GitHub.
Appendix: source
Thrown at src/npx-cli/banner.ts:38
if (!truecolor) return '\x1b[38;5;215m';
const r = Math.min(255, Math.round(255 * brightness));
const g = Math.min(255, Math.round(180 * brightness));
const b = Math.min(255, Math.round(122 * brightness));
return `\x1b[38;2;${r};${g};${b}m`;
}
let frames: string[] | null = null;
function getFrames(): string[] {
if (frames) return frames;
// Banner is decorative — if frame payload decoding fails for any reason
// (corrupted bundle, mismatched zlib, etc.) we must not break the CLI.
// Fail open by returning an empty frame list; playBanner() bails on empty.
try {
const raw = inflateRawSync(Buffer.from(BANNER.compressed, 'base64')).toString('utf8');
frames = raw.split(FRAME_SEP).filter(Boolean);
} catch (error) {
const err = error instanceof Error ? error : new Error(String(error));
console.warn('claude-mem: banner frame decoding failed, skipping banner:', err);
frames = [];
}
return frames;
}
/** One character of a parsed frame plus whether it sits inside an accent span. */
export interface FrameCell {
ch: string;
accent: boolean;
}
/**
* Parse a raw span-marked frame (`<x>…</x>` accent markers, `\n` row
* separators) into per-character cells carrying an accent flag. Span state
* carries across newlines, matching the original single-pass styling.
*/
export function parseFrameCells(frame: string): FrameCell[][] {
const rows: FrameCell[][] = [[]];View on GitHub (pinned to d8bc9755e7)