Summary
harness evidence-bundle fails deterministically with SESSION_POPULATION_BINDING_MISMATCH when the review is run from a Claude Code session whose own transcript lives in the target workspace's session directory. Both the sessionEvidence lane and the lead lane become unavailable, so the whole run stops per the skill contract.
Environment
- better-harness 0.4.0 (marketplace clone @ 446bb27, 2026-07-31)
- Host: Claude Code (platform
claude)
- OS: macOS (Darwin 25.3.0, arm64)
- Node: v22.23.1
Reproduction
- Open Claude Code in a workspace that has in-window session history (in my case 131 eligible sessions / 527 task episodes in the last 30 days).
- Invoke
/better-harness, which runs:
node scripts/better-harness.mjs harness evidence-bundle \
--platform claude --workspace <target> --language zh \
--depth normal --since 2026-07-01 --until 2026-07-31 --format json
- Bundle comes back
status: failed:
lanes.sessionEvidence: unavailable, SESSION_POPULATION_BINDING_MISMATCH
lanes.projectHarness: available
lanes.agentCustomize: available
lead: unavailable, SESSION_POPULATION_BINDING_MISMATCH
Reproduced 4/4 times, across both normal and quick depths and different --until values (2026-07-31 and 2026-08-01).
What I checked
session-analysis facts with the same window works fine standalone (131 eligible sessions, 527 task episodes, candidates emitted) — the underlying session data is readable.
- Re-running the analyzer with the bundle's own options (
--selection all-eligible --limit 5 --episode-limit 5) returns eligibleSessions: 131, selectedSessions: 131.
- Running the same bundle command against a workspace with zero sessions succeeds (
sessionEvidence available, eligibleSessions: 0). So collection only breaks when real in-window sessions exist.
Hypothesis
The reviewing session itself is an active session inside the scanned directory (~/.claude/projects/<workspace>/). The frozen population count and the analyzer's all-eligible count appear to disagree over the active session, tripping the binding check in scripts/harness-analysis/evidence-bundle/session-evidence.mjs (eligibleCount !== population.binding.eligible.count || selectedCount !== population.binding.eligible.count).
Expected
Reviewing a workspace from a live session inside that same workspace is the primary usage path for the Claude Code host, so the population freeze and the analyzer should agree on how the active session is counted (both include it or both omit it), rather than failing closed.
Workaround (unverified)
Run the review from a Claude Code session in a different directory, targeting the workspace to review — consistent with the hypothesis that the in-workspace active session is what trips the check.
Summary
harness evidence-bundlefails deterministically withSESSION_POPULATION_BINDING_MISMATCHwhen the review is run from a Claude Code session whose own transcript lives in the target workspace's session directory. Both thesessionEvidencelane and theleadlane become unavailable, so the whole run stops per the skill contract.Environment
claude)Reproduction
/better-harness, which runs:status: failed:lanes.sessionEvidence: unavailable,SESSION_POPULATION_BINDING_MISMATCHlanes.projectHarness: availablelanes.agentCustomize: availablelead: unavailable,SESSION_POPULATION_BINDING_MISMATCHReproduced 4/4 times, across both
normalandquickdepths and different--untilvalues (2026-07-31 and 2026-08-01).What I checked
session-analysis factswith the same window works fine standalone (131 eligible sessions, 527 task episodes, candidates emitted) — the underlying session data is readable.--selection all-eligible --limit 5 --episode-limit 5) returnseligibleSessions: 131, selectedSessions: 131.sessionEvidenceavailable,eligibleSessions: 0). So collection only breaks when real in-window sessions exist.Hypothesis
The reviewing session itself is an active session inside the scanned directory (
~/.claude/projects/<workspace>/). The frozen population count and the analyzer's all-eligible count appear to disagree over the active session, tripping the binding check inscripts/harness-analysis/evidence-bundle/session-evidence.mjs(eligibleCount !== population.binding.eligible.count || selectedCount !== population.binding.eligible.count).Expected
Reviewing a workspace from a live session inside that same workspace is the primary usage path for the Claude Code host, so the population freeze and the analyzer should agree on how the active session is counted (both include it or both omit it), rather than failing closed.
Workaround (unverified)
Run the review from a Claude Code session in a different directory, targeting the workspace to review — consistent with the hypothesis that the in-workspace active session is what trips the check.