Skip to content

codev update reports false conflicts on CLAUDE.md and AGENTS.md in an unedited project #1982

Done

Description

@waleedkadous

Problem

codev update reports two conflicts on a project nobody has edited. Every adopter's update says ! 2 conflicts; without --agent it would start a merge session over nothing.

Found in project 1951's verify step by the builder; reproduced by the architect. It is not caused by that project: nothing between the previous installed build and the current one touches the templates, update.ts or managed-block.ts.

Reproduce

In an empty directory outside any repository:

codev init fresh --yes
cd fresh
codev update --dry-run

Output on a build from main at 6cb29ec8e:

  ! (conflict) CLAUDE.md
    New version would be saved as: CLAUDE.md.codev-new
  ! (conflict) AGENTS.md
    New version would be saved as: AGENTS.md.codev-new
  + (hot-tier) would create missing codev/resources/{arch,lessons}-critical.md
  + (cold-tier) would create missing codev/resources/{arch,lessons-learned}.md
  ~ (hot-tier) would refresh CLAUDE.md / AGENTS.md managed block
Summary:
  ! 2 conflicts

The project was initialized seconds earlier by the same build and nothing in it was changed.

What is wrong

  1. False conflicts. CLAUDE.md and AGENTS.md are reported as conflicts. In a real run (codev update --agent), the builder saw .codev-new files written that are byte-identical to the files beside them (a diff of 0 lines). Likely cause, not proved: the comparison is made against the template before the hot-tier managed block is rendered into it, so a file that init wrote never matches.
  2. Dry run disagrees with the real run. --dry-run says it would create codev/resources/{arch,lessons}-critical.md and {arch,lessons-learned}.md, which init already wrote; the real run prints no such line.

Ask

  1. Find the cause; do not assume the one above.
  2. An unedited CLAUDE.md / AGENTS.md is reported up to date, with no .codev-new. A file the adopter really edited outside the managed block is still a conflict and still keeps the edit (that guard works today for skills and must keep working here).
  3. A .codev-new identical to the file beside it is never written.
  4. --dry-run prints what the real run would do, no more and no less, for the hot-tier and cold-tier lines.
  5. Tests: init then update on an untouched project gives zero conflicts and zero .codev-new; the same after an edit outside the managed block gives one conflict with the edit kept; dry-run and real-run reports agree.
  6. Verify with the three commands above on an installed build.

Activity

  1. added
    area/scaffold
    on Nov 25, 2026
  2. waleedkadous commented on Nov 25, 2026

    @waleedkadous
    ContributorAuthor

    On it! Working on a fix now.

  3. added 8 commits that reference this issue on Nov 25, 2026
  4. added a commit that references this issue on Nov 25, 2026
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

    area/scaffold

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions