Find and fix the issues
1. Read the "before" reportβ
Ask your agent:
Generate a Kotzilla report for this app, version codelab-1.0.
The report comes back in your agent's chat, as text. Here is the one from our run:
Kotzilla Codelab NIA (docs) vcodelab-1.0
π΄ Status: FAIL (11 issues)
Sessions: 2 | Screens: 4 | ANRs: 3 | Crashes: 1
Priority fixes:
1. π₯ ANR: 3 ANR event(s), app frozen >4500ms
- MainActivity (3 ANRs, 2 sessions)
2. π STARTUP: P95 18613ms, slow cold start
3. π± SLOW SCREENS: 2 screen(s) with P95 > 500ms
- MainActivity P95: 5900ms, ANR risk
- ForYouRoute P95: 3143ms, severe delay
4. β BLOCKING COMPONENTS: 1 component(s) with P95 > 100ms on main thread
- MainActivityViewModel P95: 5146ms, blocks UI thread
π£ Crashes:
- IllegalStateException (1 sessions)
The exact count depends on your device and on how you navigated, so a few more or fewer issues is fine. If the report shows no data yet, wait a minute and ask again. Keep this report: it is your "before" picture.
The same issues are listed in the Kotzilla Console, under Issues:

2. Fix the issues, one by oneβ
Work top-down: the crash first, then everything that blocks startup. For each issue, you can look at it in the Console, then hand it to your agent. The agent reads the dependency trees, timings and stack traces from your session through the MCP Server, finds the root cause and edits the code.
The MCP Server verifies each fix against a fresh session. After each fix, your agent bumps versionName in app/build.gradle.kts, rebuilds, runs the app and checks the issue on the new version. Let it: names like codelab-1.1 or codelab-1.2 are fine. What matters is that your last build has all the fixes.
The crash on the Interests tabβ
My app crashes when I open the Interests screen. Find the root cause with Kotzilla and fix it.
Opening Interests makes Koin create InterestsViewModel. Its constructor throws, and Koin wraps the failure in an InstanceCreationException that names the component. Kotzilla recorded the crash even though the app died, because the session was uploaded on the next launch.
The constructor enforces a precondition that can never be met, so the fix removes the check or makes the configuration truly optional. See Fix crashes for how to read the stack trace in the Console.
Everything that blocks the first frameβ
The report shows a cold start above 10 seconds, an ANR and a slow screen on MainActivity, a main thread issue on MainActivityViewModel, and a background thread issue on the sync worker. These five issues come from three blocking components, all inside the startup window, and one prompt usually clears them:
My cold startup is over 10 seconds. Find everything that blocks it and fix it.
Each component follows a different anti-pattern:
Application.onCreatedoes synchronous work before any Activity can start. Every user pays that cost on every cold start, before seeing anything.MainActivityViewModeltakes about 5 seconds to be created on the main thread while the screen waits. Its dependencies cost a few milliseconds in total, so the time is in its constructor. Past 4.5 seconds, it also becomes an ANR. The ViewModel should expose state as aStateFlowand load inviewModelScope, never in its constructor.- The sync worker (
androidx.work.ListenableWorker) takes about 2 seconds to be created. It runs off the main thread, but it starts fromApplication.onCreateand competes with the first screen. ACoroutineWorkerdoes its work indoWork(), and its construction stays instant.
If your agent stops after the first one, point it at the rest:
MainActivityViewModel is still blocking the main thread. Diagnose it with Kotzilla and fix it.
Now analyze the background thread issue on the sync worker and fix it.
See Fix slow app startup and Fix ANRs and slow screens for the Console views behind these issues.
Slow transitions (optional)β
With the bugs we added gone, the report can still show slow transitions of about 700 ms on the Interests, Search and Saved screens. This one is not a bug we added: Now in Android ships with it.
Now fix the slow transition on InterestsRoute.
The session timeline shows the screen drawn in a few milliseconds, then about 700 ms more before it is resumed, with nothing on the main thread in between. Three screens with nearly the same number point to one shared cause: NavHost defaults to a 700 ms crossfade, and a screen is not interactive until it ends. Setting enterTransition and exitTransition to 200 ms gets the time back. Since the delay is the animation itself, shortening it also changes how the app feels. See Slow transitions.
Next: Verify your fixes.