Troubleshooting
Helpful tips for resolving issues
Both the Retry and Fix with AI commands do not consume any credits.
Retry Command
If you didn’t quite like what the AI generated, you can click the Retry button to have it try the same prompt again. Retrying a prompt does not consume any new credits.

Debug Command
When you’re stuck in a situation where the AI isn’t following your instructions correctly, try using the /Debug
command in the chat. It plugs in a well-crafted prompt template along with your description of the issue that helps guide the AI toward debugging the issue effectively.

Fix with AI
If you’re experiencing an issue with your design in Magic Patterns, you can use the Fix with AI feature. This tool helps resolve problems automatically and does not consume any credits.

Error Boundary Error
If Fix with AI isn’t appearing in your project, it’s likely because your app is wrapped in an ErrorBoundary. This prevents unhandled exceptions from surfacing, which means the system doesn’t recognize an error and won’t trigger Fix with AI.
In frameworks like React, an ErrorBoundary catches errors and displays fallback UI. While useful for production, this behavior interferes with Fix with AI by suppressing errors.
To allow Fix with AI to work correctly, remove or disable your error boundary in app.tsx by prompting the assistant to automatically make the change.