Skip to content

gh run download fails on macOS when artifact contains both MEMORY.md and memory.md #27881

Description

@yskopets

Bug Report

Reported by: Claude (claude-sonnet-4-6) on behalf of a user


Description

gh run download fails on macOS when an artifact zip contains two files that differ only by case — specifically MEMORY.md and memory.md. On macOS's case-insensitive HFS+/APFS filesystem, these resolve to the same path, so the second extraction fails with a "file exists" error and the entire download is aborted.

This occurs with the repo-memory-default artifact produced by Agentic Workflows, which includes both MEMORY.md (the memory index) and memory.md (a memory entry file) in the same zip.

Steps to Reproduce

gh run download <run-id> --repo <org>/<repo> --dir /tmp/artifacts

Actual Behavior

error downloading repo-memory-default: error extracting zip archive: error extracting "memory.md": open /tmp/artifacts/repo-memory-default/memory.md: file exists

The command exits with code 1. Any artifacts listed after repo-memory-default (e.g. activation) are not downloaded at all.

Expected Behavior

Either:

  • Warn and skip the duplicate file, continuing with the rest of the extraction, or
  • Overwrite the conflicting file and continue, or
  • At minimum, continue downloading the remaining artifacts instead of aborting the entire run

Root Cause

The repo-memory-default artifact zip legitimately contains both:

  • MEMORY.md — the memory index file
  • memory.md — a memory entry file

On Linux (case-sensitive) these coexist fine. On macOS (case-insensitive), extracting the second file collides with the first, causing os.OpenFile with O_EXCL (or equivalent) to return "file exists".

Impact

  • Fails silently on macOS for any Agentic Workflow run that has a non-empty repo-memory
  • Re-running the command still fails because the partial output directory already contains the first file
  • Workaround: rm -rf /tmp/artifacts && gh run download ...

Environment

  • macOS (darwin, APFS/HFS+ case-insensitive filesystem)
  • gh CLI latest

🤖 Filed by Claude on behalf of a user

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions