A Whole Codebase in One Prompt: What I Learned Auditing a Project With SubQ Savant

I put an entire codebase into one prompt for SubQ Savant, a model with a 4-million-token context window, and asked it 12 kinds of questions. This post covers how the experiment worked, what a review of 28 findings showed, what it cost, and what went wrong.

If you use a coding agent, you have watched it search. It looks for a name, finds three files, reads part of each, and builds its answer from what it read. That works well when the evidence for an answer sits in one or two places. It works less well for a question such as “where in this entire codebase does the code deviate from its own rules and standards?” because the answer depends on every place in the codebase, and a codebase is often larger than the agent’s context window. The agent cannot read all of it, so it has to choose what to read, and its answer leaves out whatever could not fit into the available context window.

SubQ Savant is a model with a context window of 4 million tokens, which is large enough to hold an entire mid-sized codebase in a single prompt. I had early access and an API credit to spend, so I ran an experiment on one of my own projects: put all of it into one prompt, ask a series of focused questions, and check every answer against the real files. This post covers how the experiment was built, what came back, what a review of 28 of the findings showed, what it cost, and the parts that went wrong.

Note: A quick word on what I tested before going further. The model is subq-savant-1.4. SubQ’s models page lists it as in preview, with a 4M token context window (page read December 2, 2026). SubQ announced the model publicly in Introducing SubQ Savant (dated December 2, 2026). I had access before that announcement, so every run in this post happened before it. The codebase is one of my open-source projects, written in JavaScript and TypeScript. The main run on November 21, 2026, put 761 files into the prompt, which the API counted as about 1.68 million input tokens. Later runs on November 27 and 28 put 795 files into the prompt, about 2.36 million tokens. I sent 33 requests in total. I did not send the same questions to a smaller model with search tools, so nothing in this post compares the two approaches. I removed project, file, and function names from every excerpt because some findings describe security-related problems that aren’t fixed yet. For the same reason, this post shows none of the findings from the untrusted-input pass, which looks for security problems.

One Question per Request

What do you ask a model that has read all the code in the codebase? The first instinct might be to simply send the prompt, “review this codebase”, but a request like that would be too broad and ambiguous. It gives the model no reason to go deep on any one kind of problem. I did not test that assumption against a single large prompt, so treat it as a design choice.

I asked Claude to brainstorm kinds of question that need evidence from many files at once, and it proposed ten. I added two about tests. Later I added a thirteenth, the broken windows pass. Each kind of question is asked on its own, in a separate request, and I call each one a pass.

Pass Question
odd-one-out Which conventions are followed in many places and broken in a few?
state-machines What lifecycles does the code implement, and which transitions are wrong?
invariants Which rules must always hold, and which writes can break them?
untrusted-input Where does attacker-controlled input reach a dangerous operation?
contract-mismatches Where do two sides of a boundary disagree?
duplicated-knowledge Which rules are implemented more than once and have drifted apart?
failure-paths Where is failure swallowed, half-handled, or unsafe to retry?
tests-vs-behavior Which behaviors are untested, and which tests cannot fail?
test-level Which tests are written at the wrong level?
mutants Which code changes would no test catch?
architecture Where does the real structure violate the intended one?
change-impact What breaks if I make this change?
broken-windows Which small lapses sit below the standard the surrounding code sets?

I never ran change-impact because it needs a described change, and I didn’t have one in mind at the moment. The other twelve ran.

Here is the full task text for the first pass, to show how narrow each question is:

Find conventions this codebase follows in many places and breaks in a few.
Examples: every route handler validates its input except two; every database
write goes through one helper except one call site; every async call is
awaited except one.

For each finding, cite at least two locations that follow the convention
(role "the convention") and every location that breaks it (role "the
violation"). Report only deviations that could cause a defect, not style
differences.

The requirement to cite both the convention and the violation is the part I would keep in any version of this. A linter can find one bad line. It cannot say “this line is the exception to what 40 other places do” unless it has those 40 places in view, and that is the case a 4-million-token window is for.

How the Harness Checks the Answers

A model that has read 1.68 million tokens can still describe code that does not exist. How would you know? Reading every finding against the source by hand does not scale, so the harness (the small command-line tool that runs the experiment) checks what a script can check. Claude Code wrote it: about 2,500 lines of TypeScript with no runtime dependencies. The code is on GitHub as savant-harness, together with the counts and token usage from the runs in this post.

codebase → pack    every text file, each line prefixed with its line number
         → ask     one request per pass: the same bundle, then one question
         → sample  every pass runs twice
         → check   look for every quoted line in the real file
         → merge   findings from both samples that cite the same place become one
         → report  Markdown and one HTML page

The check step is a quote check. The model must answer in JSON that follows a schema, and every finding must quote the lines it cites, with a file path and a line number. The harness then looks for each quote in that file. A quote that is not there marks the finding as likely invented. A quote that is there proves only that the cited code exists, and says nothing about whether the reasoning built on that code is right.

Each pass runs twice because SubQ’s models page says Savant always samples at temperature 1. Temperature is the setting that controls how much randomness goes into the model’s choice of each next word, and at 1 that choice is partly random, so two runs of the same question differ. SubQ’s Chat Completions reference (read December 2, 2026) rejects any other temperature, but it lists two controls I did not use: seed, which aims for the same output when a request is repeated and is described as best-effort, and top_p, which narrows the choices the model samples from. A seed for each sample should make a run repeatable, although two samples with different seeds would still differ. The report counts how many samples reported each finding. The assumption built into the report was that a finding both samples reported is more likely to be real.

Does a model recall the middle of a very long prompt as well as the ends? To measure that, the harness can place small marker files at even intervals through the bundle, each holding a random value, and ask the model to return all of them.

The bundle leaves out files that git ignores, generated output, binaries, files over 512 KB, and files likely to hold secrets. I also excluded image files and one folder of generated data. That folder turned out to hold the evidence for one finding.

Every request starts with the same system prompt and the same bundle, and only the question at the end changes. SubQ bills input that it has seen before at a tenth of the price, so keeping everything before the question identical was meant to make every request after the first one cheap.

What Came Back

The twelve passes returned 117 findings, 35 predicted mutants, and 8 lifecycle descriptions. A mutant is a small change to the code, such as >= turned into >, that the model predicts no test would catch. The term comes from mutation testing.

Pass Findings Reported by both samples
odd-one-out 8 1
broken-windows 28 3
state-machines 12 1
invariants 8 0
untrusted-input 9 1
contract-mismatches 8 0
duplicated-knowledge 12 1
failure-paths 9 2
tests-vs-behavior 5 1
test-level 2 0
architecture 16 5
Total 117 15

The contract-mismatches row is the exception to two samples per pass. It combines one sample at max effort with two at high effort, because of the failed requests described under What Went Wrong.

The mutants pass is not in the table because it returns predictions, not findings: 35 of them, 3 predicted by both samples.

The model rarely invented the code it pointed at. For 112 of the 117 findings, every quoted line was in the cited file. The other 5 had at least one quote the script could not find.

The marker files came back complete. I placed five, at 0%, 25%, 50%, 75%, and 100% of the way through the prompt, and both samples returned all five with the right values. That is ten correct recalls out of ten at 1.68 million tokens, which is a small test and says nothing about a prompt twice that size.

The agreement number is the low one. Only 15 of 117 findings were reported by both samples. I had assumed that a finding both samples reported was more likely to be real. On that assumption, I would have to discard the other 102 findings as noise. The review in the next section does not support that: none of the 25 reviewed findings that only one sample reported was wrong. So I now read the low number as a sign that two samples did not cover everything the model can find, which means that, for this pass, agreement did not separate right findings from wrong ones, and a third sample would probably return findings that neither of the first two did. This is the non-deterministic nature of these models showing up in the results: Savant always samples at temperature 1, so the same question over the same code produces a different answer each time. If I ran this again, I would run more samples per pass and stop when a new sample adds little. I have not measured how many samples that takes, and I have only checked this on one pass.

Reviewing 28 Findings Against the Code

The thirteenth pass came from a rule I work by: leave no broken windows. The idea is not mine. It comes from The Pragmatic Programmer by David Thomas and Andrew Hunt, tip 5: “Don’t Live with Broken Windows.” A broken window is a small lapse that sits below the standard of the code around it, such as a lint suppression with no reason given, a stale comment, or one module that handles an edge case its siblings ignore. I asked Claude how feasible such a pass would be, and it wrote the task text. I raised its limit from 25 findings to 50 to see how much noise that would produce. The pass returned 28 findings, just over the old limit and well under the new one.

I then asked for every one of the 28 to be checked against the code. Three Claude agents with file access did this, each instructed to try to disprove the findings it was given.

Verdict Findings
Confirmed: the claim holds as written 15
Partly right: the core is true, but a detail or the stated risk is wrong 13
Wrong 0

No finding was wrong. “Partly right” needs explaining, because it covers very different cases. Here is one finding as the report page now shows it, with names removed:

A validation function mutates the object it validates
[high severity] [All quotes found] [1 of 2 samples] [Review: partly right]

  The function normalizes by assigning into and deleting from its
  argument, while the module's other normalizers return a new value.

  Checked against the code. The mutation is real, but four callers rely
  on it, and a comment at one call site says so. The suggested fix must
  change those callers too. Medium severity fits better than high.

The model found a real inconsistency and cited the right lines. It missed that the behavior is known and relied on, which changes both the severity and the size of the fix. Several other findings follow the same pattern.

Finding, with names removed What the review found
A fallback error message skipped the step that removes secrets Confirmed for the code the model read. A commit had fixed it by the time of the review.
A lint script leaves its file pattern unquoted, so the shell may expand it True, and it changes nothing today, because no file matches at the depth where the shell would expand it.
One script uses a newer way to detect that it is the entry file The inconsistency is real. The stated portability risk is wrong, because every supported Node version has the feature.
Three files with type annotations are never type-checked Confirmed, and the model missed two more files with the same problem.
A setup command crashes when a folder sits where it expects a file Confirmed by reproducing it. The review added that the crash leaves two written files unrecorded, which the model had not said.
A page writes values from a dataset into the page as HTML The cited line is harmless. The real problem is three other lines in the same file, where names that contain markup would be parsed as elements.

The last row is a case the model could not have got right. It was right that the pattern is risky and wrong about where. It couldn’t see that the dataset contains names with angle brackets because the dataset was in the folder I had excluded from the bundle. A reviewer agent with file access read the data and found a rendering bug that exists today.

Several rows in that table show a value of the review that is easy to miss. A reviewer that reads the files to disprove a finding sometimes finds that the problem is wider than the model reported. So a validated finding is also a place to start digging: when the report is given to other models in parts, looking into one finding can turn up more cases of the same problem than the model listed.

If a review can widen a finding, can it also shrink one? It can, and the severity labels show it. In the example above, the label went from high to medium once the four callers were taken into account. That was the common direction: the reviewers would lower the severity on ten of the 28 findings and raise it on two. So I now read the model’s labels as a rough order in which to look at findings, and leave the severity itself to the review.

The review also supplied the evidence against my earlier assumption about agreement between samples. Of the 28 findings, 25 were reported by only one of the two samples, and none of those 25 was wrong. For this pass at least, the two samples seem to have looked at different parts of the codebase, so low agreement is a reason to run more samples.

If you read my post on semantic-lint (called jev-lint when I wrote it), this division of labor will look familiar: one model produces candidates, and a second reader with access to the files decides which ones hold.

What Went Wrong

Reasoning Used the Whole Output Limit

Savant reasons before it answers, and reasoning is billed and counted as output. At the highest effort setting, max, nearly everything the model wrote was reasoning: on eight of the twelve passes, 96% or more of the output tokens. The answer itself was often only a few thousand tokens at the end.

That makes the output limit easy to hit. In the main run I set it to 200,000 tokens, and two of 24 requests failed. One was cut off in the middle of its answer. The other used all 200,000 tokens on reasoning and never started answering. I raised the limit to 400,000 and reran both passes. One succeeded. The contract-mismatches pass failed again: its second sample used all 400,000 tokens on reasoning, which cost $0.20 in output for no answer.

Lowering the effort fixed it. At high, both samples finished in about 125,000 tokens each. Comparing both sides of every boundary in a codebase seems to be a question with no natural stopping point at max effort, so the practical advice is to lower the effort before raising the limit.

The Cache Discount Depends on Timing

The cached input price worked as documented when requests followed each other closely. In the main run, the second request read 1,682,944 of its 1,682,959 input tokens from the cache.

In the last run it did not. The first sample took 20 minutes, and the second sample was billed as entirely uncached input. My guess is that the cache entry had expired in those 20 minutes. I did not find a stated cache lifetime in SubQ’s documentation or in the launch announcement (both read December 2, 2026), so this remains a guess. On a 2.36-million-token prompt, one missed cache read costs about $0.21.

Requests Are Slow

The main run of 24 requests took just under two hours, so a request averaged a little under five minutes. On the larger prompt, one request took 20 minutes, and another took about 45 minutes to stream roughly 100,000 output tokens before it ended normally. Plan to start a run and come back when it is done.

The Report Mixes Two Snapshots

Between the main run and the reruns, the project gained 497 commits and 34 files. Nine passes and the marker check read the November 21 code, and three passes read the later code. Each rerun section carries a note saying so, but the totals at the top add findings about two different states of the codebase. A cleaner version would run every pass against one commit and record its hash in the report.

A False Claim

When that 45-minute request finished, Claude told me the harness had no timeout, so a request that stalled would wait forever. I asked it to fix that. While writing the fix, it measured what Node’s built-in fetch does with a response that goes silent, and found that fetch ends the response after 300 seconds on its own, with an error the harness already retried.

The fix stayed, because the old behavior was implicit, untested, and reported only the word “terminated”. The harness now retries after 240 seconds of silence with a message that says so. It took one five-minute measurement to disprove a statement about code that Claude had written itself.

What It Cost

The whole experiment cost about $3.50 across 33 requests, at the prices on SubQ’s models page: $0.10 per million input tokens, $0.01 per million cached input tokens, and $0.50 per million output tokens.

Run Requests Cost
First test, one pass, one sample 1 $0.23
Main run, 11 passes and the marker check, two samples each 24 $1.61
Rerun of two passes at a 400,000-token limit 4 $0.70
Rerun of one pass at high effort 2 $0.39
The broken windows pass 2 $0.58
Total 33 $3.50

The rows are rounded to the cent, which is why they add up to one cent more than the total.

How does a 1.68-million-token prompt cost so little per request? The first request pays full price for the input, about $0.17. Every later request that reads the same bundle from the cache pays about $0.02 for it. After that, output is the larger cost: 100,000 to 200,000 tokens of reasoning is $0.05 to $0.10 per request. This is why the main run cost $1.61 for 24 requests, about $0.07 each, while the last run cost $0.58 for only two, about $0.29 each. The last run used a larger prompt, and neither of its requests read the bundle from the cache.

That total leaves out the review. The three Claude agents that checked the 28 findings used about 330,000 tokens between them, which I have not priced here. It also leaves out my own time, and one thing I measured along the way: estimating tokens at four characters each came out about 10% low for this codebase.

What This Experiment Does Not Show

I set out to test one claim: that a model with all the code in the codebase in context answers questions that a smaller model with search tools tends to miss. The experiment does not settle it.

There is no baseline. I never gave the same twelve questions to an agent with search tools on the same code, so I cannot say which findings it would have missed, what it would have cost to get them, or how long it would have taken. In places the review suggests the opposite: reviewers with a smaller context and file access found two files and one rendering bug that Savant did not report.

Only 28 of the 117 findings were reviewed, and all 28 come from one pass, the one that looks for low-stakes problems. I do not know how the passes on security, state, and failure handling would hold up under the same review. The reviewers were models too, so the verdicts measure agreement between models, and I have not checked them by hand.

The 35 mutant predictions were never tested. The harness has a command that applies each predicted change and runs the test suite to see whether a test fails, and I have not run it against this project.

All of this is one codebase, in two languages, at between 1.68 and 2.36 million tokens. I have no data on a prompt near the 4 million token limit.

The baseline is the follow-up I plan to run next: the same questions on the same code, given to an agent with search tools, comparing the findings, the cost, and how long each approach runs before it reports. That agent will run on my Claude subscription, which does not bill per token, so its cost will be an estimate worked out from token counts.

Wrapping Up

If you take one thing from this post, I would make it this: a prompt that holds all the code in the codebase produces places to look, and a second reader with access to the files decides which of them hold. The model rarely invented code. For 112 of 117 findings every quote was real, and none of the 28 reviewed findings was wrong. Its mistakes were judgments about that code: how severe a problem is, whether a behavior is relied on, and what sits in files it was never shown.

Four things tripped me up. At max effort, reasoning can use the entire output limit and return nothing, so lower the effort before raising the limit. The cache discount applied only when requests followed each other closely, and my guess is that timing is the reason. Two samples of the same question mostly return different findings, so a single sample misses much of what a second one finds. And anything excluded from the bundle is invisible, which is easy to forget when the premise is that the model has read all the code in the codebase.

Is it worth $3.50? For a list of 117 places to look in one of my own projects, including findings I was glad to have, yes. As evidence that a 4-million-token window beats an agent with search tools, no, because I did not run that comparison.

If you have run the same questions through both a prompt that holds all the code in the codebase and an agent with search tools on the same code, I would like to know what you measured.

How this work was done: I build and write in collaboration with AI, mostly Claude Code. So the work described and the post itself were made through this collaboration. I hope you find both the work and the words meaningful, or at least useful. Thank you.

Further Reading