---
title: "Comment by Julian Neagu on \"What If Your AI Agent Wrote the Loop?\" | Hashnode"
description: "I like the idea, but I'd be careful about giving generated code too much freedom. A restricted runner, tight permissions and execution limits feel essential. Th"
url: "https://hashnode.com/posts/what-if-your-ai-agent-wrote-the-loop/6b048793bc9a3bc8db7eee0d/comment/6b0802ecd536726590e96477"
---

[Discussion](https://hashnode.com/posts/what-if-your-ai-agent-wrote-the-loop/6b048793bc9a3bc8db7eee0d)

Comment [What If Your AI Agent Wrote the Loop?](https://hashnode.com/posts/what-if-your-ai-agent-wrote-the-loop/6b048793bc9a3bc8db7eee0d)

[Julian Neagu](https://hashnode.com/@julianneagulab)

[Nov 26](https://hashnode.com/posts/what-if-your-ai-agent-wrote-the-loop/6b048793bc9a3bc8db7eee0d/comment/6b0802ecd536726590e96477)

I like the idea, but I'd be careful about giving generated code too much freedom. A restricted runner, tight permissions and execution limits feel essential. The model should decide what to do, not get unlimited access to do it.

[Patrick Kearns](https://hashnode.com/@fullstackcity)

[Nov 26](https://hashnode.com/posts/what-if-your-ai-agent-wrote-the-loop/6b048793bc9a3bc8db7eee0d/comment/6b0802ecd536726590e96477#reply-6b088bc6bd92c1ad73ac11f8)

Exactly. In the .NET example, the model writes the loop, and the runner enforces what it can access and how long it can run.
