Troubleshooting
Comprehensive troubleshooting guide organized by user scenario. For configuration details, see Configuration.
Server Issues
Port already in use
Error:
Error: Port 8420 is already in useCause: Another process (possibly another Amelia server instance) is using the default port.
Solutions:
Find and kill the process using the port:
bashlsof -i :8420 # Find process ID kill <PID> # Kill the processUse a different port:
bashamelia dev --port 9000 # or export AMELIA_PORT=9000 amelia dev
Database initialization failed
Error:
RuntimeError: Failed to set WAL journal modeCauses:
- Insufficient file system permissions
- Database file corrupted
- SQLite version too old (< 3.7.0)
Solutions:
Check permissions on the database directory:
bashls -la ~/.amelia/ chmod 755 ~/.amelia/Remove corrupted database and restart:
bashrm -rf ~/.amelia/amelia.db* amelia devVerify SQLite version:
bashpython3 -c "import sqlite3; print(sqlite3.sqlite_version)" # Should be >= 3.7.0 for WAL mode support
Server unreachable
Error:
ServerUnreachableError: Cannot connect to Amelia server at http://127.0.0.1:8420Cause: Server is not running.
Solution:
Start the server first:
amelia devThen in another terminal, run your command:
amelia start ISSUE-123Workflow Issues
Workflow conflict (409)
Error:
WorkflowConflictError: Workflow abc123 already active for worktree /path/to/repoCause: A workflow is already running in the same worktree. Only one workflow per worktree is allowed.
Solutions:
List active workflows:
bashamelia statusCancel the existing workflow:
bash# Via CLI (if available) amelia cancel <workflow-id> # Or via API curl -X POST http://127.0.0.1:8420/api/workflows/<workflow-id>/cancelUse a different worktree:
bashgit worktree add ../repo-issue-123 -b feature/issue-123 cd ../repo-issue-123 amelia start ISSUE-123
Rate limit exceeded (429)
Error:
RateLimitError: Concurrency limit exceeded: 5/5 workflows activeCause: Maximum concurrent workflows limit reached (default: 5).
Solutions:
- Wait for existing workflows to complete or cancel them:bash
amelia status # Check active workflows amelia cancel <workflow-id> # Cancel if needed
Invalid workflow state (422)
Error:
InvalidStateError: Cannot approve workflow in status 'executing'Cause: Operation is not valid for the workflow's current state. For example:
- Trying to approve a workflow that's already executing
- Trying to reject a completed workflow
Valid state transitions:
pending→in_progress(workflow started viaamelia run)pending→planning(workflow started with--planflag for immediate planning)planning→pending_approval(after Architect generates plan)pending_approval→executing(after approval)pending_approval→planning(after rejection with feedback)executing→reviewing(after Developer completes changes)reviewing→executing(after Reviewer requests fixes, if iteration < max)reviewing→completed(after Reviewer approves)- Any state →
cancelled(via cancel operation) - Any state →
failed(on error)
Solution:
Check workflow status before performing operations:
curl http://127.0.0.1:8420/api/workflows/<workflow-id>Queue Workflow Issues
Workflow stuck in pending state
Cause: Workflow was queued but never started.
Solutions:
Start the workflow manually:
bashamelia run <workflow-id>Start all pending workflows:
bashamelia run --allCheck if the workflow has a plan ready:
bashcurl http://127.0.0.1:8420/api/workflows/<workflow-id> # Look for workflow_status field
Cannot start queued workflow (409)
Error:
WorkflowConflictError: Cannot start workflow - another workflow is active on this worktreeCause: Only one workflow can be active (in_progress or blocked) per worktree at a time. Note: planning status does NOT block the worktree.
Solutions:
- Wait for existing workflow to complete
- Cancel the existing active workflow:bash
amelia cancel <active-workflow-id> - Start the queued workflow after the active one completes
Workflow stuck in planning state
Cause: Workflow entered planning status but the Architect hasn't completed. This can happen if:
- The Architect is still generating the plan (normal)
- The Architect encountered an error during planning
- The LLM API is slow or unresponsive
Solutions:
Check server logs for Architect errors:
bashexport LOGURU_LEVEL=DEBUG amelia devCancel and retry the workflow:
bashamelia cancel <workflow-id> amelia start <issue-id> --planNote: Workflows in
planningstatus can be cancelled and do NOT block the worktree.
Plan not generating
Cause: The --plan flag runs the Architect in the background. Planning can fail silently.
Solutions:
Check server logs for Architect errors:
bashexport LOGURU_LEVEL=DEBUG amelia devVerify the issue exists and is accessible:
bash# For GitHub issues gh issue view <issue-id>Note: If planning fails, the workflow transitions back to
pendingstate (or fails). Check theworkflow_statusfield to see if planning completed.
Invalid worktree (400)
Error:
InvalidWorktreeError: Invalid worktree '/path/to/repo': not a git repositoryCauses:
- Path doesn't exist
- Path is not a git repository
- Insufficient permissions
Solutions:
Verify path exists and is a git repo:
bashcd /path/to/repo git statusInitialize git repository if needed:
bashgit initCheck permissions:
bashls -la /path/to/repo
Driver Issues
API driver: Agent fails to create plan file
Error:
Plan file not found after architect completedCause: Some models have unreliable tool-calling capabilities. The Architect agent requires the LLM to call a write_file tool to create the plan, but weaker models may:
- Output the plan as text instead of calling the tool
- Call the tool with incorrect parameters
- Terminate before completing the required tool call
Solutions:
Create a new profile with a stronger model:
bashamelia config profile create dev-strong --driver api --model "anthropic/claude-sonnet-4" amelia config profile activate dev-strongOr switch to the Claude driver (recommended for reliability):
bashamelia config profile create dev-cli --driver claude amelia config profile activate dev-cli
Models known to work well:
anthropic/claude-sonnet-4anthropic/claude-haikuopenai/gpt-4o
Models that may have issues:
- Smaller/cheaper models with limited instruction-following
- Models without native tool-calling support
- Models that tend to output markdown instead of using tools
API driver: Tool calls not executed
Error:
Agent completed but required tool was never calledCause: The model produced output text instead of tool calls. This is a model capability issue, not a configuration problem.
Solution:
The API driver includes retry logic (up to 3 attempts) and fallback extraction, but some models consistently fail. Use a different model or switch to claude.
Installation Issues
No module named 'amelia'
Error:
ModuleNotFoundError: No module named 'amelia'Cause: Dependencies not installed.
Solution:
Install dependencies:
uv syncIf using uv tool install, reinstall:
uv tool install --reinstall git+https://github.com/existential-birds/amelia.gitConfiguration Issues
Profile not found
Error:
Error: Profile 'production' not found in settings.Cause: Referenced profile doesn't exist in your configuration.
Solution:
Check available profiles:
bashamelia config profile listCreate the missing profile:
bashamelia config profile create production --driver claude --tracker githubOr use an existing profile:
bashamelia start ISSUE-123 --profile dev
No profiles configured
Error:
Error: No profiles configured. Run 'amelia config profile create' to add one.Cause: No profiles have been created yet.
Solutions:
Create a profile with CLI commands:
bash# Create a profile with Claude driver (recommended for getting started) amelia config profile create dev --driver claude --tracker none # Or with API driver amelia config profile create dev --driver api --model "anthropic/claude-sonnet-4" --tracker githubSet the active profile:
bashamelia config profile activate devVerify configuration:
bashamelia config profile show dev
Invalid API key
Error for OpenRouter driver:
Error: OPENROUTER_API_KEY environment variable not setCause: Using driver: api without credentials.
Solutions:
Driver → Required Credentials:
api→OPENROUTER_API_KEYclaude→ Claude CLI authenticated (claude auth login)codex→ Codex CLI authenticated
Set API key:
bashexport OPENROUTER_API_KEY=sk-...Or create a CLI-based profile (no API key needed):
bashamelia config profile create dev-cli --driver claude amelia config profile activate dev-cli
Tracker authentication failed
Error for JIRA:
ConfigurationError: Missing required JIRA environment variables: JIRA_BASE_URLRequired environment variables by tracker:
| Tracker | Required Variables |
|---|---|
jira | JIRA_BASE_URL, JIRA_EMAIL, JIRA_API_TOKEN |
github | gh CLI authenticated (gh auth login) |
none | None (for testing) |
Solutions:
For JIRA:
export JIRA_BASE_URL=https://yourcompany.atlassian.net
export JIRA_EMAIL=you@company.com
export JIRA_API_TOKEN=your-api-tokenFor GitHub:
gh auth loginFor testing without real tracker:
amelia config profile create test --driver claude --tracker none
amelia config profile activate testIssue not found
Error:
Error: Issue 'PROJ-999' not foundCauses:
- Issue ID doesn't exist in tracker
- Tracker authentication failed
- Wrong tracker configured
Solutions:
Verify issue exists in your tracker (JIRA/GitHub)
Check tracker authentication (see above)
For testing, use
nonetracker:bashamelia config profile create test --driver claude --tracker none amelia config profile activate testThe
nonetracker creates mock issues automatically for any ID.
Security Errors
Amelia includes security layers that block dangerous operations. These errors appear when an agent attempts a command that violates safety rules.
ShellInjectionError
Error:
ShellInjectionError: Blocked shell metacharacter detected: ';'Cause: An agent tried to run a command containing shell metacharacters (;, |, &, $, `, (, ), <, >, {, }). Amelia blocks these to prevent shell injection attacks.
What to do: This is expected behavior — Amelia's agents execute commands individually, not as chained shell expressions. If you see this error repeatedly, the LLM may be generating unsafe commands. Try switching to a stronger model or using the claude driver.
BlockedCommandError
Error:
BlockedCommandError: Command 'sudo' is blocked for security reasonsCause: An agent tried to run a privileged or dangerous command. Blocked commands include: sudo, su, chmod +s, chown, chroot, systemctl, shutdown, reboot, mkfs, dd, fdisk, and others.
What to do: These commands cannot be executed through Amelia. If your workflow requires privileged operations:
- Run them manually before starting the workflow
- Configure your environment so agents don't need elevated permissions
DangerousCommandError
Error:
DangerousCommandError: Dangerous command pattern detectedCause: An agent tried to run a command matching a known destructive pattern, such as rm -rf /, curl ... | sh, or writing to raw devices.
What to do: This is a safety guardrail. If you see this error, the agent attempted something destructive — likely due to a poorly constrained task description. Refine your issue description to be more specific about the expected approach.
PathTraversalError
Error:
PathTraversalError: Path '../../../etc/passwd' resolves to '/etc/passwd' which is outside allowed directoriesCause: An agent tried to read or write a file outside the allowed directory (the worktree root).
What to do: Agents are sandboxed to the repository root. If you need files outside the project, copy them into the worktree before starting the workflow.
Sandbox Issues
Docker Sandbox Issues
Docker not running or not installed
Error:
DockerException: Error while fetching server API versionCause: Docker Desktop or the Docker daemon is not running, or Docker is not installed.
Solution:
Ensure Docker Desktop (macOS/Windows) or the Docker daemon (Linux) is running:
docker info # Verify Docker is runningImage build failures
Error:
Error building sandbox base imageCause: The first sandbox run builds a base image using scripts/build-sandbox-base.sh, which can take 5-15 minutes. Build failures are often caused by insufficient Docker disk space or network issues during package installation.
Solutions:
Check Docker disk space:
bashdocker system df # Show disk usage docker system prune -a # Free up space (removes unused images)Manually run the build script to see full output:
bash./scripts/build-sandbox-base.sh
Container startup failures
Error:
Container amelia-sandbox-<profile_name> failed to startCause: A stale container from a previous run may be blocking the new container.
Solutions:
Check for existing containers:
bashdocker ps -a --filter name=amelia-sandbox-Remove stale containers:
bashdocker rm -f amelia-sandbox-<profile_name>
Port conflict on 8430
Error:
Bind for 0.0.0.0:8430 failed: port is already allocatedCause: The LLM proxy runs on port 8430 by default. Another process or sandbox container is using this port.
Solutions:
Find and kill the process using the port:
bashlsof -i :8430 # Find process ID kill <PID> # Kill the processRemove stale sandbox containers that may be holding the port:
bashdocker ps -a --filter name=amelia-sandbox- docker rm -f <container_name>
Network allowlist blocking required hosts
Error:
Connection refused / timeout when agent tries to reach external serviceCause: Sandbox network allowlist is enabled but doesn't include hosts the agent needs to reach.
Solution:
Add required hosts to network_allowed_hosts in your sandbox configuration via the dashboard at Settings → Profiles, or programmatically via the profile API (PUT /api/profiles/{name}).
Cleaning up all sandbox containers
To remove all Amelia sandbox containers at once:
# Via Docker CLI
docker ps -aq --filter name=amelia-sandbox- | xargs -r docker rm -fOr programmatically:
import asyncio
from amelia.sandbox.teardown import teardown_all_sandbox_containers
asyncio.run(teardown_all_sandbox_containers())Daytona Cloud Sandbox Issues
Missing Daytona API key
Error:
ConfigurationError: DAYTONA_API_KEY environment variable not setCause: The DAYTONA_API_KEY environment variable is not set.
Solution:
Set the environment variable with your Daytona API key:
export DAYTONA_API_KEY=your-daytona-api-keySandbox creation timeout
Error:
TimeoutError: Daytona sandbox creation timed outCause: The Daytona sandbox took longer than the configured timeout (default 120 seconds) to create. This can happen with large repositories or when the Daytona service is under load.
Solutions:
Increase the timeout by setting
daytona_timeoutin your sandbox configuration via the dashboard at Settings → Profiles, or programmatically via the profile API (PUT /api/profiles/{name}). The default is 120 seconds.Check Daytona service status to ensure it is healthy.
Git clone failures in Daytona
Error:
Error cloning repository in Daytona sandboxCause: The repo_url is not set in the sandbox configuration, or the repository is private and requires authentication.
Solutions:
Ensure
repo_urlis set in your sandbox configuration via the dashboard at Settings → Profiles, or programmatically via the profile API.For private repositories, set the GitHub token:
bashexport AMELIA_GITHUB_TOKEN=ghp_your-token
Network allowlist not supported with Daytona
Error:
ConfigurationError: network_allowlist_enabled is not supported with Daytona sandbox modeCause: The network_allowlist_enabled setting is a Docker-only feature and cannot be used with Daytona cloud sandboxes.
Solution:
Disable the network allowlist by setting network_allowlist_enabled: false in your sandbox configuration via the dashboard at Settings → Profiles, or programmatically via the profile API.
Worker upload failures
Error:
Error uploading worker to Daytona sandboxCause: The Daytona API is unreachable or the API key lacks sufficient permissions.
Solutions:
Verify Daytona API connectivity:
bashcurl -H "Authorization: Bearer $DAYTONA_API_KEY" https://api.daytona.io/healthCheck that your API key has the required permissions for sandbox creation and file upload.
General Sandbox Issues
CLI drivers don't work in sandbox mode
Error:
ConfigurationError: Container sandbox requires API driver. CLI driver containerization is not yet supported.or:
ConfigurationError: Daytona sandbox requires API driver. CLI driver containerization is not yet supported.Cause: CLI-based drivers (claude, codex) cannot be used with sandbox mode. Only the api driver supports sandboxed execution because it communicates with the LLM via API and proxies requests through the sandbox.
Solution:
Switch to the api driver in your profile configuration via the dashboard at Settings → Profiles, or when creating a profile:
amelia config profile create dev --driver api --model "anthropic/claude-sonnet-4"Health check failures
Error:
Sandbox health check failed — tearing down and recreatingCause: The sandbox container or Daytona workspace became unhealthy. Amelia auto-recovers by tearing down the sandbox and recreating it.
Solutions:
Check logs for the underlying cause:
bashexport LOGURU_LEVEL=DEBUG amelia devIf the issue persists, manually clean up and restart:
bash# For Docker docker ps -aq --filter name=amelia-sandbox- | xargs -r docker rm -f # Then restart amelia dev
Common Workflow Scenarios
Fresh installation not working
Checklist:
- Dependencies installed:
uv sync - Profile created:
amelia config profile create dev --driver claude --activate - Tracker configured (or use
--tracker none) - Driver credentials set (or use
claude) - Server started:
amelia dev
Can't start workflow
Checklist:
- Server running:
amelia dev - No existing workflow in worktree:
amelia status - Valid git repository:
git status - Issue ID valid (or use
tracker: none)
Workflow stuck in pending_approval
Cause: Workflow is waiting for human approval.
Solution:
Approve or reject the plan:
# Approve
amelia approve <workflow-id>
# Reject with feedback
amelia reject <workflow-id> "Please use a different approach"Getting Help
If issues persist:
Check logs:
- Server logs:
~/.amelia/logs/server.log - Workflow logs:
~/.amelia/logs/<workflow-id>/
- Server logs:
Enable debug logging:
bashexport LOGURU_LEVEL=DEBUG amelia devCheck version:
bashamelia --versionFile an issue:
- GitHub: https://github.com/existential-birds/amelia/issues
- Include: error message, logs,
amelia --version, OS/Python version