{"course":{"slug":"how-software-changed","title":"How Software Development Changed","url":"https://addaly.com/learn/how-software-changed","level":"intermediate","track":"work"},"lesson":{"slug":"what-the-loop-costs","title":"What the loop costs, and the free path","url":"https://addaly.com/learn/how-software-changed/what-the-loop-costs","position":8,"of":87,"minutes":9,"answer":"Token spend is only the visible cost of the loop, latency and attention are usually larger, and a free local model plus a strict type checker beats an expensive model with no oracles.","keyIdea":"Token spend is only the visible cost of the loop, latency and attention are usually larger, and a free local model plus a strict type checker beats an expensive model with no oracles."},"body":{"format":"markdown","text":"## The three costs, only one of which appears on an invoice\n\n**Tokens.** An agentic session re-sends its context on every turn. A 2,000-line source file is roughly 25,000 tokens. Forty turns that keep re-reading it is a million tokens of input, for one afternoon, on one file. Prices change constantly, so learn the shape rather than the number: input is much cheaper than output, cached input is much cheaper again, and a session that keeps a large context alive costs a multiple of one that works from a narrow slice.\n\nThe practical control is scope. Give it three files, not the repository. Most of the cost in a runaway session is re-reading things that were never relevant.\n\n**Latency.** A thirty-second round trip, sixty times a day, is half an hour of standing still. It does not appear on a bill and it is often larger than the token cost in money terms. The fix is batching: ask three questions in one message, not three messages. Fewer, larger turns is both cheaper and faster.\n\n**Attention.** The one nobody prices. Every generated block is a decision to make, and decisions are the fatiguing part of the day. A session that produces nine things to evaluate costs more of you than one that produces two, even if the token bill is identical.\n\n## The rough shape of the money\n\nAt the time of writing, per-seat assistant subscriptions sit in the range of a few tens of US dollars a month, and metered API use for heavy agentic work can exceed that comfortably for a single active developer. Both numbers have moved repeatedly and will move again, downward per token and upward per session as tools use more context, so any figure printed here is a snapshot rather than a fact.\n\nWhat is stable is the comparison. Against a developer's fully loaded hourly cost in a high-income market, the tool is cheap and the argument is about whether it works, not what it costs. Against a developer's cost in a lower-income market, the same subscription can be a significant fraction of a salary, and the free path stops being a footnote and becomes the main road.\n\n## The free path, concretely\n\nOpen-weight coding models run on your own machine. The two common runners are **Ollama** (one command to install, one to pull a model) and **llama.cpp**, which is what Ollama is built on and which gives more control. Both are free and both run on ordinary hardware.\n\n```bash\nollama pull qwen2.5-coder:7b\nollama run qwen2.5-coder:7b\n```\n\nA quantised 7-billion-parameter coding model needs roughly 5 to 6 GB of memory and runs at usable speed on a laptop with 16 GB of RAM, with no GPU, though a GPU makes it several times faster. The Qwen coder line, the DeepSeek coder line, Codestral and the StarCoder lineage are all in this space; which one is best changes every few months and any specific recommendation here will date badly.\n\nEditor integration is free too. Continue and similar extensions connect a local model to VS Code, JetBrains editors or Neovim. Several hosted assistants also have free tiers, including for students and open-source maintainers, though the terms move.\n\n**The limitation.** A local 7B model is close enough on completion, boilerplate, format translation and explanation. It is meaningfully worse at holding several files in mind at once, at long chains of reasoning, and at noticing that your codebase already contains the helper it is about to rewrite. The gap is real and you should not let anyone tell you otherwise. Compare it against the task list from the previous lesson: the local model covers the large-payoff column almost entirely, and falls behind in the column where you should be doing the thinking yourself.\n\n**The privacy dividend.** A local model means the code never leaves the machine. For a contractor bound by a client agreement, an employee at a firm with a strict policy, or anyone working on something regulated, that is not a nice-to-have. It is the difference between using the tool and not.\n\n## The tools that were always free and are now worth more\n\nThis is the part that gets skipped in every discussion of cost.\n\nYour compiler. Your type checker. Your linter. `ripgrep`. `git bisect`. A profiler. A property-testing library. A database constraint. None of these cost anything, none of them need a GPU, and every one of them is an oracle that runs on every change for ever.\n\nIn a world where producing plausible code is free, the tools that mechanically reject wrong code went up in value, and they are the cheapest things in your stack. A team with a strict type checker and a good test suite gets more out of a cheap model than a team with neither gets out of an expensive one. That is not a consolation prize for people without budget. It is the actual ordering of what matters."},"check":{"question":"A developer on a slow connection runs an agentic session for an afternoon, sending forty turns that each re-read the same four large files. Where does most of the cost sit?","options":[{"text":"In output tokens, since generated code is billed at the higher rate and forty turns produce a great deal of it.","correct":false,"tempting":"Correct that output is billed higher per token, but forty re-reads of large files produce far more input tokens than the session produces output."},{"text":"In the model's context window filling up, which forces a more expensive model tier to be used automatically.","correct":false,"tempting":"Invents an automatic escalation mechanism; a full context window causes truncation or a failure, not a silent upgrade."},{"text":"In repeatedly re-sent input context, and in the wall-clock time spent waiting on turns.","correct":true},{"text":"In the developer's review time afterwards, which is the only cost that scales with the number of turns.","correct":false,"tempting":"Names a real and often dominant cost, but it scales with how much was accepted, not with turn count: many turns produce nothing to review."}]},"prev":{"slug":"tasks-sorted-by-payoff","title":"Where the gain is large, small, and negative","url":"https://addaly.com/learn/how-software-changed/tasks-sorted-by-payoff"},"next":{"slug":"the-honest-ledger","title":"Measuring the effect on yourself","url":"https://addaly.com/learn/how-software-changed/the-honest-ledger"},"authorship":"Founder and series editor: Dr Mustafa Mun. Written by AI models to a written standard. Exam keys checked blind by a second model: 3,665 of 3,666 agreed. Academic review invited.","review":{"status":"Draft, open for academic review"},"cite":"Addaly (2026) 'What the loop costs, and the free path', in How Software Development Changed. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/how-software-changed/what-the-loop-costs (Accessed: 13 October 2026).","licence":{"name":"CC BY-NC-SA 4.0","url":"https://creativecommons.org/licenses/by-nc-sa/4.0/"},"reader":{"schema":1,"title":"What the loop costs, and the free path","courseTitle":"How Software Development Changed","module":{"index":1,"slug":"where-the-cost-went","title":"Where the cost actually went"},"answer":null,"keyIdea":"Token spend is only the visible cost of the loop, latency and attention are usually larger, and a free local model plus a strict type checker beats an expensive model with no oracles.","hero":{"kind":"plate","image":null,"alt":null,"caption":null},"blocks":[{"t":"h2","id":"the-three-costs-only-one-of-which-appears-on-an-invoice","runs":[{"text":"The three costs, only one of which appears on an invoice"}]},{"t":"p","runs":[{"text":"Tokens.","b":true},{"text":" An agentic session re-sends its context on every turn. A 2,000-line source file is roughly 25,000 tokens. Forty turns that keep re-reading it is a million tokens of input, for one afternoon, on one file. Prices change constantly, so learn the shape rather than the number: input is much cheaper than output, cached input is much cheaper again, and a session that keeps a large context alive costs a multiple of one that works from a narrow slice."}]},{"t":"p","runs":[{"text":"The practical control is scope. Give it three files, not the repository. Most of the cost in a runaway session is re-reading things that were never relevant."}]},{"t":"p","runs":[{"text":"Latency.","b":true},{"text":" A thirty-second round trip, sixty times a day, is half an hour of standing still. It does not appear on a bill and it is often larger than the token cost in money terms. The fix is batching: ask three questions in one message, not three messages. Fewer, larger turns is both cheaper and faster."}]},{"t":"p","runs":[{"text":"Attention.","b":true},{"text":" The one nobody prices. Every generated block is a decision to make, and decisions are the fatiguing part of the day. A session that produces nine things to evaluate costs more of you than one that produces two, even if the token bill is identical."}]},{"t":"h2","id":"the-rough-shape-of-the-money","runs":[{"text":"The rough shape of the money"}]},{"t":"p","runs":[{"text":"At the time of writing, per-seat assistant subscriptions sit in the range of a few tens of US dollars a month, and metered API use for heavy agentic work can exceed that comfortably for a single active developer. Both numbers have moved repeatedly and will move again, downward per token and upward per session as tools use more context, so any figure printed here is a snapshot rather than a fact."}]},{"t":"p","runs":[{"text":"What is stable is the comparison. Against a developer’s fully loaded hourly cost in a high-income market, the tool is cheap and the argument is about whether it works, not what it costs. Against a developer’s cost in a lower-income market, the same subscription can be a significant fraction of a salary, and the free path stops being a footnote and becomes the main road."}]},{"t":"h2","id":"the-free-path-concretely","runs":[{"text":"The free path, concretely"}],"role":"free"},{"t":"p","runs":[{"text":"Open-weight coding models run on your own machine. The two common runners are "},{"text":"Ollama","b":true},{"text":" (one command to install, one to pull a model) and "},{"text":"llama.cpp","b":true},{"text":", which is what Ollama is built on and which gives more control. Both are free and both run on ordinary hardware."}]},{"t":"code","lang":"bash","label":"Bash","text":"ollama pull qwen2.5-coder:7b\nollama run qwen2.5-coder:7b"},{"t":"p","runs":[{"text":"A quantised 7-billion-parameter coding model needs roughly 5 to 6 GB of memory and runs at usable speed on a laptop with 16 GB of RAM, with no GPU, though a GPU makes it several times faster. The Qwen coder line, the DeepSeek coder line, Codestral and the StarCoder lineage are all in this space; which one is best changes every few months and any specific recommendation here will date badly."}]},{"t":"p","runs":[{"text":"Editor integration is free too. Continue and similar extensions connect a local model to VS Code, JetBrains editors or Neovim. Several hosted assistants also have free tiers, including for students and open-source maintainers, though the terms move."}]},{"t":"p","runs":[{"text":"The limitation.","b":true},{"text":" A local 7B model is close enough on completion, boilerplate, format translation and explanation. It is meaningfully worse at holding several files in mind at once, at long chains of reasoning, and at noticing that your codebase already contains the helper it is about to rewrite. The gap is real and you should not let anyone tell you otherwise. Compare it against the task list from the previous lesson: the local model covers the large-payoff column almost entirely, and falls behind in the column where you should be doing the thinking yourself."}]},{"t":"p","runs":[{"text":"The privacy dividend.","b":true},{"text":" A local model means the code never leaves the machine. For a contractor bound by a client agreement, an employee at a firm with a strict policy, or anyone working on something regulated, that is not a nice-to-have. It is the difference between using the tool and not."}]},{"t":"h2","id":"the-tools-that-were-always-free-and-are-now-worth-more","runs":[{"text":"The tools that were always free and are now worth more"}]},{"t":"p","runs":[{"text":"This is the part that gets skipped in every discussion of cost."}]},{"t":"p","runs":[{"text":"Your compiler. Your type checker. Your linter. "},{"text":"ripgrep","code":true},{"text":". "},{"text":"git bisect","code":true},{"text":". A profiler. A property-testing library. A database constraint. None of these cost anything, none of them need a GPU, and every one of them is an oracle that runs on every change for ever."}]},{"t":"p","runs":[{"text":"In a world where producing plausible code is free, the tools that mechanically reject wrong code went up in value, and they are the cheapest things in your stack. A team with a strict type checker and a good test suite gets more out of a cheap model than a team with neither gets out of an expensive one. That is not a consolation prize for people without budget. It is the actual ordering of what matters."}]}],"check":{"question":[{"text":"A developer on a slow connection runs an agentic session for an afternoon, sending forty turns that each re-read the same four large files. Where does most of the cost sit?"}],"options":[{"text":[{"text":"In output tokens, since generated code is billed at the higher rate and forty turns produce a great deal of it."}],"correct":false,"tempting":[{"text":"Correct that output is billed higher per token, but forty re-reads of large files produce far more input tokens than the session produces output."}]},{"text":[{"text":"In the model’s context window filling up, which forces a more expensive model tier to be used automatically."}],"correct":false,"tempting":[{"text":"Invents an automatic escalation mechanism; a full context window causes truncation or a failure, not a silent upgrade."}]},{"text":[{"text":"In repeatedly re-sent input context, and in the wall-clock time spent waiting on turns."}],"correct":true,"tempting":null},{"text":[{"text":"In the developer’s review time afterwards, which is the only cost that scales with the number of turns."}],"correct":false,"tempting":[{"text":"Names a real and often dominant cost, but it scales with how much was accepted, not with turn count: many turns produce nothing to review."}]}],"order":[0,2,1,3],"why":null},"prev":{"slug":"tasks-sorted-by-payoff","title":"Where the gain is large, small, and negative","minutes":10},"next":{"slug":"the-honest-ledger","title":"Measuring the effect on yourself","minutes":9}}}