Stop Chatting with Your AI. Start Giving It a Shell.
Chat-based AI coding promised to eliminate boilerplate and let you describe what you want in plain English. For a while, that felt like magic. But the workflow hasn't really changed: you type a prompt, get a code block, copy it into your editor, run it, see it fail, paste the error back into the chat, and wait for the next suggestion. That loop is conversational, but it's not engineering. It's a slightly faster version of reading Stack Overflow.
Now imagine the same language model opens a terminal. It writes the code to a file, runs the script, reads the traceback, and fixes the problem without you ever touching the keyboard. That's not a better chatbot. That's an agent, and it's the next real step in AI coding.
The Chatbox Trap
The typical AI coding assistant lives inside a chatbox. You ask it to write a function, and it does. You drop that function into your project, run the test suite, and discover a missing import, a type mismatch, or a logic error. So you copy the error message, paste it back into the chat, and ask for a fix. The assistant has no memory of the runtime environment, no access to the actual filesystem, and no ability to verify that its next suggestion actually works until you try it again.
This is a breakpoint in the feedback loop. Every execution result is filtered through you, the human, who becomes a manual integration layer. The AI is a suggestion engine, not a doer. You're still responsible for the build, the test run, the dependency installation, and the debugging cycle. The assistant's productivity gain is real, but it's capped by how fast you can copy and paste.
What Agentic Coding Actually Means
Agentic coding flips the model. The AI isn't just a text generator waiting for the next prompt. It's a process that runs inside a persistent environment with a filesystem and a shell. It can:
- Write a file, then execute it with
python3 script.py. - Read the standard output and standard error, parse the exit code, and decide what to do next.
- Install dependencies with
pip installornpm installwhen it sees an import error. - Run
pytestafter a code change, see which tests fail, and edit the source accordingly. - Iterate until the tests pass or the expected output matches, all inside a single session.
The model still produces text, but the environment closes the loop. The agent observes the consequences of its actions, and those observations become part of the context for the next step. The result is a self-correcting workflow that doesn't need a human to shuttle feedback between a terminal and a chat window.
A Real Example: From Prompt to Passing Test
Suppose you ask an agentic AI to write a tiny URL shortener. Instead of spitting out a code block and waiting for your next move, the agent moves straight into the shell.
$ cat > shortener.py << 'EOF'
import hashlib
url_map = {}
def shorten(url):
h = hashlib.md5(url.encode()).hexdigest()[:6]
url_map[h] = url
return h
EOF
$ python3 shortener.py
Traceback (most recent call last):
File "shortener.py", line 1, in <module>
import hashlib
ModuleNotFoundError: No module named 'hashlib'
The agent sees the import error. It knows hashlib is part of the standard library but spelled wrong. It edits the file, corrects hashlib to hashlib, and runs it again. This time the script doesn't crash, but the agent wants to verify behavior. It writes a quick test:
$ python3 -c "
from shortener import shorten
print(shorten('https://example.com'))
"
6c4a5d
It checks that the shortened key is stored and retrievable. No human touched the terminal. The agent handled the write, the run, the error, and the fix. Multiply that loop across a hundred lines of code, a dozen dependencies, and a test suite, and you start to see the productivity difference.
The Security Question (and Why a Sandbox Changes Everything)
Giving a language model shell access sounds reckless. An agent that can execute arbitrary commands, install packages, and modify files could delete your home directory or exfiltrate environment variables. That's a legitimate concern, and it's why running an agentic AI on your local machine without isolation is a bad idea.
But the same danger exists with any automated script or CI pipeline. The solution is sandboxing, not avoiding shell access entirely. If the agent's environment is a container or a dedicated remote Linux host with a limited filesystem, restricted network egress, and no access to sensitive credentials, the blast radius is tiny. You can watch the agent's terminal session in real time, kill it if it goes off the rails, and roll back to a clean snapshot.
This is the same trade-off we already accept with GitHub Actions or Docker-based CI. The agent becomes another build step, not a root user on your laptop.
Where the Real Gain Lives
The shift from chat to agentic coding isn't about smarter models. It's about removing the human as the integration bus. Every time you paste an error message, you're doing work that the machine should handle. The real productivity gain comes from letting the model own the execution loop, not just the suggestion loop.
That requires a persistent environment where the model can read and write files, run commands, and see the output immediately. SSH access to a Linux box, a Docker container with a volume mount, or a remote shell host all work. The key is that the environment survives across multiple turns, so the agent can build up state, install tools, and iterate without resetting.
If you want to experiment with this without setting up your own sandbox, we built borg on xShellz to give language models exactly that: a persistent Linux shell, an isolated filesystem, and the ability to run commands and observe the results. It's an agentic coding tool that competes in the same space as Copilot and Claude Code, but with a terminal-first philosophy. You can start a session, hand it a task, and watch it work in a real shell, not a chatbox.
But even if you never touch borg, the takeaway is the same: the next generation of AI coding isn't a better chat interface. It's a shell. Give your model the power to execute, and it goes from a clever assistant to a real engineer.