Skip to content

State per .loopway project, in .loopway/state/ - #504

Merged
mcwhittemore merged 4 commits into
mainfrom
v2-project-state
Nov 11, 2026
Merged

mcwhittemore merged 4 commits into
mainfrom
v2-project-state

Conversation

@mcwhittemore

@mcwhittemore mcwhittemore commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #503

State is per project, and stays in ~/.loopway. stateDir(home, projectDir) in state.ts is the one place that says where: <home>/state/<slug>, where the slug is the full path of the .loopway folder loopway resolved, with every character other than a letter or digit turned into - (the way Claude Code names ~/.claude/projects/). state.json and threads/<id>.json are built from it. Nothing is written into the project, so there is no .gitignore to manage. LOOPWAY_HOME moves all of it, so tests give it a temp dir (no separate LOOPWAY_STATE). No migration: old ~/.loopway/threads and state.json are ignored, and the README says they can be deleted.

home in loadState, saveState, loadThreads and Threads is now dir, since it is the project's folder. For #502: its threadLogPath(home, id) and any sent records take this dir too.

Test it locally

  1. npm ci && npm test && npm run typecheck && npm run lint && npm run format:check.
  2. Make a/ and b/, each with .loopway/dev.md (repos: craftmilldev/loopway-sandbox, on: issue).
  3. Run loopway in a/ and open a sandbox issue. loopway threads in a/ lists a dev thread; in b/ it lists nothing, and loopway in b/ only sees issues opened after it started.
  4. a/.loopway/ holds only dev.md; ~/.loopway/state/ has one folder per project, named after its .loopway path.
  5. ~/.loopway/ gains only state/.

The run is recorded in verifications/504.md.

🤖 Generated with Claude Code

@github-actions github-actions Bot added the conflicts Conflicts with its base branch; set and cleared by the Label merge conflicts workflow label Nov 11, 2026
@github-actions

Copy link
Copy Markdown

This PR conflicts with its base branch. Rebase onto it, resolve the conflicts, and push.

mcwhittemore and others added 3 commits November 10, 2026 20:45
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot removed the conflicts Conflicts with its base branch; set and cleared by the Label merge conflicts workflow label Nov 11, 2026
Comment thread docs/developing.md Resolved
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mcwhittemore
mcwhittemore merged commit 7a1d288 into main Nov 11, 2026
2 checks passed
@mcwhittemore
mcwhittemore deleted the v2-project-state branch November 11, 2026 01:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2.0: keep state per .loopway project, not shared in ~/.loopway

1 participant