Skip to content

bug: writeDisplayCache error silently discarded in snapshot-injection path #369

@claude

Description

@claude

Problem

In cmd/run.go, there are three call sites for writeDisplayCache. Two of them correctly log the error as a warning:

  • Line 238: if err := writeDisplayCache(output); err != nil { logFn("[warn] display cache write error: %v", err) }
  • Line 362: same pattern

But the third call site (the snapshot-injection path) silently discards the error:

  • Line 428: _ = writeDisplayCache(output)

This means that when the context bomb is assembled with a snapshot (the runWithSnapshot path), any failure to write the display cache is silently dropped — the user won't see it in logs, and show-cache will silently have nothing to display.

Fix

Replace the blank-identifier discard on line 428 with the same warn-log pattern used at lines 238 and 362:

if err := writeDisplayCache(output); err != nil {
    logFn("[warn] display cache write error: %v", err)
}

Location

  • cmd/run.go, line 428

@claude please implement this

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions