Skip to content

Copilot CLI fails after macOS restart when persisted writer-lock device ID changes #5026

Description

@moonbox3

Describe the bug

After updating to macOS 26.7.1 and restarting, Copilot CLI fails during MCP startup and request execution with:

The shared writer lock or its directory changed.

The same error occurs with copilot mcp list, preventing normal CLI use. Authentication succeeds.

The persisted writer-lock binding contains a filesystem device ID that differs from the current device ID, although the directory and lock-file inode IDs are unchanged.

Affected version

GitHub Copilot CLI 1.0.90

Steps to reproduce the behavior

  1. Use Copilot CLI with existing configuration in ~/.copilot.
  2. Update macOS to 26.7.1 and restart. This preceded the failure on my machine; I have not independently reproduced the OS update.
  3. Launch copilot.

Observed:
"Failed to start MCP Servers: Error: The shared writer lock or its directory changed."

  1. Submit a prompt.

Observed:
"Execution failed: Error: Request session.send failed with message: The shared writer lock or its directory changed."

  1. Run copilot mcp list.

Observed:
"Error: The shared writer lock or its directory changed."

Expected behavior

Copilot should continue working after a macOS update/restart.

If a filesystem device-ID change invalidates the persisted writer-lock binding, Copilot should safely recover or provide an actionable recovery procedure.

Additional context

Environment:

  • macOS 26.7.1, build 25G241
  • Apple Silicon / arm64
  • Shell: zsh

Diagnosis:
~/.copilot/.mcp-writer.binding contained:

{"root":{"platform":"unix","device":16777232,"inode":87818635},"lock":{"platform":"unix","device":16777232,"inode":241099151}}

Current filesystem metadata reported:

  • ~/.copilot: device=16777233, inode=87818635
  • ~/.copilot/.mcp-writer.lock: device=16777233, inode=241099151

Both inode IDs were unchanged; only the device IDs differed.

An empty temporary Copilot state directory allowed copilot mcp list to succeed.

Workaround:
Backed up .mcp-writer.binding and updated only its two device IDs to match current filesystem metadata while holding an exclusive writer lock.

Verification after repair:

  • copilot mcp list succeeded.
  • A fresh interactive session connected both MCP servers.
  • A test prompt completed successfully.

The exact macOS mechanism behind the device-ID change is unconfirmed.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions