Skip to content

Troubleshooting

This page covers common issues you might encounter when using Looplia and how to resolve them.

The CLI isn’t in your PATH or not installed globally.

Solution:

Terminal window
# Use bunx/npx instead of bare command
bunx looplia run writing-kit --file article.md
# Or install globally
cd looplia-core
bun link
looplia --help

Can’t write to ~/.looplia/ directory.

Solution:

Terminal window
# Check permissions
ls -la ~/.looplia/
# Fix ownership
sudo chown -R $(whoami) ~/.looplia/
# Retry
looplia init --yes

Plugins fail to load or register.

Solution:

Terminal window
# Remove and reinitialize
rm -rf ~/.looplia/looplia-core ~/.looplia/looplia-writer
looplia init --yes

”Missing API key” or “Authentication failed”

Section titled “”Missing API key” or “Authentication failed””

API key not set or invalid.

Solution:

  1. Verify the key is set:

    Terminal window
    echo $ANTHROPIC_API_KEY
  2. If empty, set it:

    Terminal window
    export ANTHROPIC_API_KEY=sk-ant-api03-...
  3. For ZenMux, verify provider config:

    Terminal window
    looplia config provider show
  4. Set ZenMux key if needed:

    Terminal window
    looplia config provider set auth-token sk-zenmux-...

API key doesn’t match expected format.

Solution:

  • Anthropic keys start with sk-ant-
  • ZenMux keys start with sk-zenmux- (or provider-specific prefix)
  • Check for extra whitespace or quotes
Terminal window
# Correct
export ANTHROPIC_API_KEY=sk-ant-api03-xxxxx
# Wrong (quotes included in value)
export ANTHROPIC_API_KEY="sk-ant-api03-xxxxx"

The specified workflow doesn’t exist.

Solution:

Terminal window
# List available workflows
ls ~/.looplia/workflows/
# Check exact name (without .md extension)
looplia run writing-kit --file article.md # Correct
looplia run writing-kit.md --file article.md # Wrong

Input file path is incorrect.

Solution:

Terminal window
# Use absolute path
looplia run writing-kit --file /Users/you/Documents/article.md
# Or relative to current directory
looplia run writing-kit --file ./article.md
# Check file exists
ls -la ./article.md

A step’s output doesn’t meet validation criteria.

Solution:

  1. Check the output file:

    Terminal window
    cat ~/.looplia/sandbox/*/outputs/summary.json | jq
  2. View validation requirements in workflow:

    Terminal window
    cat ~/.looplia/workflows/writing-kit.md
  3. Resume after fixing:

    Terminal window
    looplia run writing-kit --sandbox-id your-sandbox-id

Network issues or complex content.

Solution:

  • Check your internet connection
  • Try with simpler content first
  • Use --no-streaming for batch mode:
    Terminal window
    looplia run writing-kit --file article.md --no-streaming
  • Check API status at status.anthropic.com

Invalid or deleted sandbox ID.

Solution:

Terminal window
# List available sandboxes
ls ~/.looplia/sandbox/
# Use correct ID (full name)
looplia run writing-kit --sandbox-id my-article-2025-12-28-x7km

Workflow interrupted before completion.

Solution:

  1. Check validation state:

    Terminal window
    cat ~/.looplia/sandbox/*/validation.json
  2. Resume from last validated step:

    Terminal window
    looplia run writing-kit --sandbox-id your-sandbox-id

Many old sandboxes consuming disk space.

Solution:

Terminal window
# View sandbox sizes
du -sh ~/.looplia/sandbox/*
# Remove old sandboxes (careful!)
rm -rf ~/.looplia/sandbox/old-sandbox-*
# Keep only recent (last 7 days)
find ~/.looplia/sandbox -maxdepth 1 -type d -mtime +7 -exec rm -rf {} \;

Can’t connect to ZenMux proxy.

Solution:

  1. Verify preset is applied:

    Terminal window
    looplia config provider show
  2. Check API key is set:

    Terminal window
    looplia config provider set auth-token sk-zenmux-...
  3. Try Anthropic direct as fallback:

    Terminal window
    looplia config provider preset ANTHROPIC_CLAUDE_SONNET
    export ANTHROPIC_API_KEY=sk-ant-...

Specified model doesn’t exist for provider.

Solution:

Terminal window
# Reset to default
looplia config provider reset
# Use a known-working preset
looplia config provider preset ANTHROPIC_CLAUDE_SONNET

”Dev mode enabled but plugins not found”

Section titled “”Dev mode enabled but plugins not found””

LOOPLIA_DEV_ROOT not set correctly.

Solution:

Terminal window
# Verify path exists
ls -la $LOOPLIA_DEV_ROOT/plugins/
# Set correct path
export LOOPLIA_DEV_ROOT=/full/path/to/looplia-core
# Verify both variables
echo "DEV=$LOOPLIA_DEV, ROOT=$LOOPLIA_DEV_ROOT"

Cached state from previous runs.

Solution:

Terminal window
# Ensure dev mode is enabled
export LOOPLIA_DEV=true
# Clear any cached state
rm -rf ~/.looplia/looplia-core ~/.looplia/looplia-writer
# Run again
looplia run writing-kit --file test.md

Enable verbose output:

Terminal window
export LOOPLIA_DEBUG=1
looplia run writing-kit --file test.md

Check logs:

Terminal window
cat ~/.looplia/sandbox/*/logs/session.log
ls ~/.looplia/logs/

If you can’t resolve the issue:

  1. Gather diagnostic info:

    Terminal window
    looplia --version
    cat ~/.looplia/looplia.setting.json
    ls ~/.looplia/
  2. Open an issue at GitHub Issues

  3. Include:

    • Command you ran
    • Error message
    • Relevant logs
    • Environment (OS, Node/Bun version)