Troubleshooting Guide
Common issues and solutions when using Sequant.
Worktree Issues
Section titled “Worktree Issues””Branch already exists” error
Section titled “”Branch already exists” error”Problem: Creating a new feature worktree fails with “branch already exists”.
Solutions:
-
Check if worktree already exists:
Terminal window git worktree list -
If worktree exists but is stale, remove it:
Terminal window # Remove the worktree directoryrm -rf ../worktrees/feature/<issue-number>-*# Prune worktree referencesgit worktree prune -
If branch exists without worktree, delete the branch:
Terminal window git branch -D feature/<issue-number>-*
Orphaned worktrees after failed runs
Section titled “Orphaned worktrees after failed runs”Problem: Failed /exec or /fullsolve leaves behind orphaned worktrees.
Solutions:
-
List all worktrees to find orphans:
Terminal window git worktree listls ../worktrees/feature/ -
Clean up using the cleanup script:
Terminal window ./scripts/cleanup-worktree.sh 'feature/<issue-number>-*'# Quote the glob — the script resolves the pattern itself, and zsh aborts# on an unmatched unquoted glob before the script ever runs.# Local worktree + branch are always removed. The remote branch is deleted# only when the PR is merged — an unmerged PR's remote branch is left intact# so GitHub doesn't close the PR unmerged.# Add --yes to skip the prompt in automation; --delete-remote (or --force,# which also implies --yes) to drop an unmerged PR's remote branch anyway.# See: cleanup-worktree.sh --help -
Or clean manually:
Terminal window rm -rf ../worktrees/feature/<issue-number>-*git worktree prunegit branch -D feature/<issue-number>-*
Worktree not found during /qa or /exec
Section titled “Worktree not found during /qa or /exec”Problem: Skills report “worktree not found” even though work was started.
Solutions:
-
Verify the worktree path:
Terminal window ls ../worktrees/feature/ | grep <issue-number> -
If path exists but skill can’t find it, specify explicitly:
Terminal window cd ../worktrees/feature/<issue-number>-*/# Then run skill from within the worktree -
If worktree was accidentally deleted, recreate it:
Terminal window ./scripts/new-feature.sh <issue-number>
Commits landed on main instead of feature branch
Section titled “Commits landed on main instead of feature branch”Problem: After running /exec or /fullsolve, commits ended up on main instead of the feature branch. This can happen when sub-agents or shell context resets silently switch the working directory back to the main repo root.
Prevention: Both /exec and /fullsolve now include branch verification gates that block commits on main/master. If you see the error “On main — do NOT commit here”, navigate to the correct worktree before continuing.
Recovery if it already happened:
-
Check which commits need to move:
Terminal window git log --oneline main ^origin/main -
Switch to the feature branch and cherry-pick:
Terminal window git checkout feature/<issue-number>-*git cherry-pick <commit-hash> -
Remove the commits from main:
Terminal window git checkout maingit reset --soft origin/maingit stash # save any uncommitted changes
Project Type Support
Section titled “Project Type Support”Using Sequant with non-Node.js projects
Section titled “Using Sequant with non-Node.js projects”Context: Sequant is optimized for Node.js/TypeScript projects, but the core worktree workflow works with any git repository.
What works universally:
/spec- Issue planning and AC extraction/exec- Implementation in isolated worktree/qa- Code review (adapts to project type)/fullsolve- Complete workflow orchestration- Git worktree isolation
Node.js specific features:
npm test/npm run buildverification- Hook-based test running (detects npm/yarn/pnpm/bun)
- Prettier formatting for JS/TS files
For non-Node.js projects:
- Skills will attempt to detect your build/test commands
- You may see warnings about missing
package.json- these are safe to ignore - Customize test commands in your constitution:
## Project-Specific Notes- Build: `cargo build` (Rust) / `go build` (Go) / `pytest` (Python)- Test: `cargo test` / `go test ./...` / `pytest`
Stack guides available:
Installation Issues (npm)
Section titled “Installation Issues (npm)”sequant: command not found
Section titled “sequant: command not found”Problem: After installing, the sequant command isn’t recognized.
Solutions:
-
Ensure global npm bin is in your PATH:
Terminal window npm config get prefix# Add [prefix]/bin to your PATH -
Use npx instead:
Terminal window npx sequant init -
Reinstall globally:
Terminal window npm install -g sequant # npmpnpm add -g sequant # pnpmyarn global add sequant # yarnbun add -g sequant # bun
Stray $HOME/node_modules/sequant install
Section titled “Stray $HOME/node_modules/sequant install”Problem: On startup the CLI prints:
! Sequant is running from /Users/<you>/node_modules/sequant — this pollutes resolution for every subdirectory of your home directory.
If accidental (usually is — one stray `npm install sequant` from ~ does it): remove /Users/<you>/node_modules remove $HOME/package.json and $HOME/package-lock.json
If intentional: use `npm install -g sequant` or the Claude Code plugin.Cause: A npm install sequant was run from $HOME at some point. Node’s module resolution walks up the directory tree, so every subdirectory of home now resolves to that stale copy before reaching the npx cache. The result: npx sequant from any project silently runs the home-stray version instead of the latest.
Solutions:
-
If you didn’t intend to install sequant in
$HOME:Terminal window rm -rf "$HOME/node_modules"rm -f "$HOME/package.json" "$HOME/package-lock.json"Re-run
npx sequant@latest <command>— resolution now falls through to the npx cache. -
If you genuinely want sequant available everywhere, install it the right way:
Terminal window npm install -g sequantOr use the Claude Code plugin, which doesn’t rely on Node’s
node_moduleswalk-up at all.
The warning only fires when the resolved install path is exactly $HOME/node_modules/sequant. Legitimate project-local installs (<project>/node_modules/sequant), global installs, and npx cache paths are not flagged.
Permission errors during install
Section titled “Permission errors during install”Problem: EACCES permission denied errors.
Solutions:
-
Use a Node version manager (recommended):
Terminal window # Using nvmnvm install --ltsnvm use --ltsnpm install -g sequant -
Fix npm permissions:
Terminal window mkdir ~/.npm-globalnpm config set prefix '~/.npm-global'# Add ~/.npm-global/bin to PATH
Initialization Issues
Section titled “Initialization Issues”Stack not detected
Section titled “Stack not detected”Problem: sequant init doesn’t detect your project stack.
Solutions:
-
Specify the stack manually:
Terminal window sequant init --stack nextjs -
Ensure detection files exist:
- Next.js:
next.config.jsornextin package.json - Rust:
Cargo.toml - Python:
pyproject.tomlorrequirements.txt - Go:
go.mod
- Next.js:
Already initialized error
Section titled “Already initialized error”Problem: Error saying Sequant is already initialized.
Solutions:
-
Use force flag to reinitialize:
Terminal window sequant init --force -
Or remove existing config:
Terminal window rm -rf .claude .sequant-manifest.jsonsequant init
Skill Execution Issues
Section titled “Skill Execution Issues”Skills not recognized
Section titled “Skills not recognized”Problem: /spec or other skills aren’t recognized in Claude Code.
Solutions:
-
Verify skills are installed:
Terminal window ls .claude/skills/ -
Run doctor to check installation:
Terminal window sequant doctor -
Restart Claude Code to reload skills.
Run fails with “Skills pre-flight failed”
Section titled “Run fails with “Skills pre-flight failed””Problem: sequant run exits immediately with ✖ Skills pre-flight failed: missing .claude/skills/ directory (or a list of missing skills).
Cause: .claude/skills/ is a hard runtime dependency of sequant run — phase agents load skills from the project directory only, so user-scope or plugin installs cannot substitute for it. The directory is easy to lose in consumer projects because it is untracked by default (an untracked-file cleanup deletes it silently).
Solutions:
-
Reinstall the skills:
Terminal window sequant sync -
Commit
.claude/skills/to your repository so a fresh checkout keeps working:Terminal window git add .claude/skills && git commit -m "chore: track sequant skills"
Note: The pre-flight only applies to drivers that resolve skills (the default claude-code driver). Aider runs are unaffected.
Permission denied on hooks
Section titled “Permission denied on hooks”Problem: Hook scripts fail with permission errors.
Solutions:
-
Make hooks executable:
Terminal window chmod +x .claude/hooks/*.sh -
Run doctor with fix:
Terminal window sequant doctor --fix
Run Command Issues
Section titled “Run Command Issues”claude command not found
Section titled “claude command not found”Problem: npx sequant run fails because claude CLI isn’t available.
Solutions:
-
Install Claude Code CLI:
Terminal window # Follow Claude Code installation instructions -
Verify installation:
Terminal window claude --version -
Use dry-run to test without execution:
Terminal window npx sequant run 123 --dry-run
Timeout errors
Section titled “Timeout errors”Problem: Phases timeout before completing.
Solutions:
-
Increase timeout:
Terminal window npx sequant run 123 --timeout 3600 # 1 hour -
Or set via environment:
Terminal window PHASE_TIMEOUT=3600 npx sequant run 123
GitHub CLI not authenticated
Section titled “GitHub CLI not authenticated”Problem: Skills fail when trying to access GitHub issues.
Solutions:
-
Authenticate GitHub CLI:
Terminal window gh auth login -
Verify authentication:
Terminal window gh auth status
Claude Code process exited with code 1
Section titled “Claude Code process exited with code 1”Problem: sequant run fails with “Claude Code process exited with code 1” during a phase.
Causes:
- Outdated sequant version in local node_modules
- MCP server configuration issues
- Invalid project settings in
.claude/settings.json
Solutions:
-
Update sequant to latest version:
Terminal window npx sequant@latest run 123# or update your local install with your package manager# npm update sequant / pnpm update sequant / bun update sequant# yarn 2+: yarn up sequant / yarn 1: yarn upgrade sequant -
Try running without MCP servers to isolate the issue:
Terminal window npx sequant run 123 --no-mcp -
Run with verbose mode to see detailed error output:
Terminal window npx sequant run 123 -v -
Check for invalid hook scripts in
.claude/hooks/:Terminal window # Test hooks manuallyecho '{}' | .claude/hooks/pre-tool.sh -
Verify Claude Code CLI works standalone:
Terminal window claude --versionclaude -p "Say hello" --print
MCP Server Issues
Section titled “MCP Server Issues”MCP server won’t (re)connect — Failed to reconnect: -32000
Section titled “MCP server won’t (re)connect — Failed to reconnect: -32000”Problem: Claude Code fails to start or reconnect the sequant MCP server, most often reported through /plugin or /mcp as Failed to reconnect to sequant: -32000. The -32000 is a generic JSON-RPC transport error — it means the server process never came up, not that sequant itself crashed.
Most common cause — a corrupted npx cache slot. The .mcp.json launches the server with npx -y sequant@<version> serve. Any time npx has to (re)install that package, a half-written or interrupted cache can turn into a hard failure. This is most likely with an sequant@latest config (the pre-#793 default, and still what an un-updated install carries), because @latest forces npx to re-resolve and reinstall whenever the published latest changes — so the reconnect right after a sequant release is exactly when it bites. Sequant now pins a concrete version by default (see MCP Server → Version pinning), which removes that per-release reinstall; run sequant update (or update the plugin) to move an old @latest config onto a pin. The underlying error is an npm bug — an atomic-rename collision with a leftover temp directory:
npm error code ENOTEMPTYnpm error syscall renamenpm error ENOTEMPTY: directory not empty, rename '.../_npx/<hash>/node_modules/sequant' -> '.../_npx/<hash>/node_modules/.sequant-XXXXXXXX'Because this happens inside npx, before sequant serve runs, sequant cannot detect or self-heal it — the fix is to clear the stale cache entry.
Solutions:
-
Confirm it’s the npx cache (not a sequant bug) by running the exact launch command by hand and reading the real error:
Terminal window npx -y sequant@latest serve# A healthy start prints: "Sequant MCP server started (stdio)"# A cache problem prints the ENOTEMPTY rename error above -
Remove the leftover temp directory (surgical — only touches the stale staging dir):
Terminal window rm -rf ~/.npm/_npx/*/node_modules/.sequant-* -
If that isn’t enough, clear npx’s cached copy of sequant more broadly, then let it reinstall:
Terminal window npm cache clean --forcenpx -y sequant@latest serve # re-download; expect the "started (stdio)" line -
Reconnect in Claude Code (re-run
/pluginor/mcp, or restart the session).
If it recurs on every release: you’re almost certainly still on an sequant@latest config. The durable fix is to pin the version so reconnects stop reinstalling: run sequant update (it rewrites .mcp.json to sequant@<installed version>), or update the Claude Code plugin (its bundled config is pinned to the release). Multiple Node prefixes on PATH (e.g. fnm/nvm and Homebrew) also make npx cache corruption more likely, because different node versions share and race on the same ~/.npm/_npx cache — standardizing on one node manager helps. As a last resort you can point the MCP entry at a locally-installed binary (sequant serve instead of npx -y sequant@<version> serve) if you have a global install — but do not commit that form to .mcp.json, since other contributors rely on the npx fallback. See #793.
Update Issues
Section titled “Update Issues”Conflicts during update
Section titled “Conflicts during update”Problem: sequant update shows conflicts with local changes.
Solutions:
-
Review the diff:
Terminal window sequant update --dry-run -
Force update (overwrites local changes to package files):
Terminal window sequant update --force -
Move skill customizations into an overrides file (not a full
SKILL.mdcopy — Claude Code never loads.claude/.local/skills/<name>/SKILL.md). Put only the behavior you changed intooverrides.md, then restore the managed skill:Terminal window mkdir -p .claude/.local/skills/spec# Write your deltas into .claude/.local/skills/spec/overrides.md, then:sequant update --force # restore the managed spec/SKILL.mdThe overlay directive in
spec/SKILL.mdmakesoverrides.mdauthoritative at invocation. See the Customization Guide.
update crashes or exits in CI / scripts
Section titled “update crashes or exits in CI / scripts”Problem: sequant update is interactive by default. When run without a
terminal (a pipe, a non-interactive shell) — or in a detected CI environment,
even one that allocates a pseudo-TTY — it has no way to answer its
Apply updates? prompt.
Solution: Pass --yes (-y) to apply updates non-interactively:
sequant update --yesWithout --yes in a non-interactive or CI shell, update now exits with a
clear message naming the reason and a non-zero status (instead of a raw
ExitPromptError stack trace or a hung job), so scripts can detect the misuse.
To preview what would change without applying — and without prompting — run
sequant update --dry-run, which is safe in any shell. It exits non-zero when
updates are pending (and 0 when nothing is to apply), so CI can gate on it
directly without parsing stdout — parity with sync --dry-run. For a fast,
CI-safe content-drift check that never prompts, use sequant sync.
Build/Test Issues
Section titled “Build/Test Issues”Tests fail during /exec
Section titled “Tests fail during /exec”Problem: The execution phase fails because tests don’t pass.
Solutions:
-
Run tests manually first:
Terminal window npm test # or your test command -
Fix failing tests before running the workflow.
-
Skip verification (not recommended):
Terminal window SKIP_VERIFICATION=true npx sequant run 123
Lint errors blocking commit
Section titled “Lint errors blocking commit”Problem: The workflow can’t commit due to lint errors.
Solutions:
-
Run lint manually:
Terminal window npm run lint # or your lint command -
Fix lint errors before running the workflow.
-
Check your lint configuration is correct for your stack.
Windows Issues
Section titled “Windows Issues””bash: command not found” or scripts don’t work
Section titled “”bash: command not found” or scripts don’t work”Problem: Shell scripts (hooks, new-feature.sh) fail because bash isn’t available.
Solution: Install WSL (Windows Subsystem for Linux):
- Open PowerShell as Administrator
- Run:
wsl --install - Restart your computer
- Open Ubuntu from Start menu and complete setup
- Run Sequant commands from within WSL
See the README Windows Users section for full setup instructions.
Line ending issues (CRLF vs LF)
Section titled “Line ending issues (CRLF vs LF)”Problem: Git shows all files as modified, or scripts fail with “bad interpreter” errors.
Solution: Configure Git to use LF line endings:
# Set global configgit config --global core.autocrlf input
# Fix existing repogit rm --cached -r .git reset --hardIf using VSCode, add to .vscode/settings.json:
{ "files.eol": "\n"}Path issues between Windows and WSL
Section titled “Path issues between Windows and WSL”Problem: Paths like C:\Users\... don’t work in WSL, or vice versa.
Solutions:
-
Access Windows files from WSL:
Terminal window cd /mnt/c/Users/YourName/Projects -
Access WSL files from Windows:
\\wsl$\Ubuntu\home\username -
Best practice: Keep your projects in the WSL filesystem (
~/projects/) for better performance.
npm/node not found in WSL
Section titled “npm/node not found in WSL”Problem: Node.js works in Windows but not in WSL.
Solution: Install Node.js inside WSL (it’s a separate environment):
# Using nvm (recommended)curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bashsource ~/.bashrcnvm install --lts
# Or using NodeSource# See: https://github.com/nodesource/distributionsGit Issues
Section titled “Git Issues”GPG signing failed
Section titled “GPG signing failed”Problem: Commits fail with “gpg failed to sign the data” or “No pinentry”.
Solutions:
-
Commit without GPG signing (if allowed):
Terminal window git commit --no-gpg-sign -m "message" -
Fix GPG agent:
Terminal window gpgconf --kill gpg-agentgpg-agent --daemon -
Configure Git to skip signing:
Terminal window git config --global commit.gpgsign false -
Fix pinentry (macOS):
Terminal window brew install pinentry-macecho "pinentry-program $(which pinentry-mac)" >> ~/.gnupg/gpg-agent.confgpgconf --kill gpg-agent
Common Error Messages
Section titled “Common Error Messages””Sequant is not initialized”
Section titled “”Sequant is not initialized””Run sequant init in your project directory.
”No valid issue numbers provided”
Section titled “”No valid issue numbers provided””Provide at least one issue number:
npx sequant run 123“Manifest not found”
Section titled ““Manifest not found””The .sequant-manifest.json file is missing. Reinitialize:
sequant init --forceGetting Help
Section titled “Getting Help”-
Run diagnostics:
Terminal window sequant doctor -
Check status:
Terminal window sequant status -
View help:
Terminal window sequant --helpsequant run --help -
File an issue: GitHub Issues