Troubleshooting
This guide covers common issues you may encounter with LumenFlow and how to resolve them.
Gate Failures
Section titled “Gate Failures”Format check fails
Section titled “Format check fails”Symptom:
Fix:
Lint check fails
Section titled “Lint check fails”Symptom:
Fix:
- Read the error message to understand the issue
- Fix the code (don’t disable the rule unless necessary)
- Retry:
pnpm wu:prep --id WU-XXX
Common lint fixes:
| Error | Fix |
| ----------------------- | -------------------------------------- |
| no-explicit-any | Add proper TypeScript types |
| no-unused-vars | Remove the variable or prefix with _ |
| exhaustive-deps | Add missing useEffect dependencies |
| no-restricted-imports | Use the correct import path |
Type check fails
Section titled “Type check fails”Symptom:
Fix:
- Fix the first error (later errors often cascade from earlier ones)
- Save and check again
- Repeat until clean
Tests fail
Section titled “Tests fail”Symptom:
Fix:
- Run the failing test in isolation:
pnpm test src/__tests__/auth.test.ts - Debug: check test setup, mocks, and assertions
- Fix and retry
Common causes:
- Mocks not reset between tests (use
beforeEach) - Async tests not awaited
- Environment differences (CI vs local)
Pre-existing gate failures
Section titled “Pre-existing gate failures”If gates fail on code you didn’t change:
-
Verify the failure existed before your changes
-
Use a named gate skip only when the gate is explicitly skippable
-
Create a follow-up WU to fix the issue
WU State Issues
Section titled “WU State Issues”WU stuck in in_progress
Section titled “WU stuck in in_progress”Symptom: WU shows in_progress but worktree is gone or work is done elsewhere.
Fix:
Use restore first when the WU is active or recently active and its lane branch still exists. It
recreates the worktree without resetting WU status, branch, baseline/main metadata, or completion
evidence. Use reset for orphaned ready / in_progress state only after restore is impossible
or intentionally not wanted.
WU status mismatch
Section titled “WU status mismatch”Symptom: backlog.md says one status, WU YAML says another.
Fix:
Lane already has a WU in progress
Section titled “Lane already has a WU in progress”Symptom:
Fix:
- Check if WU-040 is truly in progress:
pnpm wu:status --id WU-040 - If blocked, mark it:
pnpm wu:block --id WU-040 --reason "Waiting for API" - If done, complete it:
pnpm wu:done --id WU-040 - If orphaned, recover:
pnpm wu:recover --id WU-040 --action reset
Lane lock not auto-clearing despite dead PID
Section titled “Lane lock not auto-clearing despite dead PID”Symptom:
The lock holder’s process is no longer running, but the lock is not auto-cleared.
Explanation: Lane locks persist after the wu:claim process exits. A dead PID alone does not trigger auto-clearing — the lock must also be older than 2 hours (stale). This prevents a second claim from stealing a legitimately held lane.
Fix:
- If the lock is recent (less than 2 hours old), it is likely still valid. Complete or release the existing WU first.
- If the lock is genuinely abandoned, unlock manually:
- Locks older than 2 hours with a dead PID will auto-clear on the next
wu:claimattempt.
Evidence-only state drift during wu:done
Section titled “Evidence-only state drift during wu:done”Symptom:
But git status shows only .lumenflow/state/packs/software-delivery/wu-events.jsonl as modified (from a recent wu:brief run).
Cause: Running wu:brief records evidence to wu-events.jsonl. If other WUs merged to main and triggered auto-rebase, the rebase could fail because this workflow-generated file was dirty.
Fix: As of v3.19.0, wu:done auto-rebase automatically preserves and restores wu:brief evidence when wu-events.jsonl is the only dirty file. If you’re on an older version, commit the evidence file before retrying:
Ownership violation on wu:block or wu:release
Section titled “Ownership violation on wu:block or wu:release”Symptom:
or:
Cause: As of v3.19.0, state-mutating commands validate session ownership. You’re trying to modify a WU that belongs to another agent session.
Fix:
- Don’t modify another agent’s WU to free a lane. Wait for the owning WU to complete or block itself.
- If you have legitimate reason for cross-session recovery, use the override:
All overrides are audited to .lumenflow/ownership-override-audit.log.
Worktree Issues
Section titled “Worktree Issues”Worktree not found
Section titled “Worktree not found”Symptom:
Fix:
Changes made in wrong directory
Section titled “Changes made in wrong directory”Symptom: You made changes in main instead of the worktree.
Fix:
Worktree has merge conflicts
Section titled “Worktree has merge conflicts”Symptom: Conflicts after rebasing the worktree branch.
Fix:
Git Issues
Section titled “Git Issues”wu:done fails with “not a fast-forward”
Section titled “wu:done fails with “not a fast-forward””Symptom:
Cause: Main has new commits since you started your WU.
Fix:
wu:done fails with “Worktree has uncommitted changes”
Section titled “wu:done fails with “Worktree has uncommitted changes””Symptom:
Cause: wu:done requires a clean, committed worktree before it can merge.
Fix:
If the changes were accidental, restore the files, then retry.
Hooks block my commit
Section titled “Hooks block my commit”Symptom:
Cause: You’re trying to commit WU work from the main directory.
Fix:
Commit message missing WU ID
Section titled “Commit message missing WU ID”Symptom:
Fix: Include the WU ID in the commit message, for example:
Branch drift warning
Section titled “Branch drift warning”Symptom:
Fix:
Parallel completions detected
Section titled “Parallel completions detected”Symptom:
Cause: Other WUs merged to main while your WU was in progress.
Fix: Rebase your worktree onto main, then retry:
Metadata rebase audit appears after wu:done
Section titled “Metadata rebase audit appears after wu:done”When wu:done resolves governed metadata conflicts during an automatic rebase, LumenFlow appends
an audit row to .lumenflow/meta-rebase-audit.ndjson. The file is append-only local evidence. It
is intentionally ignored by Git and remains on disk across lumenflow init and
lumenflow:upgrade.
Do not commit the audit and do not delete it to satisfy gates. Incremental format checks exclude
only this exact normalized runtime path because Prettier does not parse NDJSON; changed source files
are still formatted and checked normally. If an older workspace shows the file as untracked, run
lumenflow:upgrade to reconcile .gitignore. Reconciliation adds the canonical ignore entry
without deleting or rewriting existing audit bytes.
Software Delivery State Namespace
Section titled “Software Delivery State Namespace”As of the state-namespace migration (WU-3378), Software Delivery state (the WU
event log, stamps, archive, merge lock, telemetry, flow log, incidents, and
commands log) resolves under a pack-owned namespace instead of generic shared
.lumenflow/<name> paths:
Agent session state (.lumenflow/sessions/) stays at the shared kernel path —
it’s a cross-pack contract with the agent-runtime pack and is not part of
this namespace.
Detection and migration: every CLI command checks for the sentinel file
above before running main(). If it’s missing and legacy .lumenflow/state,
.lumenflow/stamps, etc. exist, LumenFlow runs a one-way, atomic migration:
it copies the legacy content into the namespace through a private staging
directory, then promotes it with a single atomic rename, then records the
sentinel (source digest, target schema version, per-category file counts —
no secrets). The legacy directories are never deleted or written back to
— they remain on disk as a historical record. Once the sentinel exists,
subsequent CLI invocations skip re-verification (a single file-existence
check), so steady-state startup cost is unaffected.
Recovery: the migration is fail-closed. If it’s interrupted mid-run, the
next invocation either resumes cleanly (a crash before the atomic promote
just leaves disposable scratch space that gets cleared) or finalizes cleanly
(a crash after the promote but before the sentinel just needs the sentinel
written — no data is re-copied or duplicated). If it detects the legacy
source has changed since a prior successful migration (tampering or manual
edits), or that the target namespace already contains data that doesn’t match
what the legacy source would produce, it refuses to proceed and leaves both
locations untouched — inspect .lumenflow/state/packs/software-delivery/
manually before retrying.
Removal: lumenflow:uninstall cleans up both the new namespace and any
remaining legacy directories.
Configuration: workspace.yaml’s software_delivery.state.* fields (all
except base, the kernel-shared .lumenflow root) may still be overridden,
but overrides must resolve inside the pack namespace — an override that
points outside .lumenflow/state/packs/software-delivery is rejected at
startup instead of silently redirecting state to a shared writer path.
CLI Issues
Section titled “CLI Issues”Command not found: wu-create
Section titled “Command not found: wu-create”Symptom:
Fix:
Config validation errors
Section titled “Config validation errors”Symptom:
Fix:
- Check the error message for the specific field
- Compare with the Configuration Reference
- Fix the YAML syntax or values
Validate without running:
Memory checkpoint fails
Section titled “Memory checkpoint fails”Symptom:
Fix:
wu:done warns about missing checkpoints
Section titled “wu:done warns about missing checkpoints”Symptom:
Fix: Create checkpoints during long sessions:
Context Validation Errors
Section titled “Context Validation Errors”LumenFlow commands include context-aware validation that checks your location, WU status, and git state before running. When validation fails, you’ll see an error with a copy-paste fix.
WRONG_LOCATION
Section titled “WRONG_LOCATION”Symptom:
Fix: Run the command from the correct location. wu:done runs from main; wu:prep runs from the worktree.
WRONG_STATUS
Section titled “WRONG_STATUS”Symptom:
Fix: Claim the WU first: pnpm wu:claim --id WU-042 --lane "Your Lane"
GIT_DIRTY
Section titled “GIT_DIRTY”Symptom:
Fix: Commit your changes before running wu:prep:
Configuring Validation
Section titled “Configuring Validation”You can adjust validation behavior in workspace.yaml:
Enforcement Hooks
Section titled “Enforcement Hooks”pnpm lumenflow:integrate is a deprecation no-op as of WU-3543 — it prints migration guidance and exits 0 without writing any files. LumenFlow no longer generates or manages AI-client-specific enforcement hooks. If your project has a .claude/hooks/ directory from an older LumenFlow version, it is a snapshot — your file now, never regenerated or touched by LumenFlow again. Adapting an enforcement-hook layer into your own tool is a repo-owner task; see AI Coding Assistant Integrations for a copyable example.
If a hook blocks your operation, check:
- Are you in a worktree? Hooks block edits outside worktrees. Run
pwdand verify. - Do you have a claimed WU? Some hooks require an active WU for edits.
- Is the file in your code_paths? Hooks may restrict edits to scoped files.
See Agent Safety for the full enforcement architecture.
Bootstrap And Local Runtime Prerequisites
Section titled “Bootstrap And Local Runtime Prerequisites”Clean WU worktrees may not have packages/@lumenflow/cli/dist built locally. Root LumenFlow package
scripts should route through node tools/cli-entry.mjs <entry> so commands can use an existing main
checkout dist or build on demand instead of failing with MODULE_NOT_FOUND.
If a package script edit adds or changes LumenFlow CLI aliases, run:
The live probes cover common agent entry points such as mem:create, orchestrate:monitor,
lumenflow:commands, and lumenflow:setup-prereqs.
Before local database or local model workflows, run:
The report checks Supabase CLI, Docker, and Supabase local stack readiness when Supabase config or
deps are detected. It also checks Ollama binary, OpenAI-compatible local API, and configured model
readiness when Ollama deps or OLLAMA_* env vars are present.
Official setup references:
- Supabase local development
- Supabase CLI getting started
- Ollama API introduction
- Ollama OpenAI compatibility
The prereq report intentionally omits local service keys and token-shaped values. Do not paste raw
supabase start, .envrc, or provider-token output into issues, WU notes, or prompts.
Still Stuck?
Section titled “Still Stuck?”If these solutions don’t help:
- Check logs:
cat .lumenflow/state/packs/software-delivery/flow.log - Run with debug:
DEBUG=lumenflow:* pnpm wu:done --id WU-042 - Review the FAQ for common pitfalls.
Include in your question:
- The exact error message
- Your
workspace.yaml(redact secrets) - Output of
pnpm wu:status --id WU-XXX - Your Node.js version:
node --version