5 ms·
Literally just last night I have Claude Code the following prompt, verbatim: "Whenever I launch Kodi on my Chromecast 4k, it crashes. I think this is
by AussieWog93 4mo ago
Literally just last night I have Claude Code the following prompt, verbatim:
"Whenever I launch Kodi on my Chromecast 4k, it crashes. I think this is
related to a plugin or skin. It goes away for a bit if I clear cache but
will eventually come back. Can you connect to the device via
adb (I've run adb connect already), and debug exactly where it's crashing?
Once you've done that, propose a solution. If this requires downloading,
fixing, rebuilding and then uploading the broken extension via adb, don't be
shy. I should have Android dev tools (Gradle etc.) on this Mac."
Lo and behold, without human intervention, it pinpointed the crash, downloaded the Kodi source, patched out a bug that had existed since 2016, recompiled it, signed it, then pushed it to my Chromecast all while carefully making sure to keep all my settings intact.
Got it to make a PR too (which is as of this moment unpublished; going to test more over the coming weeks).
- calf 4mo agoThat's amazing, as someone who struggles to find something useful to do with LLMs. How long does this take, several minutes or more? Do you need a paid version of Claude Code for this?
- AussieWog93 4mo agoIt sat there for about half an hour working out the problem, step by step, before asking me for the preferred solution. At one point, it was trying to decompile the .APK, so I interrupted it and reminded it that Kodi was open source - it was welcome to clone from GitHub. 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 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!
- darksim905 4mo agoI know this isn't apples to apples, but given that I can't get Copilot or other tools to view a simple profile page on LinkedIn makes me curious/skeptical how this would work in this depth. I'm sure it's possible but I'm curious what the skills and toolchains involved were for you to get all that to work.
- AussieWog93 4mo agoFull claude.md is here: https://github.com/EspoTek/.claude/blob/master/CLAUDE.md https://github.com/EspoTek/.claude/blob/master/CLAUDE.md 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-06-141445-whenever-i-launch-kodi-on-my-chromecast-4k-it-cr.txt 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.
- blablabla123 4mo agoSo I'm scrolling through this Ask HN and this is now the 3rd similar problem. Would you mind adding more details as well as the patch? Perhaps as a gist if it's unfinished? I mean just googled https://www.google.com/search?q=kodi+crash+chromecast+4k 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 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?
- AussieWog93 4mo agoHere's the draft PR: https://github.com/xbmc/xbmc/pull/28404 https://github.com/xbmc/xbmc/pull/28404 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-06-141445-whenever-i-launch-kodi-on-my-chromecast-4k-it-cr.txt 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.
- blablabla123 4mo agoIt's the cache, I pin-pointed the main problem correctly without ADB access, any closer details and just google. > // 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/Archive:Reduce_disk_space_usage https://kodi.wiki/view/Texture_Cache_Maintenance_utility 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/kodi_is_eating_all_my_storage_any_suggestions/ https://www.reddit.com/r/ShieldAndroidTV/comments/1f7xfwn/ko... I also recommend: https://en.wikipedia.org/wiki/Data_dredging https://en.wikipedia.org/wiki/Data_dredging
- NamTaf 4mo agoYou know, I've had this exact bug for some time on a Fire Stick 4K Max Gen 1 (similarly anaemic). I figured it was storage or RAM pressure causing the problem as I could see both were close to the limit, but didn't realise it was OS swap/cache eviction removing critical files as it only happened to Kodi. 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?
- AussieWog93 4mo agoI don't really know exactly how many tokens it used, but at no point did Claude Code auto compact. So that would be roughly ~500k output?
- hattmall 4mo agoThis issue was fixed two months ago. It does indicate you are basically out of storage and may have more problems though. But just updating should resolve the critical files in cache issue.