How Good Are Coding Agents Now?
The last couple of times I tried to use a coding agent in anger to come to grips with a large existing C or C++ codebase for a desktop application, they failed miserably. Either the code base was too large or too complex, or there wasn’t enough C and C++ training data in the dataset for the LLM, or for some other reason, it couldn’t even begin to do something reasonable. Most recently, when I tried to use a coding agent to vibe code a macOS desktop app and a simple one at that, it failed miserably. It could not produce anything that could even build and run one simple test. But that was about four months ago, and that’s a long time in the world of LLMs. So I figured I’d give it another try with another problem that has recently come to my attention.
Specifically, I’m going to try to see if any available coding agent can analyze https://github.com/transmission/transmission/issues/8401 to figure out why the Transmission UI routinely goes into a spinning beach ball state on the Mac. Let’s begin.
First up, I’m going to try OpenCode with the default Big Pickle model simply because that’s the one I happen to have open right now and use fairly frequently. This model has been relatively good at solving simple Java problems. I’ve had in various Maven projects and analyzing that code base for bugs. It’s probably not state of the art, but It does do some useful work. So I’ll start with that. Here’s my prompt.
Investigate the Transmission code base on GitHub with an eye to identifying the root cause or causes of issue https://github.com/transmission/transmission/issues/8401 on macOS. Consider in particular if there’s I/O work blocking the main UI thread that should be moved elsewhere or performed asynchronously.
And guess what? It came up with some plausible suggestions.
+ Thought: 6.0s
Here’s what the code shows. I verified the deltas directly against the 4.0.6 and 4.1.0 tags.
Root causes for issue #8401 (4.1.0 beachball / high CPU with ~5k torrents)
- Startup: the main thread blocks behind the entire torrent load.
The macOS app only reaches makeKeyAndOrderFront: after fully loading every torrent (macosx/Controller.mm:710, window shown at :822). The load itself is synchronous disk I/O:
- tr_sessionLoadTorrents dispatches work to the session thread and then parks the UI thread on loaded_future.wait() until all torrents are loaded — libtransmission/session.cc:1579-1591, session_load_torrents at :1529-1575.
- Per torrent it reads the .torrent/.magnet file and the whole .resume file (tr_torrent::init torrent.cc:891-1039; resume.cc:617-628).
- Then for every file of every torrent it does a synchronous stat to compare mtimes: ResumeHelper::load_checked_pieces ? find_file ? tr_sys_path_get_info (torrent.cc:2573-2595, torrent.cc:1180-1187, torrent-files.cc:116-142). find_file probes up to 4 candidate dirs × 2 suffixes = up to 8 syscalls per file. With thousands of torrents on asleep external USB drives, that’s minutes of cold-disk stat I/O before the window ever appears.
This structural blocking predates 4.1.0, but 4.1.x amplified it (resume api_compat conversion, magnet migration, heavier per-torrent init), and it interacts with #2.
- Per-second UI refresh now takes the session lock (new in 4.1.0, PR
#7948)
- tr_sessionLock was introduced and tr_torrent::stats() now acquires the session’s recursive_mutex on every call — libtransmission/torrent.cc: 1273, session.cc:461-467, session.h:610-612/1373. – Controller.mm -updateUI — fired every 1s (kUpdateUISeconds = 1.0) — now holds that same lock across the whole per-torrent loop (macosx/Controller.mm:2370-2384).
- In 4.0.6, tr_torrentStat took no lock and tr_sessionLock doesn’t exist at all (verified via git grep).
So whenever the session thread is mid-disk-work (verifying, writing resumes, loading), the 1-second UI tick blocks behind the mutex ? cursor beachball exactly as discussion #8302 titled it (“UI updates synchronous with file system activity”), plus steady lock-contention CPU. Any torrents that can’t load valid resume state fall back to full tr_torrentVerify piece-reads — large synchronous I/O that pins the UI for a long time and matches the “files recheck / data not found” reports.
- Corroborating history
The 4.1.1–4.1.3 branch itself acknowledges perf regressions in these exact spots: 16e971478 “perf: permanently cache Torrent.hashString”, 45419324c/#8517 “fix: UI update regression”, 1dd096e77. Issue #8587 (one bad .torrent blocks the rest) is the same blocking-load design.Recommendation (I/O off the main thread)
- Don’t block awakeFromNib on tr_sessionLoadTorrents — load on a background queue, show the window first, and feed the table incrementally (or provide a non-blocking tr_sessionLoadTorrents).
- Stop stating every file synchronously at load in load_checked_pieces — defer/degrade the mtime compare (skip or batch it) so cold USB drives don’t stall startup.
- Rework #7948: never hold the session mutex across the whole updateUI loop; snapshot stats per torrent under a brief non-reentrant grab instead.
I’m not (yet) qualified to verify these findings, but it sounds like a good place to start. So I had it send a PR to fix the the third problem. That PR seemed reasonable so I had it send two more. It wasn’t able to test its changes directly because I hadn’t yet installed the necessary C++ tools — clang et al. — in the container where I run OpenCode, so I ran the tests manually while I added a C++ toolchain to my Dockerfile.
Here are the PRs:
- https://github.com/transmission/transmission/pull/9131
- https://github.com/transmission/transmission/pull/9132
- https://github.com/transmission/transmission/pull/9134
Current status:
-
https://github.com/transmission/transmission/pull/9131: Accurate issue and fix but rejected because this is already done in the main branch for 4.2,
and further work on 4.1.x is limited. This is reasonable and common, especially for desktop apps. IMHO it is is somewhat old-fashioned and not the current best practice for software development. Work should usually happen on HEAD without release branches. For projects in active development, release cadence should be weekly or faster. However, that does require better testing and automation than most projects have so this is understandable. - https://github.com/transmission/transmission/pull/9132 not responded to as of 24 hours later. Not especially surprising for an open source project. I’ll update when it’s reviewed.
- https://github.com/transmission/transmission/pull/9134: feedback requested about whether this is an actual problem or an edge case that doesn’t actually contribute to the problem. I (or BigPickle) will need to dig deeper to figure this out.
Overall though, this is a pretty impressive result for OpenCode and BigPickle. Certainly better and faster than I could have done myself. I had expected I was going to need to work my way up the chain of coding agents before (or if) I found one that could handle this. BigPickle –> DeepSeek 4.1 Max –> Gemini –> Claude. Instead I stopped after the first one. I might need to go back to one of those older projects, and see if it’s now within the realm of the possible.