← All lessons
MAM5020F — Generative AI for Research

What Claude Code Actually Is

An agent that lives in your project folder, where the model is the smallest part of what works for you
Contents
Key terms
A language model placed in a loop so it can act repeatedly (calling tools, running code, reading results, deciding next steps) until a task is done, rather than answering once.
The software wrapped around a language model to make it an agent: the tools it can call, the files it can see, the loop that runs it repeatedly, the memory across steps, and the permissions that limit it.
An open standard, introduced by Anthropic in 2024, that lets an AI agent connect to external tools and data sources (databases, file storage, reference managers) through one consistent interface rather than custom wiring for each.
This is the Advanced Track — it goes beyond the free tier. Everything in Weeks 1–12 was chosen so that you could do it on free tools, because access is not a detail (Week 10) and most of the world's researchers do not have a paid AI budget (Week 11.4). This track is the one deliberate exception. It uses Claude Code, which needs a paid Claude subscription and comfort with a terminal. It is genuinely optional, it sits after the Week 12 capstone on purpose, and the next page weighs whether it is worth it to you, including what you can and cannot approximate without paying.

What We'll Cover

For most of this course, “using AI” has meant a chat window: you type, the model answers, you copy what is useful back into your own work. Claude Code is a different kind of thing, and the difference is the whole point of this track. It is an agent that works inside your real project folder. It reads your files, runs your code, edits your documents, uses version control, and can work on its own for long stretches.

This first lesson does three things. It says what Claude Code is (and is not), using the model-versus-harness distinction from Week 10. It draws the line between chatting and working with an agent, around a single principle: the chat is not the archive. And it sets up the question the rest of Lesson A answers: what does it actually take to drive one of these well?

Lesson B then turns to the payoff this track exists for: using Claude Code to make your research genuinely reproducible, inspectable and repeatable by someone who is not you.

Sources and thanks

This track’s reproducibility framework owes a large and explicit debt to Dominik Lukeš’s workshop Using AI Agents for Reproducible Research (Oxford e-Research Centre). The organising principle that the chat is not the archive, the model-versus-harness framing, the research-habits instruction file, and the “inspect a messy folder” first task are all adapted, with thanks, from that workshop and its accompanying skills. His materials are openly available: techczech.github.io/agents-for-reproducibility (the workshop guide) and github.com/techczech/dominiks-agent-skills (his agent-skills collection, MIT-licensed). The grill-with-docs glossary practice is from Matt Pocock (AI Hero). What this track adds on top (the pre-registration gates, the worked Berg River example, and the instructor’s own practice in the boxes below) builds on that foundation.

The Model Is the Smallest Part

Week 10.1 argued that the harness is the product. The language model, Claude itself, is one component. What turns it into something useful is everything wrapped around it: the tools it can call, the files it can see, the commands it can run, the permissions it operates under, and the loop that lets it act, observe the result, and act again. In a chat window that harness is thin and invisible. In Claude Code it is thick, and it is the part you are actually driving.

When you ask Claude in a browser tab to help with an analysis, the model is most of what you get. It can reason about what you paste in and write text back. When you ask Claude Code the same thing, the model is the smallest part of what goes to work. The harness gives it your actual data files, a shell to run a script, the ability to read the error message that script produced, version control to record what changed, and standing instructions about how your project works. The intelligence is similar; the leverage is not.

The one-sentence version

This is a different kind of machine from a smarter chatbot: a model with hands, working in your project folder. Almost everything that follows in this track is about driving it well, and about the discipline that makes its work trustworthy afterwards.

What Claude Code Can Actually Do

Claude Code runs in your terminal and operates on a folder you point it at. Within that folder, and only within it unless you say otherwise, it has a set of capabilities worth naming, because each one is a piece of the harness you will learn to use.

Reads and writes your files

It can open, read, and edit the actual documents, data files, and scripts in your project: not a copy you pasted, the real thing. This is powerful, and it is why permission and raw-data rules matter (Lesson B).

Runs commands and code

It can execute shell commands and run your analysis scripts, then read the output or the error and respond to it. The act–observe–act loop is what makes it an agent and not a text generator.

Uses version control

It can initialise Git, commit changes, show you diffs, and read the history. Used well, this turns into a reproducibility trace (Lesson B.3).

Reads standing instructions

A CLAUDE.md file in the project is loaded at the start of every session. It is how you tell the agent the rules of your project once, instead of re-explaining every time. We meet it properly in A.3.

Runs reusable Skills

A Skill is a packaged, reusable workflow (a folder with a SKILL.md) the agent can invoke when it is relevant: a tested research procedure that travels across projects instead of being re-improvised each time (Lesson B.2).

Spawns subagents

For a bounded job it can launch a separate, focused agent, for example an independent check of an analysis it just produced. This connects directly to the adversarial-verification idea from Week 9.

Connects to external tools (MCP)

Through the Model Context Protocol it can reach approved external services and data sources (a reference database, a paper repository): the same MCP idea introduced in Week 10.

Plans before it acts

It has a read-only plan mode: it inspects and proposes a plan without changing anything, so you can approve the approach before a single file moves. It is a safety control we lean on, and we use it in A.3.

None of these capabilities is exotic on its own; researchers have used shells, version control, and scripts for decades. What is new is that one system can use all of them in a loop, on your behalf, from a plain-language request. That is the capability Week 11.1 called “AI as a substantive collaborator,” made operational. And as Week 11.1 also insisted: the more the system can do unsupervised, the more the verification habit matters.

Why This Is Categorically Different From Chat

It is tempting to file Claude Code under “a more capable chatbot.” That framing will mislead you. What separates the two is where the work lives, not how capable each one is.

Chat versus agent: where the work livesTwo columns contrasting a chat, where work evaporates, with Claude Code, where work lands in durable files.Chat windowWork lives in the conversationAnswers you copy out by handGone when you close the tabNo trace of what happenedClaude CodeWork lands in real filesScripts, outputs, a decision logTracked in Git historyThe folder is the record
The categorical difference: a chat's value evaporates in the conversation; Claude Code's work lands in durable files you can re-run, inspect, and cite. The chat is not the archive.

In a chat window

You paste context in. The model answers. The useful output, the reasoning, the decisions you made along the way: all of it lives in a conversation thread. Next week the thread is buried; next month you cannot reconstruct what you actually did, or why. The work is real but the record evaporates.

In Claude Code

The work lives in your files. The script it wrote is in scripts/. The output is in outputs/. The decision it made is in a log you told it to keep. The change is in the Git history. Six months later, you (or a stranger) can open the folder and see what happened.

The chat is not the archive

The organising principle of the whole track, stated plainly: save your sources, notes, instructions, scripts, outputs, and decisions into files, not into a chat thread. The conversation is where the work is commissioned; the project folder is where the work lives. A chatbot session is a conversation you will lose. A project folder is the unit of reproducible research.

Everything Lesson B builds (the folder discipline, the decision log, the reproducible analysis) follows from taking this one sentence seriously.

Where chat is still the right tool

Chat is still the right tool for a great deal: a quick question, a brainstorm, a one-off paragraph, thinking out loud. The distinction is about durability. Reach for chat when the value is in the answer you read right now. Reach for an agent in a project folder when the value is in work that has to survive, be repeated, or be defended later. Most researchers will use both, for different things, and knowing which is which is itself a skill.

Download: the companion guide

The instructor has written a short guide, Claude Code as a Co-Scientist, that gathers this track’s territory into a single document: the model-versus-harness mental model, the human work an agent must never touch, the reproducibility conventions of Lesson B, and a reference for the research Skills that build on them. It is the companion to these two lessons and goes further than we can here. Many of its ideas, the reproducibility framework above all, come from Dominik Lukeš’s work, credited at the top of this lesson; the guide builds openly on that foundation and is shared in the same spirit. co-scientist-guide.pdf. The seven research Skills it documents are available as a separate download in Lesson B.2.

Coming up in A.2: cost, access, and whether it is worth it. Before you invest time learning to drive this, you deserve a straight account of what it costs, who it excludes, what you can approximate for free, and the genuine shift in how you work that it demands: the move from chatting to managing an agent.

Karpathy's LLM wiki

Andrej Karpathy's "LLM wiki" applies this lesson's argument to your reading notes. Three layers: immutable raw sources (the papers and articles you collect), a wiki of markdown pages the agent writes and maintains (summaries, concepts, people, cross-references), and a schema file — the CLAUDE.md idea again — defining how the wiki is organised. The agent ingests new sources, answers questions from the wiki rather than the open internet, and periodically checks it for contradictions and stale claims. Karpathy's core observation is that people abandon personal knowledge bases because the maintenance burden grows faster than the value, and bookkeeping is exactly what an agent is good at. Participants in this course are already experimenting with it.

Drafted with Claude (Anthropic) and reviewed by Jonathan Shock before publication. AI-generated errors are possible — if you spot one, please email jonathan.shock@uct.ac.za. Full detail: AI Content Disclaimer.

© 2026 Jonathan Shock · MAM5020F: Generative AI for Research · CC BY 4.0

Advanced Track — Agentic Research with Claude Code
9 min read
Key terms
A language model placed in a loop so it can act repeatedly (calling tools, running code, reading results, deciding next steps) until a task is done, rather than answering once.
The software wrapped around a language model to make it an agent: the tools it can call, the files it can see, the loop that runs it repeatedly, the memory across steps, and the permissions that limit it.
An open standard, introduced by Anthropic in 2024, that lets an AI agent connect to external tools and data sources (databases, file storage, reference managers) through one consistent interface rather than custom wiring for each.