Skip to content

🐛 Copilot CLI's own save re-breaks the config.json relink after launch (#18445 follow-up) #18671

Closed

Description

@clubanderson

Problem

#18445 relinks a per-agent ~/.copilot/config.json to the shared /data/home/.copilot/config.json at launch and restart, and the poller repairs it before a login-prompt restart. But the Copilot CLI does its atomic save (temp file + rename) a few seconds after it starts, which replaces the fresh symlink with a private regular file again.

Seen on a v6.41.0 hive (Bluefin) on 2026-11-17: right after the upgrade, every Copilot agent's config.json was a regular file again within seconds of launch. Today the copies match the shared login, so agents work. But a later dashboard re-login (device flow) only updates the shared file, so it does not reach running agents until each one restarts, and the probe then flags them as diverged.

Expected

A dashboard re-login reaches every running Copilot agent without a restart, and the per-agent config.json stays linked (or in sync) after the CLI's own saves.

Possible approaches (pick in the PR)

  • Watch the per-agent .copilot/ dir (fsnotify, or the existing poll loop) and relink when the CLI's rename replaces the symlink, copying any newer CLI-written fields back to the shared file first so they are not lost.
  • Or, on a shared-file change (dashboard login), propagate the new token into each per-agent private copy instead of relying on a link.
  • Keep the 🐛 Relink a Copilot config.json the CLI's atomic save replaced #18445 guard: never overwrite a private copy holding a login when the shared file holds none.

Acceptance

  • Unit test: simulate the CLI's temp+rename over the symlink after launch; assert it is relinked/synced within one poll interval.
  • Unit test: update the shared file; assert running agents' effective config sees the new token without a restart.
  • No secrets logged. changelog.d fragment.

Follow-up to #18443 / #18445. Target v5 (top-up to v6 after).

Activity

  1. added
    kind/bugCategorizes issue or PR as related to a bug.
    triage/acceptedIndicates an issue or PR is ready to be actively worked on.
    on Nov 17, 2026
  2. self-assigned this
    on Nov 17, 2026
  3. added
    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
    on Nov 17, 2026
  4. clubanderson commented on Nov 17, 2026

    @clubanderson
    MemberAuthor

    Claimed: a dispatcher agent is working on this now.

  5. hivecommons-hive commented on Nov 17, 2026

    @hivecommons-hive
    Contributor

    A hive agent asked to open a pull request that would close this issue, but it is already claimed by clubanderson. No PR was opened; the owner decides whether to proceed.

  6. hivecommons-hive commented on Nov 17, 2026

    @hivecommons-hive
    Contributor

    Thanks for filing this issue! To help us reproduce and investigate, could you please include the commit SHA of the build you're running?

    You can find it by running:

    git rev-parse --short HEAD
    

    Or check the bottom of the console UI for the version string.

    This issue will be on hold until a SHA is provided. Simply add a comment with the SHA and the label will be automatically removed.

  7. clubanderson commented on Nov 17, 2026

    @clubanderson
    MemberAuthor

    Fixed in #18673 (merged to v5): the pane poller now relinks a running Copilot agent's config.json within one poll interval of the CLI's own save, merging CLI-written non-credential fields into the shared file first (shared login wins), so a dashboard re-login reaches running agents without a restart. The #18445 guard for a private copy holding the only login is kept.

  8. added a commit that references this issue on Nov 17, 2026
    18d30bf
  9. added 2 commits that reference this issue on Nov 17, 2026
    c7d563d
    218f444
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/bugCategorizes issue or PR as related to a bug.needs-shatriage/acceptedIndicates an issue or PR is ready to be actively worked on.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions