Skip to content

claims: MCP claims store is cwd-relative (bare resolve()), so every worktree/session gets its own claims.json #3178

Description

@ruvnet

Found while writing cognitum-one/slack ADR-0037 (PR #105 there), verified 2026-09-04 against main.

v3/@claude-flow/cli/src/mcp-tools/claims-tools.ts:

const CLAIMS_DIR = '.claude-flow/claims';
function getClaimsPath(): string { return resolve(join(CLAIMS_DIR, CLAIMS_FILE)); }   // line 53
function ensureClaimsDir(): void { const dir = resolve(CLAIMS_DIR);  }               // line 57

resolve() anchors to process.cwd() of the MCP server process, not to the project root (getProjectCwd() is not used here). Consequences:

  • Under the repo's own "worktree-per-writer" rule, each worktree (and each Claude Code session with a different cwd) reads and writes a different claims.json, so claims_claim / claims_board / claims_steal do not coordinate the sessions they are meant to coordinate.
  • A session whose MCP server started in a subdirectory persists claims under that subdirectory.

Expected: one claims store per project root (anchor via the same project-cwd resolution the other file-backed tools use), or a documented per-worktree scope if that is intended.

Related: CLAUDE.md "A lease or work claim coordinates ownership; it never grants authority" — the store location decides whether it coordinates anything.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions