I assumed Kodi just didn't really clean up after itself fully and after a bunch of heavy uses some cruft built up, taking up some threshold amount of storage, and then Kodi couldn't extract some temp data on start-up. I also assumed Kodi was adversely affected due to having a biigger asset pool than the other apps I have on my device.
Token-wise, could you give an idea of the rough cost of this?
The skills I have installed are:
```
on frontend-design:frontend-design · plugin · ~90 tok · locked by plugin
on agents-sdk · user · ~150 tok
on cloudflare · user · ~130 tok
on cloudflare-email-service · user · ~180 tok
on durable-objects · user · ~130 tok
on find-docs · user · ~300 tok
on find-skills · user · ~110 tok
on sandbox-sdk · user · ~120 tok
on stage-chapters · user · ~40 tok
on web-perf · user · ~150 tok
on workers-best-practices · user · ~130 tok
on wrangler · user · ~120 tok
```The plugins I have are:
```
cc-caffeine Plugin · samber · enabled
frontend-design Plugin · claude-plugins-official · enabled
ty Plugin · claude-code-lsps · enabled
vscode-langservers Plugin · claude-code-lsps · enabled
vtsls Plugin · claude-code-lsps · enabled
```There's also an MCP for Context7.
But yeah, this is more or less vanilla Claude Code - at least, nothing related to Android or adb there.
It's that good now. A few days ago I asked it to SSH into my Ubuntu box and investigate a hang. It didn't solve the problem fully autonomously like this time but did tell me a whole lot things it wasn't, and hinted at a faulty driver. We went back and forth a bit, it set up a watchdog and taught me how to update the kernel without updating Ubuntu itself, and the server has been rock solid for the past 3-4 days now.
Also, if you're curious, full log for the Kodi issue:
https://github.com/user-attachments/files/28659304/2026-06-0...
I did prompt it a little bit more today in order to get something more production-ready (the original solution kept regenerating the cache on boot, rather than fixing it permanently), but you can see the whole original autonomously-generated solution in the logs. It's insane, seriously.
I post quite a lot there and wanted to have a copy of my posts on my blog[0] to preserve them. For a few months I was able to use a headless browser + claude code, then LI wised up and started logging it out, so I had to use a regular Chrome, log in manually and then tell the LLM to take over and slowly go through my feed.
If you're accessing sites which are not actively blocking bots, or - gasp - have an API, it's much better.
[0] example: https://blog.senko.net/may-quick-takes
I’m currently using Hermes for local LLMs - seems pretty good so far.
I mean just googled https://www.google.com/search?q=kodi+crash+chromecast+4k I'm getting really a lot of issues such as https://forum.kodi.tv/showthread.php?tid=381239
It seems to be a quite common problem. Are you sure it was the rube goldberg fix and not a more mundane solution? Such as pulling in someone's fork from GitHub or just clearing the cache on a loop?
And yes, it correctly diagnosed the problem - I confirmed this morning. The cache had been partially deleted (exactly like it said) and the patched version of the software automatically detected this and rebuilt the cache rather than crashing. This was using the initial version of the patch from commit 1 of the PR.
I then talked with Claude a bit to come up with a less hacky solution that doesn't require constant cache rebuilding, and it suggested writing the "cache" to no_backup, bypassing the cache trimmer. However, this required rebuilding the .so via NDK, so it spun up a full VM in multipass, installed all the tools in there to build the fully patched APK, and built it (the VM was my suggestion, it was about to just brew install everything and mess with my local dev environment).
You can read the full log here, it's nuts: https://github.com/user-attachments/files/28659274/2026-06-0...
I think the key takeaway from this experience (and a few others recently) is that Claude Code works much, much better when you explicitly instruct it to test against real data.
Had I simply described the issue and asked it to think up a solution it likely would have just navel-gazed and then come up with a wrong solution. But by pointing it at a real working environment and actively encouraging it to get its hands dirty, it found the actual solution rapidly - in spite of the fact that I gave it wrong information twice.
> // Unpack into no_backup storage rather than the cache dir. Android may
> // delete files from getCacheDir() at any time to reclaim space, which
Looking further into the issue disk space is a huge problem with Kodi discussed plenty of times. In fact even the Wiki dedicates 2 pages to it:
https://kodi.wiki/view/Archive:Reduce_disk_space_usage
https://kodi.wiki/view/Texture_Cache_Maintenance_utility
I realize from your perspective this may seem still a very convincing example in the sense of it works.
A non-programmatic solution might have been possible though:
> It's likely your thumbnail cache. That's typically the biggest piece stored locally (you also have the database). You can clear the cache (short term fix) or move it to another drive (long term fix).
> Also recommend not downloading actor thumbnails. Lot of extra images.
https://www.reddit.com/r/ShieldAndroidTV/comments/1f7xfwn/ko...
I also recommend: https://en.wikipedia.org/wiki/Data_dredging
There's a single variable that keeps track of whether or not the cache has been "written", but Android only trims some of the cache files.
The only other feedback I gave it mid-process was wrong (I said that the crash probably wasn't caused by cache trimming, it ran some additional tests to confirm that its hunch about cache trimming was right).
This was with the paid version of Claude Code (I don't think they offer a free version at all; that's a Codex thing). The $20 version is as smart as the $200 one, but once you work out it can do stuff like this you'll quickly burn the $20 token limit. :)
The other thing that helps is a CLAUDE.md file - authored of course by Claude itself. Mine's here: https://github.com/EspoTek/.claude/blob/master/CLAUDE.md A lot of it is probably domain-specific for the stuff I do, but the "Working with unfamiliar data or systems" section is bloody gold! Stopped the bullshit completely!