This is a write-up about running a research project with coding agents. The project is read-only (it has no signer and submits no transactions), it hasn't found anything, and nothing here is trading or investment advice.
This post covers a whole project rather than one bug, a small read-only research harness for newly launched Solana tokens that coding agents built over three days, and that I then reset after a direction review showed most of the effort had gone into the wrong things. It's longer than usual, and it's mostly about what running agents on a domain you don't know looks like, since I knew close to nothing about crypto when I started.
What three days of agent work looked like
The question was whether a short-hold strategy on very young pump.fun tokens (buy, hold for 30 to 60 seconds, sell) has any edge left after costs, with a learned model deciding when to enter. That went to the agents as a loose description, with a note that I was new to all of it, and they worked out a plan from there.
What came back after three days looked very serious. There was decision-time-only replay (so nothing could peek at the future), a paper ledger, a no-trade baseline, 100 seeded random controls to compare against, predeclared pass and fail thresholds, and 224 green tests. There were also about 13,000 lines of documentation, with nine ADRs, seventeen solution docs and twenty research docs, most of them landing in about 48 hours.
Then a fresh agent reviewed the direction of the project, with the instruction not to make assumptions and to ask whatever it needed, which is a review you can run on any agent-built project and which I'd now run after the first day instead of the third. Its verdict was that the research design was sound but that the last two days had drifted from the research question into hand-building a byte-level decoder for PumpSwap, pump.fun's AMM, and the list of reasons was a bit uncomfortable to read:
- The second milestone had turned into decoder archaeology. Every coverage study found another account size, truncated log or legacy encoding, and every one of those spawned an assessment, a verifier, an ADR and a solution doc. That depth of verification fits executing real trades, and the paper experiment's main risks were lookahead and getting costs wrong, which the decoder work didn't touch.
-
Most of the code wasn't in git. The package had about 2,600 lines of Python, and a gitignored
work/directory had about 24,000. Three days of work had two commits, and the committed ADRs cited functions that a fresh checkout didn't have. The reason given for ignoringwork/was that it held the RPC credential, which called for moving the credential out rather than leaving the code unversioned. - The dependency rule came from nowhere. The README said the project needs "no runtime third-party packages", no decision record backed it, and it was the reason the agents were writing byte decoders by hand. When the reviewer asked whether it was deliberate, the answer was no, nobody had ever asked for it.
- The planned evaluation couldn't run. Fourteen days of polling at two requests per second is roughly 2.4 million requests, against a free tier of 1 million a month.
- The project was testing the wrong thing. The question was about a learned model on very young tokens (the reset later planned a gradient-boosted classifier for it), while the project had explicitly deferred learned models and was testing a hand-coded 20 basis point momentum rule that nobody expected to carry an edge.
The reviewer had the same habits in a smaller way. Its own spec self-review corrected three counts it had written from memory (26 places reading the credential file, not ten), and the IDL-driven decoder it first picked as the clean option, built on anchorpy, was dropped the same evening, when research showed the library hadn't had a release in well over a year, pinned old versions of solders and websockets, and auto-loaded a pytest plugin that aborted test runs.
None of the agents had done anything wrong in the narrow sense, since every step followed reasonably from the one before it. What was missing was someone deciding what the work was for, and that someone was supposed to be me.
A goal where "no edge" is an answer
The first thing the reset wrote down was a goal, as a decision called D0 that sits above all the other research defaults. The deliverable is a go or no-go on funding a small live pilot, judged on a paper evaluation against a measured cost per trade, and a trustworthy "there's no edge here" is a complete and acceptable result. Having it written down also gave every later piece of work something to be measured against, which the first three days never had, since nothing in them could say whether more decoder coverage brought the project closer to an answer.
With the goal fixed, the rest of the work split into five stages (reset, capturing data, measuring costs, a classifier, and only then a pilot), each with its own design, plan, pass condition and review, and none starting before the previous one passed. Everything below comes from the first two.
Costs before models
The review's most useful suggestion was to add up what one round trip costs before building anything else, because if the fees alone are bigger than the moves a 30 second hold can catch, no model changes the answer. The harness at that point charged a flat 5,000-lamport base fee per leg and nothing for tiered venue fees, priority fees, tips or failed transactions.
The reset spec took its venue fee from the constants in the PumpSwap README, 0.5% per round trip, and during plan research a subagent found that those constants are only the fallback for pools without a fee config. The pools this project cares about pay 1.25% per swap, so two swaps cost 2.5% in venue fees before anything else. The agent checked the correction against the pinned fee document and pump.fun's fee page before changing the headline, and that's the habit worth copying, since the first pass had cited the right document and still read the wrong row out of it. If an agent corrects a number, ask it to show you the source it read, not the one it remembers. The whole calculation, with the tier table, rent, tips and price impact per position size, is in Adding up what a pump.fun round trip costs before modelling it.
Keeping citations checkable before deleting the scratch directory
The agents' research docs cited about 200 files that git had never tracked, mostly reports in work/, and the plan was to archive that directory and then delete it. So the reset built an evidence manifest, where cited reports of 200 KB or less get copied into docs/evidence/, larger ones are recorded as untracked, and files that will be deleted are recorded with their hashes, plus a checker that every citation resolves to something in the manifest.
The manifest went wrong twice, both times because of files nobody looks at. The build reported 272 tracked copies, but 13 .log files were never staged because a user-level global gitignore excluded *.log (git check-ignore -v <file> tells you which ignore file wins, which is worth running on anything you expect to be tracked). git add -f would have worked once and then failed silently on the next rebuild, so the fix was a negation in the repository's own .gitignore, plus a test that every entry marked as tracked shows up in git ls-files:
!docs/evidence/**
The other one was nine __pycache__/*.pyc files that a recursive glob pulled into the manifest. The archive excluded bytecode, so the gate comparing the archive with the manifest would have refused the delete, and the fix had to filter bytecode by name everywhere candidates are collected, because filtering by "is this a file on disk" would have dropped every deleted entry once work/ was gone. After that, work/ was archived (with a second copy in iCloud Drive) and deleted.
Checking the capture design against vendor docs and live data
The second stage is a 24-hour capture of every pump.fun and PumpSwap transaction over Helius' transactionSubscribe, chosen so the stream, the backfill and the test fixtures could share one decoder once the stream is normalised to the getTransaction shape. The design was approved in conversation and committed, and then a research pass against the Helius docs, the upstream IDLs and live data changed it in several places before any code existed:
- Helius documents base58, base64 and jsonParsed encodings for this method, and the spec had assumed
json. - pump.fun had changed its IDLs the day before (new buy and sell instructions, multi-hop swaps, sweep events, appended fields), so every trade using the new instructions would have failed to decode.
- Live
SellEvents were 441 bytes against a 433-byte pinned layout, and the strict decoder rejected them. - Notifications carry no
blockTime.
So the capture subscribes in base64 and normalises with solders, decodes the pinned prefix and records any trailing bytes, and fills block times in a separate pass. One more came back in plan review. slotSubscribe fires at processed commitment, and the gap backfill filtered by those slots, so it would have dropped the transactions lost during an outage and still marked the gap as complete.
When another review round stops paying off
The capture plan went through two full review rounds. Round one used six reviewers in parallel (security, performance, code quality, architecture, lifecycle, data integrity) and found 6 P0s and 28 P1s, like a capture window that never ended while the stream was down. The fix pass also moved a raw 60 minute calibration capture ahead of the decoder, so real data would arrive earlier.
Round two found 1 P0 and 30 P1s, and 12 of those 31 findings, the P0 among them, were regressions caused by round one's fixes. Two of the fixes interacted so that the derive step could refuse to run forever, which three reviewers traced independently, and a new recursive credential scanner would crash at a few hundred levels of nesting, while Python's JSON parser happily accepts much deeper input. At that point I asked whether all these re-review phases were needed, and the agent agreed that a third round should be one scoped verification pass over the areas that kept regressing, which found nothing above P2. When most of a round's findings are the previous round's fixes, getting real data in front of the plan is worth more than another broad round.
Running agents on a plan that was already reviewed
Both stages were executed the same way. A fresh implementer agent took one task at a time, a reviewer agent checked each task, and the controlling session recorded every conflict as a ruling (what it decided, why, and what it costs if wrong) instead of stopping to ask the owner. You'd expect a reviewed plan to leave little to rule on, but the 13-task reset plan still produced 34 rulings, most of them defects in the plan itself, like a test that would have matched its own source on every run, or a "16 changed lines" check sitting under a table that added up to 21. The controller slipped too (it once ran the evidence check without build first, and only its own rebuild gate caught it), and one implementer admitted in its report that it had written an invented fix-round section and then removed it, after which the controller re-ran every gate itself instead of trusting reports.
The capture plan went further and carried every line of code verbatim, almost 11,000 lines in the end, so the implementers mostly reported that their diff against the brief was empty. Reviewers still found real defects in that verbatim code, for example a write-queue limit that counted characters instead of bytes. They were marked as plan-mandated and deferred, except one, where the plan's own code printed the end-of-run summary without scanning it for the API key, which broke the plan's own global rule. The reviewer graded that one minor, and the controller had to rule that the spec wins over the plan's code. The same plan also cited 75 GiB of free disk, measured that day, and df showed 15 GiB on the same day.
That key deserved the attention, since Helius only takes it as an api-key query parameter, and the capture writes every raw frame to disk before parsing, so anything that echoes the URL can carry the key with it. A plain substring check misses a \u-escaped copy, so the parsed value is scanned as well, and the recursive scanner from round two became an explicit-stack walk (put the recursive version back and one of the stream tests fails). A hit stops the run, and that capture is never sealed, so the way out is to rotate the key and capture again. The live capture itself runs where the agent can't see the key at all.
The ledger had one gap that only showed up at the end of the reset. Three decisions were marked "owner may overrule" (dropping anchorpy, the 1.25% fee headline, and the credential allowlist), and nobody put them to me until the final whole-branch review noticed. When it did, my first answer was that they were accepted if they were the right thing to do, which handed the decision straight back. I accepted all three explicitly on the merge day, but a ledger like that makes decisions visible without making the owner take them.
What it cost
In money, so far, the $49 a month Helius Developer plan, which is the cheapest one that includes transactionSubscribe. In planning, a lot more than expected, since the capture stage had 17 commits of design and plan documents before its first line of code, with a spec of about 1,000 lines and a plan of almost 11,000.
What changed in how I run these projects
The main lesson is that when you are new to a domain and let agents run, they fill the gap where your decisions should be with constraints nobody made and with work that is easy to verify, and three days of careful work can end up answering a question you never asked. Writing the goal down first, in a form where "no" is a complete answer, fixed more than any review did, and adding up the costs before modelling anything settled more than a milestone of code would have. The rest is about trust in what agents report, which means asking for the source behind a corrected number, keeping everything the docs cite where it can be checked, putting the "owner may overrule" decisions in front of yourself instead of letting them pass, and stopping broad review once it mostly finds its own previous fixes.
Top comments (0)