Troubleshooting
Credentials Not Working
tfcode validate
tfcode setup
echo $TF_WORKSPACE_ID
echo $TF_API_KEY
echo $TF_REGION
MCP Tools Not Loading
- Verify credentials with
tfcode validate - Check network connectivity to MCP server
- Check logs:
grep "mcp.*error" ~/.local/share/tfcode/log/dev.log
Binary Not Found
npm uninstall -g @toothfairyai/tfcode
npm cache clean --force
npm install -g @toothfairyai/tfcode
Permission Errors
sudo chown -R $(whoami) ~/.npm-local
Server Won't Start
Port in use:
tfcode serve --port 4097
tfcode serve --port 0
CORS errors:
tfcode serve --cors http://localhost:3000 --cors https://your-app.com
Plugin Not Loading
- Verify file is in
.tfcode/plugins/or~/.config/tfcode/plugins/ - For npm plugins, check the package name in
tfcode.json - Check logs:
tfcode --log-level DEBUG
Plugin dependencies not installing — ensure .tfcode/package.json exists with required dependencies.
Model Not Available
tfcode providers list
tfcode validate
tfcode models --refresh
Logging
tail -f ~/.local/share/tfcode/log/dev.log
tfcode --log-level DEBUG