Skip to content

The daemon rewrites the tracked .the-framework/.gitignore per user, making every checkout dirty and conflicting with clean-slate deletions #1298

Description

@suleimansh

Reported on Discord (2026-07-27 evening): a conflict-markered .the-framework/.gitignore (<<<<<<< HEAD vs parent-of-8712d1f), a delete-vs-modify conflict, with the verdict ".gitignore is random". I hit the same conflict class the same day on my checkout (autostash vs the clean-slate deletion).

Mechanism

.the-framework/.gitignore is a committed file that every daemon rewrites lazily. ensureSessionsIgnored (packages/the-framework/src/sessions.ts:78, called from daemon-runtime.ts:504 on session archive) appends per-user un-ignore rules (!<userdir>/, userdir derived from git config user.email) whenever that user's lines are missing. The conversations rules (#908) sit beside them, same shape. Consequences:

  • Every machine and git identity that runs The Framework mutates a tracked file as a side effect of a session ending.
  • The session auto-commit (Session history gets lost #1179) then commits that mutation, so the file is edited concurrently on every active checkout and merges keep touching it.
  • Anyone deleting the file (the 8712d1f clean slate) collides with every checkout whose daemon just rewrote it: delete-vs-modify, exactly the pasted conflict.

Fix directions

  1. Stop tracking the file. Seed it locally per checkout and have it ignore itself; the un-ignore rules still work untracked, so sessions and LOGS.md stay committed. One-time migration: git rm --cached .the-framework/.gitignore + add it to the repo root ignore.
  2. Or drop the per-user lines: un-ignore all user dirs with one glob (!*/, !*/sessions/, !*/sessions/**) so the file is written once at seed time and never rewritten again.

Option 1 removes the whole class (a file only machines write should not be shared through git). Option 2 is smaller but the file stays tracked and clean-slate deletions still conflict once.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions