AI Agents and Human Control

Week 4: Technical Foundations 3

Tianshi Li

2026-10-05

A quick recap of what we’ve learned

Model
Harness
Tool use
Context management
Memory
Skill
Plan and task decomposition

How is the generic framework applied to different domains?

Case studies: coding agents, computer use agents, and knowledge work agents.

Coding agents

Train models that can code

def incr_list(l: list):
    """Return list with elements incremented by 1.
    >>> incr_list([1, 2, 3])
    [2, 3, 4]
    >>> incr_list([5, 3, 5, 2, 3, 3, 9, 0, 123])
    [6, 4, 6, 3, 4, 4, 10, 1, 124]
    """
    return [i + 1 for i in l]

A HumanEval problem: the model writes the last line from the signature and docstring, and hidden unit tests check it.

Chen, M. et al. Evaluating Large Language Models Trained on Code. 2021, figure 2, first example

Model Year HumanEval pass@1
GPT-3 2020 0%
Codex 12B 2021 28.8%
GPT-4 2023 67.0%
Code Llama Instruct 70B 2024 67.8%
DeepSeek-Coder Instruct 33B 2024 79.3%
Qwen2.5-Coder Instruct 32B 2024 92.7%

Codex, GPT-4, Code Llama, DeepSeek-Coder, and Qwen2.5-Coder technical reports

What makes a model good at code

1. File-level pre-training

Public GitHub code, filtered by rules, deduplicated, and decontaminated against benchmarks, mixed with text and math (70, 20, and 10% for Qwen2.5-Coder). Each file is a training sample: 5.2T tokens at 8K context.

Fill in the middle teaches completion between a prefix and a suffix: <|fim_prefix|> <|fim_suffix|> <|fim_middle|>

2. Repository-level, long-context continued pre-training

Files from one repository are ordered by their imports and trained as one long sequence, so the model learns how code across files fits together.

About 300B tokens at 32K context, extended to 128K with YaRN, with fill in the middle across files.

3. Post-training

Fine-tune on instructions and solutions that pass unit tests when executed.

Preference training uses a code sandbox for feedback.

Qwen2.5-Coder Technical Report, 2024, figure 2; Bavarian et al., 2022; DeepSeek-Coder, 2024; Code Llama, 2023

From single-step to agentic coding

Single-step

One prompt, one completion. The model writes a function from its signature and docstring, and unit tests check the result.

Example benchmark: HumanEval, 2021.

Agentic

Many steps inside a real repository. The agent reads files, runs commands, edits code, and runs tests until the issue is fixed.

Example benchmark: SWE-bench, 2023.

A typical workflow: localization, repair, patch

1 Localization repository top N files classes and functions edit locations narrow down from the issue text 2 Repair generate several candidate patches patch 1 patch 2 patch 3 patch 4 each one a small search and replace edit 3 Patch validation run the tests on every patch regression reproduction patch 1 pass fail patch 2 pass pass patch 3 fail fail patch 4 pass pass rank the patches that pass and submit one

Agentless runs these three phases in a fixed order. An agent decides its next action itself, but a fix still needs the same three steps: find where to change, change it, and check the change.

Xia, C. S. et al. Agentless: Demystifying LLM-based Software Engineering Agents. FSE 2025

Agentless, step by step

Ten steps, three phases. With GPT-4o, Agentless solved 32% of SWE-bench Lite at $0.70 per issue, the best open-source result when the paper was submitted.

Xia, C. S. et al. Agentless, FSE 2025, figure 1

Coding toolsets: a single tool. What is it?

The shell. With bash, an agent can list, search, read, edit, and run anything in the repository.

mini-swe-agent: “Does not have any tools other than bash.”

About 100 lines of Python for the agent class. It “scores >74% on the SWE-bench verified benchmark.”

github.com/SWE-agent/mini-swe-agent, README, September 2026

The shell might not be the best interface for file editing

sed -i -E '/^def load_config\(/,/^def /s/(timeout|retries)=([0-9]+)/\1=int(os.getenv("\1", "\2"))/g' src/config.py

In src/config.py, from the line that starts def load_config( down to the next line that starts with def, this command changes every timeout= or retries= number so that the value is read from an environment variable, with the old number as the default. It edits the file in place and prints nothing.

The range includes its last line. If the next function is def connect(host, timeout=10):, that line is changed too, and nothing in the output says so.

def connect(host, timeout=int(os.getenv("timeout", "10"))):

So agents have a dedicated tool for file editing

Agent Shell File editing Other built-in tools
Claude Code Bash Edit: exact string replacement in one file. Write: create or overwrite a file. Read, Glob, Grep, web fetch and search, subagents
Codex CLI exec_command apply_patch: one patch can add, update, and delete several files update_plan, view_image, web search
pi bash edit: several exact replacements in one file. write. read; grep, find, ls are off by default

On macOS and Linux, Claude Code and pi leave search to the shell by default. Editing stays a dedicated tool.

Claude Code tools reference, code.claude.com; openai/codex source, release rust-v0.160.0; pi coding agent 0.86.1 source, October 2026

Evaluation: the most widely used coding benchmarks

Benchmark Made by How tasks are made Size Metric Status in October 2026
HumanEval, 2021 OpenAI hand-written functions with unit tests 164 pass@k saturated, above 96%
MBPP, 2021 Google crowd-sourced short Python functions 974 pass@k saturated
SWE-bench, 2023 Princeton merged pull requests that fix a GitHub issue and add tests, from 12 Python repositories 2,294 % resolved superseded by its subsets
SWE-bench Verified, 2024 OpenAI and the SWE-bench authors 500 tasks screened by 93 developers 500 % resolved no longer reported by OpenAI, Anthropic, or Google
SWE-bench Pro, 2025 Scale AI 41 maintained repositories, some held out or commercial 1,865 % resolved about 30% of public tasks found broken
LiveCodeBench, 2024 Berkeley and others contest problems released after each model’s training cutoff about 1,000 pass@1 leaderboard stopped in 2025
Terminal-Bench 4.0, 2026 Stanford and Laude Institute hand-written terminal tasks, each in its own container 66 % of tasks passed headline number in 2026 launches
DeepSWE 1.1, 2026 Datacurve tasks written from scratch, checked by hand-written verifiers 113 pass@1 headline number in 2026 launches

Benchmark papers and leaderboards; model launch posts for Claude Opus 5.5, GPT-6 Astra, and Gemini 4 Argon, September 2026

How SWE-bench is built

A task is a real GitHub issue and the repository just before it was fixed. The agent’s patch must make the tests added by the real fix pass, and keep the existing tests passing.

Jimenez, C. E. et al. SWE-bench: Can Language Models Resolve Real-World GitHub Issues? ICLR 2024, figure 1

Known problems with SWE-bench

Impossible tasks

61% of the original tasks had tests that could reject a valid fix, and 38% had an underspecified issue. 68% were filtered out to make Verified.

In an audit of Verified tasks that a frontier model still failed, at least 59% had flawed tests or problem descriptions.

OpenAI, August 2024 and February 2026

Contamination

From the issue text alone, models named the buggy file up to 76% of the time, but only up to 53% on repositories outside SWE-bench.

All frontier models tested could reproduce the original fix or the issue text verbatim for some tasks.

Liang et al., The SWE-Bench Illusion, 2025; OpenAI, February 2026

Cheating

Agents ran git log --all and read the future commit that fixed the issue.

The fix leaked into the issue itself in 33% of passing patches, and weak tests let 31% pass.

SWE-bench issue 465, 2025; Aleithan et al., SWE-Bench+, 2024

In February 2026, OpenAI stopped reporting SWE-bench Verified. In July 2026 it estimated that about 30% of the public SWE-bench Pro tasks are broken too.

RL training for coding agents

Tasks

12.6 k training tasks from real repositories

Environment

35 k executable repository images; tools bash, edit, create, submit; up to 128 turns

Reward

1 if all hidden tests pass; otherwise a reward from similarity to the real patch

Result

53.9% on SWE-bench Verified, 65.8% with test-time scaling

Meta FAIR. CWM: An Open-Weights LLM for Research on Code Generation with World Models. arXiv 2510.02387, 2025, figure 7

Why is coding a special case for RL?

  • Correctness can be checked by running tests, so the reward is cheap and reliable.
  • Open-source repositories and their pull requests give hundreds of thousands of tasks.
  • Each task can be packed into a container and replayed many times.
  • Coding is the most common use of Claude, so the gains are valuable.

“Code correctness can be directly verified by running it against unit tests, which provides a reliable and scalable learning signal.”

Qwen Team, Qwen3-Coder-Next Technical Report, February 2026

“The ease of training AI to solve a task is proportional to how verifiable the task is.”

Jason Wei, Asymmetry of verification and verifier’s law, July 2025

After agents: what changed, task by task

Engineers and researchers at Anthropic reported spending slightly less time on almost every kind of task and producing more output. No study yet measures time per lifecycle activity after agents with logs or observation.

Anthropic. How AI Is Transforming Work at Anthropic. December 2025

Writing code is not shipping code

After developers adopt coding agents, lines of code grow many times over, but the gain shrinks at every later stage, down to about 30% more releases.

Demirer, M., Musolff, L., and Yang, Y. Writing Code vs. Shipping Code. NBER working paper 35275, 2026, figure 1

How much faster? Measured productivity

Study Design Who Result
GitHub Copilot, 2023 lab experiment, one task 95 freelancers 55.8% faster
Cui et al., 2026 field experiments, autocomplete 4,867 developers at three companies 26% more completed tasks
METR, 2025 randomized trial, own repositories 16 experienced open-source developers 19% slower, while they believed they were 20% faster
METR, 2026 randomized trial, follow-up 57 developers point estimates 4% to 18% faster; intervals include slowdown
Demirer et al., 2026 event study, GitHub activity 500,000 developers commits up 240%, releases up 30%
Anthropic, 2025 survey of its own staff 132 engineers and researchers 50% more productive, self-reported

How much real-world software do coding agents write?

Public GitHub commits per day with a Claude Code co-author line, January to October 2026

github.com/AlbGri/claude-github-monitor, data to 2 October 2026

About 1.2 million public commits a day carry a Claude Code co-author line, eight times the count in early February 2026.

One in three pull requests on GitHub “now involves an agent” (Microsoft, July 2026).

75% of new code at Google is AI-generated and approved by engineers (April 2026).

More than 80% of the code merged at Anthropic was written by Claude (May 2026).

Who uses which coding agent?

Share of developers who use each tool at work, four JetBrains surveys from 2025 to 2026

JetBrains Research, AI coding agent adoption, August 2026

Tool Reported size
GitHub Copilot 20 million all-time users (July 2025), 50 million users (July 2026)
Claude Code run-rate revenue over $2.5 billion (February 2026)
Codex more than 5 million weekly active users (June 2026)
Cursor annual revenue over $1 billion (November 2025)

In mid-2025, about 31% of developers used AI agents. In mid-2026, 90% used them at work every week and 68% every day.

Company announcements; Stack Overflow Developer Survey 2025; JetBrains Developer Ecosystem 2026

UI is changing

Code completionGitHub Copilot suggests the next lines in grey. June 2021.
Coding agents in the IDEThe agent edits several files and asks before running a command. February 2025.
Users don't see the code"Vibe coding": "forget that the code even exists". February 2025.
Mobile remote controlA session running on a laptop, steered from a phone. February 2026.

GitHub Copilot technical preview docs, 2021; VS Code blog, February 2025; Andrej Karpathy on X, 2 February 2025; Anthropic, Claude Code Remote Control launch video, February 2026

Computer use agents

How many people use coding agents? How many use computer use agents?

Share of agent tool calls on Anthropic’s API by domain. Software engineering is about half.

Anthropic, Measuring AI agent autonomy in practice, February 2026

Coding agents report users in the millions: GitHub Copilot 50 million users, Codex more than 5 million weekly users.

Computer use agents have no separate user numbers. The standalone products were folded into other products in 2025 and 2026:

  • Operator into ChatGPT agent, then ChatGPT Work
  • The Atlas browser into ChatGPT and Codex
  • Project Mariner into Gemini Agent and Chrome

OpenAI reports 10 million users for Codex and ChatGPT Work combined.

Why is it more difficult?

Coding Computer use Robotics
Hard for a person? yes, it takes years of training no, most people can use a computer no, a child can tidy a room
Hard for an agent? less and less harder hardest
Agents when the benchmark launched SWE-bench, 2023: 2% OSWorld, 2024: 12%, humans 72% BEHAVIOR Challenge, 2025: winner's partial-credit score 26%

“It is comparatively easy to make computers exhibit adult-level performance in solving problems on intelligence tests or playing checkers, and difficult or impossible to give them the skills of a one-year-old when it comes to perception and mobility.”

Moravec’s paradox. Hans Moravec, Mind Children, 1988

Hard for agents: information is organized hierarchically

Settings Wi-Fi Bluetooth Privacy and securi… Battery Display Privacy and security Location services Tracking Camera Microphone Photos Location services Calendar Camera Maps Weather Wallet Maps Never Ask next time While using the app Always

On a screen, the agent sees one level of a menu at a time. To find a setting it has to open a menu, look again, and choose the next one.

$ grep -rn timeout src/
src/client.py:12: TIMEOUT = 30
src/client.py:88: get(url, timeout=t)
src/retry.py:7: def backoff(n, timeout):

In a code repository, one command returns every match as text.

Hard for agents: actions are asynchronous

New message Attach click Attach, choose report.pdf New message report.pdf Send screenshot: still uploading New message report.pdf Send screenshot: ready, click Send New message report.pdf Send Sending… screenshot: sending, wait New message report.pdf Send Message sent screenshot: sent time

There is no clear point where an action finishes and a response reports its status. The agent has to rely on continuous observation of the screen.

Hard for agents: a GUI displays a status change, an API returns an error code

New message report.pdf This file is larger than 25 MB. Send

The failure is a line of red text that the agent has to notice in a screenshot.

POST /upload/attachments

HTTP/1.1 413 Content Too Large
{"error": "file_too_large",
 "limit_mb": 25}

The failure is a status code that the harness can check.

Why do we need computer use agents?

APIs would be nice, but the internet and computer infrastructure were designed for human control. Many tasks that people do by hand have no API.

  • Healthcare billing. “Many workflows do not have APIs or must be executed in native desktop/virtualized applications that can only be observed visually.”
  • Prior authorization. In the 2025 CAQH Index, 126 million US medical prior authorizations were partly electronic, mostly through web portals, and 44 million were fully manual.
  • Legacy enterprise software. Old systems such as SAP GUI screens offer no API, so automation tools fall back on reading the screen.
  • Government services. OpenAI worked with the City of Stockton to make it easier to enroll in city services and programs.

“LLM developers have made tools fit the model … Now, we can make the model fit the tools.”

Anthropic, Developing a computer use model, October 2024

State of the art: GPT-6 Astra

Astra finishes a snack list in Word, then shops for the items on a grocery website.

OpenAI, GPT-6 Astra launch post, September 2026

Model: how is the model different for computer use agents?

Without a VLM: read the page as text

A text-only agent reads the accessibility tree: each element’s role, name, and a reference it can click. It works when the page labels its elements. Canvas apps, images, and unlabelled buttons need vision.

With a VLM: an image becomes tokens

Send patch: 14 × 14 pixels 2 × 2 patches become one token 8 × 5 = 40 tokens Click Send start … end then text tokens and image tokens share one sequence for the language model

A vision encoder cuts the image into patches of 14 by 14 pixels. Neighbouring 2 by 2 patches are merged and projected into the language model’s embedding space, so each token covers 28 by 28 pixels.

One 1280 by 720 screenshot Tokens
Qwen2.5-VL 1,196
Qwen3-VL (32 by 32 pixels per token) 880
Claude 1,196
OpenAI, patch-based models about 1,100

Qwen2-VL and Qwen2.5-VL technical reports; Anthropic and OpenAI vision documentation, October 2026

Positions for image tokens

Click (0, 0, 0) the (1, 1, 1) Send (2, 2, 2) (3, 3, 3) (3, 3, 4) (3, 3, 5) (3, 4, 3) (3, 4, 4) (3, 4, 5) image tokens: time stays the same, row and column count the position button (6, 6, 6) text resumes after the largest number text tokens: the same number three times

Each token gets three position numbers: time, row, and column. The rotary embedding from week 3 is split into three parts, one per number.

“For text inputs, these components utilize identical position IDs, making M-RoPE functionally equivalent to 1D-RoPE.”

Wang, P. et al. Qwen2-VL, 2024, multimodal rotary position embedding (M-RoPE)

From VLM to computer use agent

The model reads the task and the latest screenshot, writes a thought, and outputs an action with coordinates, such as a double click at (59, 695). The harness executes it and returns a new screenshot.

Qin, Y. et al. UI-TARS: Pioneering Automated GUI Interaction with Native Agents. arXiv 2501.12326, 2025

Models that support computer use

Model VLM How it points Harness or API
Claude Opus and Sonnet 5.5 yes pixels of the screenshot Claude API computer use toolset
OpenAI GPT-6.1 Sol; GPT-6 Astra yes pixels, or code that drives the screen Responses API computer tool; code execution
Gemini 3.x Flash yes a 0 to 999 grid Gemini API computer use tool
UI-TARS-2 (ByteDance) yes pixels of the resized image UI-TARS desktop
Qwen3-VL yes a 0 to 1000 grid Qwen cookbooks, Qwen-Agent
any language model no element references Playwright MCP, Browser Use

Vendor documentation and model repositories, checked 3 October 2026

Harness: what the model returns

Anthropic

{"type": "tool_use",
 "name": "left_click",
 "toolset_name": "computer",
 "input": {"coordinate": [500, 300]}}

OpenAI

{"type": "computer_call",
 "actions": [
  {"type": "click", "button": "left",
   "x": 405, "y": 157},
  {"type": "type", "text": "penguin"}]}

Google

{"function_call": {
  "name": "click_at",
  "args": {"x": 60, "y": 100,
   "safety_decision": {
    "explanation": "I have encountered
      a CAPTCHA challenge ...",
    "decision": "require_confirmation"}}}}

The harness executes each action and sends back a new screenshot as the result.

Anthropic computer use tool docs; OpenAI computer use guide; Google Cloud Vertex AI computer use docs for Gemini 2.5 (Gemini 3.x names the action click); October 2026

What else the harness has to do

Provide a screen. A virtual display in a container or VM, such as Xvfb with a VNC view.

Wait. Pause before each screenshot so the page can settle; Anthropic’s demo waits 2 seconds.

Keep only recent screenshots. Each costs 1,000 to 1,800 tokens, so harnesses keep the last few.

Scale coordinates. If the screenshot was shrunk, scale the model’s click back to the real screen.

Ask a person. Confirm purchases and messages, and hand over passwords.

The model clicked (284, 748) on a 1403 by 840 image; the harness clicked (300, 789) on the 1480 by 886 screen.

anthropic-quickstarts, computer use demo

Benchmarks: each one addresses a problem of the one before

Benchmark Environment How success is judged What it addresses
MiniWoB++, 2018 about 100 synthetic web widgets a scripted reward per widget a first testbed; now solved
Mind2Web, 2023 offline snapshots of 137 real websites each step must match one human trajectory real websites, not toy widgets
WebArena, 2024 self-hosted copies of shopping, forum, GitLab, CMS, and map sites a program checks the final state snapshots cannot be explored, and other valid paths were marked wrong
VisualWebArena, 2024 WebArena sites plus a classifieds site programs, plus a vision model for image checks WebArena tasks can be solved from text alone
WebVoyager, 2024 15 live real websites a GPT-4V judge reads screenshots and the answer self-hosted sites are few and unlike the real web
Online-Mind2Web, 2025 136 live websites careful human evaluation, and a judge with a rubric the judge believed hallucinated answers
OSWorld, 2024 full virtual machines, mainly Ubuntu a program checks the final state of the machine the browser is only one application

WebArena: real websites, hosted for the benchmark

812 tasks on self-hosted sites. Success is functional: a program checks the final state, for example that the forum bio now reads exactly “Pro Python Developer with 20 years of Experience”. GPT-4 solved 14.41%; humans solved 78.24%.

Zhou, S. et al. WebArena: A Realistic Web Environment for Building Autonomous Agents. ICLR 2024, figure 1

VisualWebArena: tasks that need vision

910 tasks whose solution depends on what is in the images. Text-only GPT-4 solved 7.25%, GPT-4V with labelled screenshots solved 16.4%, and humans solved 88.7%.

Koh, J. Y. et al. VisualWebArena: Evaluating Multimodal Agents on Realistic Visual Web Tasks. ACL 2024, figure 1

WebVoyager: live websites and a VLM judge

643 tasks on 15 live websites, such as Amazon, Booking, Google Flights, and GitHub. A program cannot check a live site, so GPT-4V judges each run from the task, the agent’s final answer, and screenshots of the run.

The judge’s rubric is a list of rules in its prompt, ending in a single verdict: SUCCESS or NOT SUCCESS. It agreed with human judges on 85.3% of 300 tasks. Note the boxed rule: when the screenshots do not show something, the judge believes the agent’s answer.

He, H. et al. WebVoyager: Building an End-to-End Web Agent with Large Multimodal Models. ACL 2024, figure 8

Human evaluation tells a different story

The same agents, scored by careful human evaluation on 300 tasks across 136 live websites. Browser Use fell from 89% to 30%. The WebVoyager scores were inflated by tasks with shortcuts and by a judge that believed hallucinated answers.

Xue, T. et al. An Illusion of Progress? Assessing the Current State of Web Agents. COLM 2025, figure 1

Knowledge work agents

Knowledge work agents: Claude Cowork and ChatGPT Work

Claude Cowork, launched January 2026 and folded into Claude in September 2026: the agent works in a folder you choose, with a progress list and the skills and connectors it is using.

Anthropic, Cowork launch video, January 2026

ChatGPT Work, July 2026: the agent read a data room and a Slack channel, then added a slide to an existing deck.

OpenAI, ChatGPT Work launch post, 9 July 2026

How they are built: model and harness

Model

The same frontier models that run the coding agents.

How they are trained for office work is not public. OpenAI’s GDPval post says it trained an internal GPT-5 on GDPval-style tasks, and that this improved its scores.

Harness

A coding agent’s harness: the agent loop, file tools, code execution, skills, and memory.

It writes documents, spreadsheets, and slides by running code, guided by skills.

It reaches other apps in order of precision: connectors first, then a browser, then the screen.

Plugins bundle skills, connectors, commands, and subagents for one kind of job.

Coding, computer use, and knowledge work agents

Coding agent Computer use agent Knowledge work agent
Environment a code repository, in a terminal or sandbox a screen or browser, seen through screenshots a VM or cloud machine with a chosen folder and connected apps
Main tools shell, file editing, git, tests click, type, scroll connectors, code that writes documents, skills; browser and screen as fallbacks
Output code changes or a pull request a changed app or website documents, spreadsheets, decks, reports
How success is checked tests and builds, then code review the final state of the app or site no test suite; a person reviews it
Main risk destructive commands, leaked secrets wrong clicks with real effects, injected instructions on web pages injected instructions in email and documents, data leaking through connectors

Evaluation

Evaluation is important to optimization

“In this new era, evaluation becomes more important than training.”

Shunyu Yao, The Second Half, April 2025

“If a task/job is verifiable, then it is optimizable directly or via reinforcement learning.”

Andrej Karpathy on X, November 2025

A task that can be checked automatically can also serve as a training reward, as tests do for coding agents.

Rubrics: grading answers that have no test

Physicians wrote criteria with points for each conversation, including negative points for mistakes. A model grader checks each criterion, and the score is the points earned out of the maximum, here 11 of 22.

Arora, R. K. et al. HealthBench: Evaluating Large Language Models Towards Improved Human Health. OpenAI, May 2025, figure 1

RL environments

An environment packages a task, the tools and software the agent may use, a starting state, and a grader that turns the final state into a reward. The same package serves as a benchmark and as training data.

Agents’ Last Exam, arXiv 2606.05405, 2026, figure 6

Example: Agents’ Last Exam

More than 1,000 tasks built from past projects of more than 250 industry experts, across 55 fields, graded by hidden reference files and deterministic checks. In October 2026, the best agent fully passed 38% of the public tasks and 16% of the hardest tier.

Sun, Y. et al. Agents’ Last Exam. UC Berkeley RDI, arXiv 2606.05405, 2026; leaderboard at agents-last-exam.org

What are we evaluating, and what not? How about the human?

Outcomes that don’t get evaluated

Human understanding

One of TMLR’s editors-in-chief contacted the authors of ten papers headed for desk rejection and met seven.

“Two of the authors appeared to have almost no substantive understanding of the contents of their own papers.”

Nihar B. Shah, Asking Authors About Their Own Papers, TMLR blog, 16 September 2026

Developers who learned a new library with AI scored lower on a quiz afterwards. Those who asked the AI for explanations scored highest.

Anthropic, How AI assistance impacts the formation of coding skills, January 2026

Outcomes that don’t get evaluated

Real-world complex dynamics

The length of tasks agents can finish has doubled about every seven months.

METR, Measuring AI Ability to Complete Long Tasks, updated May 2026

Claude ran a small shop in Anthropic’s office for about a month; it sold at a loss and sent customers to a payment account that did not exist.

Anthropic, Project Vend, June 2025

Benchmarks now measure tasks that take hours, but real-world projects, which people still lead today, span weeks, months, or even years, and no benchmark can evaluate that timescale.

How could they be evaluated?

Outcome How to measure it Example
Does the person still understand the work? a quiz or interview after the agent finishes Anthropic’s skills study; TMLR author interviews
Does the agent work with a person, not just alone? a simulated user in the loop τ-bench
Is the deliverable good enough for real work? blinded comparison by experts GDPval
Does it hold up over months? a field deployment with real stakes Project Vend; CRUX open-world evaluations
How much oversight does it get in practice? log approvals, interruptions, and clarifying questions Anthropic, Measuring AI agent autonomy in practice, 2026

How to build or extend agents

Open-source agents

Agent License Models How you extend it
pi MIT any provider TypeScript extensions: tools, commands, events, providers, terminal UI
Codex CLI Apache 2.0 OpenAI by default, other providers configurable AGENTS.md, MCP, hooks, skills, plugins, SDK, app-server
Gemini CLI Apache 2.0 Google models extensions, MCP, hooks, commands, skills
OpenHands MIT any model through LiteLLM Python SDK, custom tools, MCP, agent server
OpenCode MIT any provider plugins, MCP, custom tools, SDK, server
Cline Apache 2.0 many providers MCP, rules, skills, plugins, SDK
Goose Apache 2.0 15 or more providers MCP extensions, recipes
Qwen Code Apache 2.0 OpenAI, Anthropic, Gemini, Qwen, local MCP, hooks, skills, SDKs
mini-swe-agent MIT any model about 100 lines of Python you edit directly
Claude Code not open source Claude native; other models via proxy Claude Agent SDK, hooks, MCP, skills, plugins

Licenses and features from each project’s GitHub repository and documentation, checked 3 October 2026

How do you build a UI for Claude Code? Can you?

Your interface web page, phone app, editor panel Agent SDK a library claude -p JSON over stdin, stdout ACP editor protocol Claude Code harness agent loop, tools, permission rules, compaction, memory the same code that runs in the terminal Claude model files and shell permission requests
import { query } from "@anthropic-ai/claude-agent-sdk";
for await (const message of query({
  prompt: "Review utils.py for bugs ...",
  options: { allowedTools: ["Read", "Edit", "Glob"] }
})) {
  if (message.type === "assistant") {
    // render text and tool calls in your UI
  }
}

Tool permissions and clarifying questions call your canUseTool function, which pauses the agent until your interface answers allow or deny.

Claude Agent SDK quickstart and user input docs, code.claude.com; Agent Client Protocol, agentclientprotocol.com

What can you change in the harness?

Component pi Codex CLI Claude Code
System prompt replace or append replace or append replace or append
Tool set add, remove, or override any tool add through MCP restrict built-ins; add through MCP or the SDK
Permission policy none built in; write one in an extension sandbox and approval policies, hooks allow, ask, and deny rules, modes, hooks, canUseTool
Compaction custom summary, or cancel it custom prompt and threshold threshold, focus instructions, and hooks; the summarizer is closed
Memory context files; more through extensions AGENTS.md and memories CLAUDE.md and auto memory
Plan mode not built in; an example extension built in built in
Model provider any any configured provider Claude only
UI terminal UI components, RPC, SDK app-server, SDK, or fork the source SDK, stream-json, mods, ACP; the terminal UI is closed

pi docs/extensions.md; Codex docs, learn.chatgpt.com; Claude Code docs, code.claude.com; checked 3 October 2026

Embedding agents into different workflows

Cursor documentation, Slack integration, cursor.com/docs

Slack. Mention the agent in a thread and it starts a cloud session: Cursor, Codex, and Claude.

GitHub. Assign an issue to Copilot’s cloud agent, or mention @claude in a pull request comment, and the agent pushes commits.

Editors and phones. The same harness runs behind an editor panel or a mobile app.

Sandboxing

Why sandbox?

Purposes

  • Safety: a mistaken command cannot damage the host.
  • Security: injected instructions cannot steal secrets or reach the network.
  • Reproducibility: every run starts from the same state.

Serving agents. Vendors run agents in contained environments: code from claude.ai runs in a gVisor container, Cowork in a virtual machine, Codex cloud tasks in a container.

Evaluation. Benchmarks need runs that are safe, controlled, and reproducible: a container per SWE-bench task, a VM snapshot per OSWorld task.

Training. RL runs thousands of agent rollouts at once, each in its own container or VM, and the sandbox also has to stop the agent from cheating, for example by fetching the real fix from GitHub.

“Our telemetry showed users approved roughly 93% of permission prompts.”

Anthropic Engineering, How we contain Claude across products, May 2026

Asking the user is not a boundary. A sandbox limits what the agent can reach, whatever the user clicks.

Different ways to sandbox

Level What it isolates What it guarantees What it does not Start-up Used by
Permission prompts nothing; a person approves a person sees each action users approve about 93% of prompts none Claude Code and Codex defaults
OS process sandbox: Seatbelt, bubblewrap, seccomp files and network for a command and its children no writes outside the project, no direct network shares the host kernel; tools outside the wrapper milliseconds Claude Code sandbox, Codex workspace-write
Container: Docker process tree, file system, network, resources the whole agent is contained; a pinned image gives the same environment shares the host kernel; a writable mount can be damaged about 1 second SWE-bench, Terminal-Bench
User-space kernel: gVisor system calls, handled by a separate kernel a much smaller host attack surface some programs are incompatible; slower system calls under 1 second claude.ai code execution, Modal
MicroVM: Firecracker a separate guest kernel a hardware virtualization boundary needs a hypervisor about 125 ms E2B, AWS Lambda
Full VM a whole operating system the strongest separation; snapshots give an exact reset slower to boot; hard for host tools to monitor seconds to minutes Cowork, OSWorld
Network egress proxy outbound traffic no traffic to hosts off the allowlist leaks through an allowed domain none srt, Codex network proxy
Credential isolation secrets the agent cannot leak what it never holds misuse of scoped tokens while valid none Claude Code on the web git proxy

Observability and provenance: how do you log traces?

Session files on disk, one JSON object per line:

  • Claude Code: ~/.claude/projects/
  • Codex: ~/.codex/sessions/
  • pi: ~/.pi/agent/sessions/
{"type":"message","id":"c3d4e5f6",
 "parentId":"b2c3d4e5",
 "timestamp":"2024-12-03T14:00:03.000Z",
 "message":{"role":"toolResult",
  "toolName":"bash", ...}}

OpenTelemetry export to a collector, with a span for each model call and tool call, and an event for each approval decision.

What a trace should capture

  1. The run: harness and model versions, sandbox and network settings, the starting commit.
  2. Every model input and output, with token counts.
  3. Every tool call and its result.
  4. Every approval: who decided, and why.
  5. Harness events: compaction, retries, blocked actions.

Provenance. A co-author line in each commit, a session ID that links it to its trace, and signed commits.

What we have learned from week 2 to week 4

Model (weeks 2 and 3)

  • A transformer predicts one token at a time; attention looks back over the whole context.
  • Instruction tuning, RLHF, and trained reasoning turn a language model into an assistant.
  • Long context is limited by capability and by cost; architectures, positional encodings, and training extend it.
  • Models are trained on their harness’s formats, so the two evolve together.

Harness (weeks 2 and 3)

  • The agent loop: the model asks, the harness acts and appends the result.
  • Tool calling, context compaction, memory, skills, and plans all decide what the model sees.

Agent types (week 4)

  • Coding agents: a shell plus dedicated edit tools, trained with RL against tests, and measured by benchmarks with known flaws.
  • Computer use agents: screenshots and clicks, a VLM that turns images into tokens, and benchmarks judged by programs, models, or people.
  • Knowledge work agents: a coding agent’s harness, with connectors and skills for documents.

Around the agent (week 4)

  • Evaluation decides what gets optimized, and leaves out human understanding and long-term alignment.
  • Open harnesses, SDKs, and protocols let you extend agents and build interfaces.
  • Sandboxes, logs, and provenance make agents safe to run and possible to audit.

Break

Back in 10 minutes.

Research spotlight

Research spotlight: three talks today

Theme Presenter
Control protocols against an untrusted agent Manasha Sekar
User and context modelling in the harness Vineel Vennelakanti
Judging contextual information flows in the harness Ananyaa Mylsamy

Each talk has 15 minutes plus 5 minutes for questions.

Studio

From agents in general to your project

This week you will work with the teammates of your course project

Pick one concrete application where people need to manage, oversee, and steer what the agent does. Try it with real agents, find where things go wrong, and save the evidence.

Find your teammates and sit together

U1Dylan AnctilAyan ChandraLee Tamir
U2Abhishiek KarthikHudson KassAditya Vij
U3Sean MayAahil NishadBenjamin Tso
G1Min GeVedashree Jitendra BaneNithin Bhat
G2Zihan XueJinbo HuSanjana Nilesh Brahmbhatt
G3Steffi RoyNirmal KadirkamanathanAnanyaa Mylsamy
G4Aryan Premshankar YadavManasha SekarAlexander Malakov
G5Naveen Shankar Nagaraja SudhakarPrashanth PrabhakarShaunak Bhavinkumar Soni
G6Wendi ShiVishwani SinghBhanu Harsha Yanamadala
G7Subrahmanya Vineel Venkata Annamayya VennelakantiJingcheng Wang

Undergraduate teams U1 to U3, graduate teams G1 to G7.

Pick a task

10 minutes

Think of a task you have done by hand that you would like an agent to help automate. You do not want it to automate everything, take you out of the loop and turn you into a meat proxy. How would you like it to work instead? Maybe you have already tried an agent on this task and found it does not work well. Maybe you have never tried.

Come up with task ideas together and rank them. A good task meets most of these:

  • Someone on the team has done it by hand and knows what a good result looks like.
  • It is complex in the real world: it takes several days or several sittings, or it involves other people.
  • You would want to check, steer, or correct the agent along the way.
  • You can start trying it today with tools you already have.

Example tasks

Making slides for a lecture or a presentation. Does the agent keep to your outline? Can you fix one slide without it breaking another?

Playing board games or social games with an agent, such as chess, Codenames, Werewolf, or Diplomacy. Can you teach it your house rules or a strategy? Can you steer it in the middle of a game?

Learning a new concept. Does the agent teach you, or does it just do the work for you? Does it keep track of what you already understand?

High-consequence personal tasks, such as filling out a benefits or visa application, or helping a relative deal with paperwork.

Tasks with several people, such as planning a group trip or running the scheduling and email for a student club.

Explore

25 minutes

Each team takes one of two paths.

  1. Reproduce. You already have a concrete scene in mind where an agent let you down. Recreate it. Write down what you asked, what you expected, and what happened.
  2. Explore. Use current agents, harnesses, models, and interfaces to start doing the task. Keep going until the agent does not quite deliver what you want, or it stops feeling controllable. Then try to work out why. What would happen if you kept using it this way for a week?

In both paths, save evidence as you go: screenshots of things going wrong, exported transcripts, session files, and traces. Note the tool, the model, and the date.

Starting points

  • pi, the open source coding agent from the week 2 and week 3 studios. You already know how to read its traces, and it saves every session to a file.
  • Claude Code, Codex CLI, or Gemini CLI. Gemini CLI has a free tier.
  • Agent modes in chat assistants, such as ChatGPT agent mode or Claude in Chrome, for tasks in the browser.
  • browser-use, an open source browser agent you can inspect.
  • FreeInference (freeinference.org) gives free API access to open models and works with pi, Claude Code, and Codex. Use minimax-m3 for tasks that need images, such as browser tasks. It logs every prompt and response, so do not send personal information through it.

When something goes wrong, diagnose it

Capabilities. What does the model need to be able to do for this task?

Tools. What tools does the agent need, and does it have them?

The capability gap. Is the model capable enough? If not, can you close the gap with a better user prompt, a tool, a skill, or a plan that breaks the task into smaller steps?

The interface. Can you see the important state of the agent, and can you control it when it matters?

Where to find the traces

Agent Where the session is saved Export or replay
pi ~/.pi/agent/sessions/<project folder>/<time>_<id>.jsonl /export saves the session as HTML or JSONL; /share gives a viewer link
Claude Code ~/.claude/projects/<project folder>/<session id>.jsonl, kept 30 days by default /export saves the conversation as text; claude --resume reopens it
Codex CLI ~/.codex/sessions/<year>/<month>/<day>/rollout-<time>-<id>.jsonl codex resume; codex exec --json prints the events as JSONL
Gemini CLI ~/.gemini/tmp/<project hash>/chats/session-*.jsonl, kept 30 days by default /chat share file.md or file.json writes the conversation out
OpenCode a SQLite database in ~/.local/share/opencode/ opencode export <session id> writes the session as JSON
browser-use nothing by default save_conversation_path, generate_gif, and agent.save_history() write the steps, a JSON history, and a GIF
ChatGPT, Claude.ai, Claude in Chrome no file on your computer account data export in Settings, or a share link; record the screen for browser actions

Most coding agents save every session as a JSONL file, one line per message, tool call, or tool result. Each agent uses its own fields, so read a few lines first.

Share

10 minutes

Say your task, show one moment where the agent fell apart or felt hard to control, and show the evidence on screen.

Studio summary 3

There is no class next week. Use the break to push what you started further. One submission per team on Canvas, due Friday, October 16, midnight.

  1. The task. What it is, who does it, how long it takes, who else is involved, and why it needs human control.
  2. Diagnosis. Answer the four questions (capabilities, tools, the capability gap, the interface) using what you saw in your runs.
  3. Failure log. At least three episodes where the agent did not deliver or did not feel controllable: what you asked, what you expected, what happened, and where a person could have stepped in, intervened earlier, or been better supported. Attach evidence, note the tool, model, and date, and run each failure at least twice.
  1. Over the break, take it further in at least one way: test it over several days or sessions; test more cases, inputs, or agents; or talk to someone who is not an AI or computer science practitioner or student about what they would want and what would worry them.
  2. Propose or try an improvement, such as a new interface, a harness change, or a different way of giving instructions, and say whether it helped.

Remove other people’s personal information from screenshots and traces. Get consent from anyone you interview. AI use may not go beyond language polishing.

Next class

Before Monday, October 19

Before next class

Submit the studio reflection by Friday, October 16, midnight, one response per team.

Submit the reading response by Monday, October 19, noon.

Shneiderman, B., and Maes, P. Direct manipulation vs. interface agents. Interactions, 1997.

Everything is submitted on Canvas.

Research spotlight, October 19

Direct manipulation and multimodal input for steering LLMs: Jinbo Hu

Structuring and managing LLM output at scale: Min Ge

Runtime action gating against hijack and drift: Prashanth Prabhakar

Next week: Human-Agent Interaction 1

Monday, October 19. There is no class on October 12, Indigenous Peoples Day.

References: coding agents

  • Xia, C. S., Deng, Y., Dunn, S., and Zhang, L. Agentless: Demystifying LLM-based Software Engineering Agents. FSE 2025. arXiv 2407.01489.
  • Yang, J. et al. SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering. NeurIPS 2024. arXiv 2405.15793.
  • SWE-agent team. mini-swe-agent. github.com/SWE-agent/mini-swe-agent, September 2026.
  • Anthropic. Claude Code tools reference, code.claude.com; text editor tool, platform.claude.com; Raising the bar on SWE-bench Verified with Claude 3.5 Sonnet, October 2024.
  • OpenAI. Codex source code, github.com/openai/codex, release rust-v0.160.0; GPT-4.1 prompting guide, April 2025.
  • pi coding agent 0.86.1 source, @earendil-works/pi-coding-agent.
  • Meta FAIR CodeGen team. CWM: An Open-Weights LLM for Research on Code Generation with World Models. arXiv 2510.02387, 2025.
  • Qwen Team. Qwen3-Coder-Next Technical Report. arXiv 2603.00729, 2026.
  • Wei, J. Asymmetry of verification and verifier’s law. July 2025.
  • Baker, B. et al. Monitoring Reasoning Models for Misbehavior and the Risks of Promoting Obfuscation. arXiv 2503.11926, 2025.
  • Meyer, A. N., Barr, E. T., Bird, C., and Zimmermann, T. Today Was a Good Day: The Daily Life of Software Developers. IEEE TSE, 2021.
  • Huang, S. et al. How AI Is Transforming Work at Anthropic. December 2025.
  • Demirer, M., Musolff, L., and Yang, Y. Writing Code vs. Shipping Code. NBER working paper 35275, 2026.
  • Peng, S. et al. The Impact of AI on Developer Productivity: Evidence from GitHub Copilot. arXiv 2302.06590, 2023. Cui, Z. et al. The Effects of Generative AI on High-Skilled Work. Management Science, 2026.
  • METR. Measuring the Impact of Early-2025 AI on Experienced Open-Source Developer Productivity, July 2025; uplift update, February 2026.
  • AlbGri. claude-github-monitor, github.com/AlbGri/claude-github-monitor, data to 2 October 2026. JetBrains Research. AI coding agent adoption, August 2026. Stack Overflow Developer Survey 2025.
  • Chen, M. et al. Evaluating Large Language Models Trained on Code. 2021. Austin, J. et al. Program Synthesis with Large Language Models. 2021.
  • Jimenez, C. E. et al. SWE-bench: Can Language Models Resolve Real-World GitHub Issues? ICLR 2024. OpenAI. Introducing SWE-bench Verified, August 2024; Why SWE-bench Verified no longer measures frontier coding capabilities, February 2026; Separating signal from noise in coding evaluations, July 2026.
  • Deng, X. et al. SWE-Bench Pro. arXiv 2509.16941, 2025. Jain, N. et al. LiveCodeBench. 2024. Terminal-Bench, tbench.ai. Datacurve. DeepSWE, 2026.
  • Liang, S., Garg, S., and Moghaddam, R. Z. The SWE-Bench Illusion. arXiv 2506.12286, 2025. Aleithan, R. et al. SWE-Bench+. arXiv 2410.06992, 2024. SWE-bench issue 465, September 2025. Cursor. Reward hacking is swamping model intelligence gains, June 2026.

References: computer use and knowledge work agents

  • Anthropic. Measuring AI agent autonomy in practice. February 2026. Developing a computer use model, October 2024.
  • Moravec, H. Mind Children. Harvard University Press, 1988.
  • Xie, T. et al. OSWorld: Benchmarking Multimodal Agents for Open-Ended Tasks in Real Computer Environments. NeurIPS 2024.
  • Wornow, M. et al. Automating the Enterprise with Foundation Models (ECLAIR). PVLDB 2024.
  • Dosovitskiy, A. et al. An Image is Worth 16x16 Words. ICLR 2021. Liu, H. et al. Visual Instruction Tuning (LLaVA). NeurIPS 2023.
  • Wang, P. et al. Qwen2-VL. arXiv 2409.12191, 2024. Bai, S. et al. Qwen2.5-VL Technical Report. arXiv 2502.13923, 2025. Qwen Team. Qwen3-VL Technical Report. arXiv 2511.21631, 2025.
  • Qin, Y. et al. UI-TARS: Pioneering Automated GUI Interaction with Native Agents. arXiv 2501.12326, 2025.
  • Rawles, C. et al. AndroidWorld. arXiv 2405.14573, 2025. Microsoft. Playwright MCP, v0.0.83.
  • Anthropic computer use tool docs, platform.claude.com; anthropic-quickstarts computer use demo. OpenAI computer use guide, developers.openai.com. Google Gemini API computer use docs, ai.google.dev; Vertex AI docs. All checked October 2026.
  • Liu, E. Z. et al. Reinforcement Learning on Web Interfaces Using Workflow-Guided Exploration (MiniWoB++). ICLR 2018.
  • Deng, X. et al. Mind2Web: Towards a Generalist Agent for the Web. NeurIPS 2023.
  • Zhou, S. et al. WebArena: A Realistic Web Environment for Building Autonomous Agents. ICLR 2024.
  • Koh, J. Y. et al. VisualWebArena: Evaluating Multimodal Agents on Realistic Visual Web Tasks. ACL 2024.
  • He, H. et al. WebVoyager: Building an End-to-End Web Agent with Large Multimodal Models. ACL 2024.
  • Xue, T. et al. An Illusion of Progress? Assessing the Current State of Web Agents. COLM 2025.
  • Lù, X. H. et al. AgentRewardBench: Evaluating Automatic Evaluations of Web Agent Trajectories. COLM 2025.
  • Chen, C. et al. Comparing Human Oversight Strategies for Computer-Use Agents. arXiv 2604.04918, 2026.
  • Anthropic. Claude Cowork, January 2026; Building agents with the Claude Agent SDK, September 2025; How people are using Claude Cowork, July 2026. OpenAI. ChatGPT Work launch post, 9 July 2026.

References: evaluation, extending agents, sandboxing

  • Yao, S. The Second Half. April 2025. Karpathy, A. Post on verifiability, X, November 2025.
  • Arora, R. K. et al. HealthBench. OpenAI, 2025. Gunjal, A. et al. Rubrics as Rewards. arXiv 2507.17746, 2025. Patwardhan, T. et al. GDPval. arXiv 2510.04374, 2025.
  • Yao, S. et al. τ-bench. arXiv 2406.12045, 2024. Prime Intellect, Environments Hub, 2025. Meta and Hugging Face, OpenEnv, 2025. Harbor documentation.
  • Sun, Y. et al. Agents’ Last Exam. arXiv 2606.05405, 2026; agents-last-exam.org.
  • Shah, N. B. Asking Authors About Their Own Papers. TMLR blog, 16 September 2026.
  • Shen, J. H., and Tamkin, A. How AI assistance impacts the formation of coding skills. arXiv 2601.20245, 2026.
  • Kwa, T. et al. Measuring AI Ability to Complete Long Tasks. arXiv 2503.14499, 2025. Backlund, A., and Petersson, L. Vending-Bench. arXiv 2502.15840, 2025. Anthropic. Project Vend, 2025.
  • Kapoor, S. et al. Open-world evaluations (CRUX). arXiv 2605.20520, 2026.
  • Claude Agent SDK docs, code.claude.com. Agent Client Protocol, agentclientprotocol.com. Codex docs, learn.chatgpt.com. pi docs/extensions.md. Cursor Slack integration docs, cursor.com/docs.
  • Anthropic Engineering. Beyond permission prompts: making Claude Code more secure and autonomous, October 2025; How we contain Claude across products, May 2026. anthropics/sandbox-runtime.
  • OpenAI Codex sandboxing and approvals docs. gVisor documentation. Agache, A. et al. Firecracker: Lightweight Virtualization for Serverless Applications. NSDI 2020.
  • SWE-bench evaluation harness docs. Claude Code monitoring docs. OpenTelemetry GenAI semantic conventions. Agent Trace, agent-trace.dev.