Troubleshooting Guide¶
Common issues when using Shannot and their solutions.
PyPy Sandbox Issues¶
"PyPy sandbox not found"¶
Symptoms:
Solutions:
-
Run the setup command:
-
Check if pypy-sandbox is in PATH:
-
Specify path explicitly:
"Runtime not installed"¶
Symptoms:
Solution:
# Install runtime
shannot setup runtime
# Force reinstall
shannot setup runtime --force
# Check status
shannot setup runtime --status
"lib-python not found"¶
Symptoms:
Solution:
# Reinstall runtime
shannot setup runtime --force
# Or specify path explicitly
shannot run --lib-path /path/to/runtime script.py
Python 3.6 Compatibility¶
Syntax Errors¶
Symptoms:
Cause: Using Python 3.7+ syntax in sandboxed scripts.
Common Issues:
-
Match statements (Python 3.10+)
-
Union type syntax (Python 3.10+)
-
Walrus operator (Python 3.8+)
-
dataclasses (Python 3.7+)
Module Not Found¶
Symptoms:
Cause: Third-party modules are not available in the sandbox.
Solution: Only use Python 3.6 stdlib modules. The sandbox does not have pip access.
Session Issues¶
"Session not found"¶
Symptoms:
Causes: 1. Session ID is incorrect 2. Session has expired (1-hour TTL) 3. Session was already executed
Solutions:
# List all sessions
shannot approve list
# Check session history
shannot approve history
# Create new session
shannot run script.py
"Session expired"¶
Symptoms:
Cause: Sessions expire after 1 hour.
Solution: Create a new session:
"Session already executed"¶
Symptoms:
Solution: Create a new session for re-execution:
Remote Execution Issues¶
SSH Connection Failed¶
Symptoms:
Solutions:
-
Test SSH manually:
-
Check SSH key permissions:
-
Verify host in known_hosts:
-
Check SSH agent:
Remote Deployment Failed¶
Symptoms:
Solutions:
-
Check remote access:
-
Check disk space on remote:
-
Manual deployment check:
Remote Target Not Found¶
Symptoms:
Solutions:
-
List configured remotes:
-
Add the remote:
Profile Issues¶
Profile Not Loading¶
Symptoms:
Solutions:
-
Check config location:
-
View config contents:
-
Check current profile:
Command Not Auto-Approved¶
Symptoms: Commands that should be auto-approved require manual approval.
Causes:
1. Command not in auto_approve list
2. Using full path instead of base name
Solution: Use base command names in profiles:
Not:
Command Unexpectedly Blocked¶
Symptoms: Command is blocked even though it's not in always_deny.
Cause: Prefix matching in always_deny.
Example:
Solution: Be specific:
TUI Issues¶
TUI Not Rendering Correctly¶
Symptoms: - Garbled display - Missing colors - Cursor positioning issues
Solutions:
-
Check terminal type:
-
Try a different terminal emulator
-
Disable colors:
Keyboard Input Not Working¶
Symptoms: Arrow keys or vim keys don't work.
Solution: Ensure terminal supports raw mode. Some terminals or SSH configurations may interfere.
MCP Issues¶
MCP Server Not Starting¶
Symptoms: - Claude Desktop can't connect to shannot - "Server not responding" errors
Solutions:
-
Test MCP server manually:
-
Check Claude Desktop config:
-
Reinstall MCP configuration:
-
Restart Claude Desktop completely
MCP Permission Errors¶
Symptoms: - Operations fail with permission denied - Sandbox can't access files
Solution: Check that the runtime is installed and accessible:
Checkpoint and Rollback Issues¶
"Conflict detected" during rollback¶
Symptoms:
Cause: A file was modified after the session was executed, and the current content differs from what Shannot wrote.
Solutions:
-
Review the conflict:
-
Force rollback (overwrites current changes):
-
Manually restore the file from the checkpoint blob
"Partial checkpoint" warning¶
Symptoms:
Cause: Large directories (>100 files or >50MB) cannot be fully checkpointed.
Impact: These directories cannot be restored via rollback.
Solutions: 1. Accept the limitation for large directories 2. Manually backup large directories before execution 3. Use smaller, more targeted scripts
"No checkpoint" error¶
Symptoms:
Causes: 1. Session was executed before v0.11.0 2. Checkpoint creation failed 3. Session was created in dry-run only mode
Solutions: 1. Create a new session and execute it 2. Check session details:
Checkpoint not created¶
Symptoms: Session executed but no checkpoint is available.
Cause: The session may have been created before the checkpoint feature was added.
Solution: Re-run the script to create a new session with checkpoint support.
Getting Help¶
If you're still stuck:
-
Run diagnostics:
-
Enable debug mode:
-
Check version:
-
Open an issue: https://github.com/corv89/shannot/issues
Include in your issue:
- Output of shannot status
- Output of shannot --version
- Error message and stack trace
- Steps to reproduce