AI & Agents
Where My Leftover Claude Tokens Go
When my Claude plan is about to reset with tokens left over, I hand it the jobs I keep putting off. Lately that means fixing every Android phone and TV in the family over ADB, and the lag was never the bloatware.
claude codeandroid adbandroid debloat
My Claude plan resets on a timer. Whatever I don’t use by then is gone, and on a busy week that bothers me more than it should. It’s like paying for a gym and watching the membership tick past while you sit in traffic.
So I made a rule for myself. When the window is about to reset and I have tokens left but no time to sit with them, I don’t let them expire. I hand Claude something I’ve been putting off for months, or something nobody would normally think to give an AI at all.
Two kinds of jobs come out of that rule. Long loops on work I was too lazy to finish. And the Android devices around my house.
The TV that was never slow because of bloatware
It started with a Turkish web page. Someone had published a prompt (just text, no app) that you paste into Claude Code to debloat an Android TV over ADB. Our Sony Bravia had been sluggish for a year. Opening the home screen took long enough that we’d started reaching for the phone instead.
I gave Claude the prompt, turned on network debugging on the TV, and let it work.
It didn’t start by removing apps. It found the TV on the network by itself, then measured first. And the measurement killed the whole premise. The TV’s internal storage was 97% full. 148 MB free out of 4 GB. Android behaves terribly when it can’t write cache, so every app launch was rebuilding things it had already built yesterday.
One command, pm trim-caches, gave back 353 MB. Four streaming apps we never opened went next. Then Claude noticed the TV was on 2.4 GHz Wi-Fi at 130 Mbps, while the router was sitting right there offering 5 GHz.
| Metric | Before | After |
|---|---|---|
| Wi-Fi link | 130 Mbps (2.4 GHz) | 585 to 780 Mbps (5 GHz) |
| Free storage | 148 MB | 1.2 GB |
| Storage used | 97% | 70% |
| Free RAM | 742 MB | 922 MB |
The Wi-Fi switch was the biggest win of the night, bigger than all 42 packages we disabled put together. The Google TV home screen pulls every tile and poster over the network, so a slow link looks exactly like a slow TV.
The packages still mattered, just for a different reason. One of them was Samba TV, which fingerprints whatever is on screen and sells the viewing data. It ships enabled. Another one, android.autoinstalls.config.sony.bravia, quietly reinstalls the sponsored apps after a factory reset. I wouldn’t have found either of those by tapping through Settings.
Every change went into a ledger file with a one-line undo command. That was the deal before anything got touched.
My dad’s phone
A few days later my dad mentioned his OnePlus Nord 3 was “very laggy.” He’s not someone who complains about tech, so it had to be bad.
Wireless ADB, same approach, measure first. Storage was 99% full: 1.8 GB free out of 103. The phone had been up for 35 days straight without a reboot, and it was swapping 3.7 GB of RAM onto that full storage. One kernel process had burned 205 minutes of CPU just trying to reclaim memory.
Same disease as the TV, on a different device.
The cleanup was mostly human. He ran Google Photos’ “Free up space” himself since his videos were already backed up (32 GB). Facebook was holding 9 GB, and “Clear data” in Settings didn’t move the number, so we uninstalled and reinstalled it clean. Claude found 3 GB of orphaned gallery thumbnails for videos that no longer existed. After a reboot, available memory went from 1.07 GB to 2.37 GB.
Then I almost made a mistake. On a list sorted by size, Messenger looked like the obvious next thing to cut, 1.57 GB of it. Before running anything, Claude checked the phone’s actual usage stats. Messenger was his most-used app. The plan got cancelled. Since then I don’t trust any bloatware list that hasn’t been checked against what the person actually opens.
Two more things from that phone stayed with me. 3.5 GB of drone video was sitting in the Downloads folder, which Google Photos doesn’t back up by default, so it may be the only copy he has. Claude flagged it and didn’t touch it. And there’s a voice recorder folder with real recordings in it. Never touching that.
It’s almost never bloatware
I’ve now done this on six devices: the Bravia, my uncle’s Xiaomi TV in our village, my mom’s Nothing phone, my dad’s OnePlus, my wife’s spare Redmi, and the Android head unit in our car.
On every one I measured properly, bloatware was not the reason it lagged. It was storage, or Wi-Fi, or a box with 1.84 GB of total RAM that no amount of debloating will save. The debloat was still worth doing, for the adware and the telemetry and the apps that phone home. It just wasn’t why anything felt slow.
The village TV had its own surprise. The ADB port was already open when we got there. Nobody in the house had turned it on, which means anyone on that Wi-Fi could have controlled it. We closed it after the work, and I only believed it was closed when a connection from my Mac got refused. The command’s own “done” message didn’t count.
That last part is the habit I keep coming back to. Android lies a lot. A command to change the TV’s home screen returned Success and changed nothing. A command to disable a protected system app on my dad’s phone said “new state: default” and did nothing, without an error. I’d guess half the debloat guides online are written by people who believed those messages. So every change gets verified from the device afterwards.
The long loops
The other way I spend spare tokens is on work I’d been meaning to do but kept pushing to “this weekend.”
I’m building a small Mac video editor called Cutroom, mostly to see how far CapCut’s basics can be cloned by one person with agents. One night I set the rules before going to sleep: agents write the code, nothing merges unless the full test suite passes twice and the app is still alive, nothing gets pushed to GitHub without me. Then I left it on a loop.
By morning it had merged drag and drop, a full effects panel with 16 filters, a speed engine, multi-select on the timeline, and 82 tools so Claude can drive the editor itself. The test count went from 810 to 1,320.
It also found a bug I had no idea existed. Clip speed had never actually been applied during playback or export. The slider worked, the setting saved, and the video played at normal speed every single time.
The morning wasn’t all green, to be fair. When I finally opened the app, Space and Cmd+Z did nothing. Root cause: the app had been launching as a background process, so my keystrokes were going to Finder instead. No human had clicked through the UI in weeks, and 1,320 passing tests didn’t catch it. I’m still not sure how to make an overnight loop catch that kind of bug.
Last night was a smaller loop: 40 short reels for two of my products, scripted, voiced, rendered and checked between 1:20 AM and 7:25 AM. None of them posted. I get a morning list of which ones need an ear-check before anything goes out. A loop gets to make things, but it doesn’t get to publish them.
A few more things I’ve given it
- My cousin’s Chromebook. Flashed new firmware and turned it into a Ubuntu laptop that boots in under 8 seconds. The microphone kept dying until a reboot, and Claude traced it to an audio service probing every sound device on startup, including two the new firmware doesn’t support. That probe crashed the audio chip. One config line fixed it.
- Our Google Nest speaker. It beeped twice and refused to talk for a whole day. The cause was an old TP-Link extender cloning our router’s Wi-Fi name while its own internet connection was dead. Some devices joined it and got nothing. The extender is now unplugged for good.
- The car. The head unit’s launcher was ugly, so Claude helped me build a new one in Kotlin, with a driving mode that kicks in above 30 km/h and drops out below 18. I wrote about that one separately.
- My Mac. Hunted down root-level background processes left behind by apps I uninstalled months ago, including a DRM daemon from a music app I’d forgotten I ever installed.
None of these were urgent, and that’s sort of the point. They’re the jobs that sit on a list forever because they’re each a Saturday afternoon of fiddling, and I never have the Saturday.
If you want to try the device version
Turn on Developer Options and wireless debugging, connect over ADB, and tell Claude two things before it starts: measure storage, RAM and Wi-Fi before touching a single package, and keep an undo file for every change. Most of the speed you’re after is probably in the first instruction.
The one I haven’t figured out yet is the TV in my uncle’s house. 1.84 GB of RAM, already debloated, already on 5 GHz. Claude’s honest answer was that nothing left on that box is worth disabling. Maybe the real fix is a ₹3,000 streaming stick and I just don’t want to admit it.