Next token after Core·concepts61%·values17%·team9%·skills5%
Program
Agentic engineering
With
Arndt Voges
From
Arndt Voges Consulting
Where
Remote
How the tool works, and why it behaves that way
The model and the contextTools and dataClose
75 min core concepts with a break, 10 min for the homework
0:00
Core conceptsthe model and the context
0:40
Break
0:45
Core conceptstools, the harness, and what leaves your machine
1:20
Homework, close
1:30
End
Interrupt at any point. Cameras on if you can.
Eight sessions
Each session builds on the one before. Today is the foundation.
01TodayCore concepts
02Preparing the codebase for agents
03Writing a good spec
04Feedback loops
05Workflow integration and code review
06Claude Code in depth
07Orchestration and subagents
08Claude Code alternatives
Sessions 02 to 05 follow the path of one ticket: the codebase it lands in, the spec, the loop that checks it, the review that ships it.
Part one
Core·concepts
What's happening behind the scenes
You have tried the tool. Now the theory behind what you saw.
What we cover today
Knowledge cutoffReasoningStatelessData flows
HallucinationTokenToolModel provider
Context poisoningContextAgent
HarnessContext windowModel
Context rotCompaction
The modelThe contextWhen the context goes wrongTools and the harnessData
Token
A chunk of text the AI treats as one piece. Everything goes in and comes out as tokens.
const·total·=·cart.items.length;one line of code, seven tokens splits are illustrative, every model has its own
Input tokens
Everything sent to the model, on every turn: instructions, files, command output, the conversation so far.
Output tokens
What the model writes, reasoning included. Slower to produce and more expensive per token.
Model a giant pile of numbers that predicts the next token. It picks from a ranked list, so every run differs.
The text the model hasAdd a null check to getUser()if ( ! user ) {
The modelone prediction
It produces one tokenthrowthe whole output of one pass
One reply, token by token
if(!user){throwThe ranked list at that positionthrow58%return24%console11%user4%It picks one. Not always the top one, and not the same one on the next run.·new·Error('no user')}<stop>
It sounds too simple to work. But with enough text to train on, it does.
It brings
Patterns from more code than any of us will ever read. Good enough to make us considerably more productive.
You bring
The context: the task, your code, your standards, your tests. That decides where it goes.
Stateless
The model remembers nothing. On every turn, the whole conversation is sent again.
Turn 1your prompt
Turn 2your promptreplyyour next message
Turn 3your promptreplyyour next messagereplynext
Knowledge cutoff
It knows its training data up to a date. Anything newer has to be put in the context.
A library version released after that date does not exist for the model. Until a file or a documentation page in the context says so.
Hallucination
When the likeliest next token is wrong, it is written with the same confidence as a right one.
A method that should exist and does not. A flag from an older version. The tone never tells you. Running it does.
Reasoning the same mechanism. It writes out its working first. The effort setting is the budget for that working.
Standard model
The textyou sent
The answer≈ 180 tokens
Reasoning model
The textyou sent
Working out, you see a summary of this, not all of itgetUser() is called from three places.Two check for null already. The cart does not.So the check goes inside getUser().≈ 3,200 tokens
Effort settinghow many tokens it may spend on the working-out
lowmediumhighmax
for real work: High to Max
Context
Everything sent to the model on one turn. It decides the result more than the wording of your prompt.
Claude Code puts in
The system prompt: how to behave, which tools exist, how to call them.
You put in
CLAUDE.md, your prompt, the files you point it at.
The work adds
Every file read, every command output, every test result.
Context windowthe most text the model can take in on one turn.
One context window
Opus 5.5: 1,000,000 tokens
In first, every single turn
Added while it works
system promptCLAUDE.mdyour promptfiles it readcommand outputmessages sinceroom left for now
Every model has a fixed size. 1 million tokens is aboutMoby-Dick, twicenot quite the whole Bible
Just because something is in the context does not mean the model reliably retrieves it. Less is always more: keep it focused.
Context poisoning
A wrong assumption stays in the context and steers every turn after it.
A guess in the third message is treated as a fact by the tenth.
A failed attempt stays in the text and gets repeated.
Correcting it in the chat adds text. It does not remove the wrong text. Start a clean session with better input.
Context rot
Quality drops as the context gets long, even when everything in it is correct.
One task per session. Use /clear, or start a new session, when the task changes.
Compaction when the window is nearly full, the conversation is replaced by a summary of itself.
Before
the same window, after an hour of work, nearly full
Claude Code asks the model to summarize everything so far,and that summary replaces the whole conversation.
After
room again
system promptCLAUDE.mdthe summary
Survives
the goal, the main decisions, what it believes the current state is
Gone
the exact file contents, your precise wording, the failed attempts it had already learned from
Tool the model writes a request in a fixed format. Claude Code runs it and adds the result to the context.
Your machine, Claude Code
The model
Sends the whole text, and the list of toolssystem prompt, tool list, CLAUDE.mdyour prompt, every result so far
Replies with a request, not an answerrun: npm testthen it stops generating
Runs it here, on your machine$ npm testgives3 failed, NaNand reads what came back
Or no request at allThe reply is just an answer. That is where it ends.
1
2
3
Only text crosses here
That output is added to the text. The whole text goes again. And again.
Agent
An AI that doesn't just answer. It takes actions (searching, clicking, running code) in a loop until the job is done.
Nobody decides each step for it. You set the task and the limits, and you judge the result.
Harness the program that builds the context, sends it, and runs the tool calls. A model alone is surprisingly useless. A lot of innovation happens around it.
3 Your setup
2 Claude Code
1The model
1The modelOpus 5, Sonnet 5Two settings
Reads text. Writes text. That is all it does.
which modeleffort setting
2The harnesshere: Claude CodeYou configure it
Sends the text, runs what the reply asks for, adds the result, sends it again.
the tool listpermission promptscompactionsessions
3Your setupwhat you put in front of itEntirely yours
Everything you write down, wire up, and allow. This is where almost every fix lives.
CLAUDE.mdthe ticketa test commandMCP serversdeny rules
Model provider and data flows: what leaves your machine, and where it goes.
Your machine
Your repositorysrc/order.tssrc/cart.tspackage.jsonREADME.md
Claude CodeBuilds the context. Runs commands here, on your machine.
Model provider
The modelSees only the text it is sent. Writes a reply. Runs nothing on your machine.
the context, every turn
the reply: text and tool requests
Other servicesJira, Figma, Sentry, web pagesonly when a tool call asks for it
Sent, every turn
Your prompt, CLAUDE.md, every file the agent read, every command output, the conversation so far.
Not sent
Files the agent never opened. The repository as a whole.