Agents and AutomationLesson 42 of 72

Module 5 · Permissions, injection and blast radius

Running code the model wrote

In this lesson

  • 9 min read
  • 5 reading sections
  • Knowledge check
  • Lesson 5 of 9 in this chapter

This chapter’s goalDraw the permission boundary for an automation: name what it may touch, what somebody writing into its inputs could make it do, and which actions must stop for a person.

This chapter’s media

The film explains chapter ideas. The audiobook narrates the complete teaching text.

FormatEnglishहिंदी
Chapter filmNot availableNot available
Full audiobookNot availableNot available

A little at a time

Explore an idea, try it, then check what stays.

Step 1 of 6Free · no account needed
Lesson steps

One tool changes everything

Give an agent a code-execution tool and every careful permission decision collapses into a single question, because arbitrary code can do whatever the process can do: read files, open sockets, spend money, and read the environment variables holding your other credentials.

This is still worth doing. Code is often the right tool: it does arithmetic properly, handles a thousand rows without them entering the context, and fails loudly. It just needs a boundary.

Your place and first choices stay on this browser. Classroom credit is recorded separately.

Every lesson here is open. Your progress is recorded once you pass the Context Engineering exam.

Stuck on something?Ask Mai, your AI tutor

How to cite: Addaly (2026) ‘Running code the model wrote’, in Agents and Automation. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/agents-and-automation/sandboxing-what-it-runs (Accessed: 27 November 2026).