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 skip-gates with documentation
-
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:
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/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-2460), 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 (WU-2468), 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:
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”If you’re using AI agents with Claude Code, Cursor, or similar tools, LumenFlow can enforce workflow compliance at the tool level using hooks. When enabled, hooks block non-compliant operations (like editing files outside a worktree) instead of relying on agents to remember workflow rules.
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.
Still Stuck?
Section titled “Still Stuck?”If these solutions don’t help:
- Check logs:
cat .lumenflow/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