1. Home
  2. AI Engineer

Jan 5

Is Bash the best AI agent tool?

Thariq Shihipar

112 min → 2:37

Overview

Thariq Shihipar of Anthropic explains the shift from static workflows to autonomous AI agents, detailing how to build reliable systems using standard Unix tools, code generation, and the gather-act-verify loop.

3 things to know

Anthropic engineer Shihipar calls Bash the top agent tool

Thariq Shihipar says the Bash command line is the most powerful tool for AI agents because standard commands like grep can be combined freely instead of relying on rigid custom tools.

▶ Watch at 8:08

Shihipar says agents should write Python scripts for analysis

Rather than asking a language model to read through emails directly, Thariq Shihipar says developers should let the AI agent write a Python script to analyze the data.

▶ Watch at 28:54

Also in this episode

Sub-agents manage context by returning answers, Shihipar says

Thariq Shihipar says sub-agents are an important way to manage context because they can do a large amount of isolated work and return just the final answer to the main agent.

▶ Watch at 1:06:45

Agents should load skills only when needed, Shihipar explains

Thariq Shihipar says developers can give an AI agent many different skills that the model reads and loads into its context only when needed.

▶ Watch at 34:00

Converting data into SQL helps agents search, says Shihipar

Thariq Shihipar recommends translating data into interfaces that AI models already know well, noting that converting information into a SQL database lets an agent search it easily.

▶ Watch at 55:46

Reversible work predicts where agents succeed, says Anthropic's Shihipar

When deciding what problems AI agents are good at solving, Thariq Shihipar says a good rule of thumb is to ask how reversible the work is.

▶ Watch at 1:11:00

Quotes

“We have strong opinions on the best way to build agents... One of our biggest learnings: the Bash tool is the most powerful agent tool.”

▶ Watch at 8:08

“Use code generation for highly dynamic, flexible logic... If you want to do data analysis, you should probably just write a Python script for it rather than trying to build a tool that does data analysis.”

▶ Watch at 28:54

“The file system is a way of context engineering... one of the key insights we had through Claude Code was thinking a lot more through... context not just [as] a prompt, it's also the tools, the files, the scripts that it can use.”

▶ Watch at 5:12

15 more quotes

“Agents build their own context, decide their own trajectories, are working very, very autonomously. ... As the future goes on, agents will get more and more autonomous.”

▶ Watch at 2:58

“Bash is what makes Claude Code so good... I think a lot of people are only thinking about tools. Tools are extremely structured and very, very reliable... [but have] high context usage, not composable.”

▶ Watch at 15:52

“Imagine if someone came to you with a stack of papers and [said] 'hey, how much did I spend on ride sharing this week? Can you read through my emails?' ... That would be really hard... Or with Bash... you can run a query function... pipe it, grep for prices... then add them together.”

▶ Watch at 18:03

“The number one... meta learning for designing an agent loop to me is just to read the transcripts over and over again... Every time you see the agent run, just read it and figure out like, 'Hey, what is it doing? Why is it doing this?'”

▶ Watch at 19:56

“Almost all agents operate in this loop... You have to gather context, you have to take an action, and you have to verify the work.”

▶ Watch at 22:29

“Bash is extremely composable. All of these scripts are static... they're very low context usage. You don't have to explain to the model what `ls` does or `grep` does.”

▶ Watch at 26:00

“Skills let one agent accomplish longer, more complex tasks without needing sub-agents. The agent can use many skills and read them only when needed.”

▶ Watch at 34:00

“The only thing I'm putting in the context is the `results.txt`. I'm not putting in the audio file, I'm not putting in the raw transcript... This makes it extremely fast and extremely cheap.”

▶ Watch at 47:35

“If you can translate something into an interface that the agent knows very well, that's great... If you can convert it into a SQL query, then your agent really knows how to search SQL.”

▶ Watch at 55:46

“I wouldn't want the person to send me a stack of papers being like, 'Hey, this is probably all the information you need.' I'd rather just be like, 'Hey, just give me a computer, give me the problem, let me search it and figure it out.'”

▶ Watch at 1:05:25

“Sub-agents are a very, very important way of managing context... Sub-agents are great for when you need to do a lot of work and return an answer to the main agent.”

▶ Watch at 1:06:45

“When you think about... what problem domains are agents good at? 'How reversible is the work' is a really good intuition.”

▶ Watch at 1:11:00

“Sub-agents are a great primitive in the Agent SDK and I haven't seen anyone do it as well... Generally, you want these sub-agents to preserve context.”

▶ Watch at 1:19:41

“Any time you spend not solving these [core logic] problems and solving lower level problems, you're probably not delivering value to your users.”

▶ Watch at 1:20:59

“I would say [do verification] everywhere you can. Just constantly verification... if you have rules or heuristics... throw an error and give it feedback... the model will read the error outputs and then it will just keep going.”

▶ Watch at 1:21:52

Full summary

Episode Overview

  • This episode details the architectural shift from static "workflows" to autonomous AI "Agents" that determine their own trajectories to solve complex problems.
  • It explores the "Anthropic Way" of agent building, which prioritizes using standard Unix primitives (Bash, File Systems) and code generation over rigid, custom-defined tools.
  • The discussion provides a deep dive into the "Gather-Act-Verify" loop, a fundamental design pattern for ensuring agent reliability and reducing hallucinations.
  • Key engineering challenges are addressed, including managing context windows through "Sub-Agents," ensuring security via sandboxing, and optimizing performance by translating data into model-friendly interfaces like SQL or XML.

Key Concepts

  • The Agent Loop (Gather-Act-Verify) The fundamental architecture of a reliable agent involves three distinct steps repeated in a cycle: 1) Gather Context (read files, search logs), 2) Take Action (execute code, modify state), and 3) Verify Work. Crucially, verification is often the missing link; agents must explicitly check if their action succeeded (e.g., via a linter or file check) rather than assuming success.

  • Bash and Unix Primitives as Context Anthropic’s SDK philosophy argues that generic compute tools (Bash, standard file systems) are superior to specific, pre-defined API tools (like "read_email"). Bash allows for "composability"—an agent can pipe the output of one command into another (e.g., grep into wc) without the developer needing to predict every possible use case.

  • Code Generation for General Logic Instead of asking an LLM to "read" 100 emails and summarize spending (which relies on probabilistic text generation), developers should prompt the agent to write a Python script to parse the data deterministically. This reduces hallucination because the logic is handled by the code execution engine, not the LLM's next-token prediction.

  • Sub-Agents and Context Management Sub-agents are not just for complex tasks but are essential architectural primitives for managing "context pollution." By spinning off a sub-agent to perform a specific research task and returning only the final answer, the main agent's context window remains clean, focused, and cheaper to run.

  • Interface Transformation Models perform significantly better when raw data is translated into formats they were heavily trained on. Converting a messy CSV into a SQLite database or a raw text file into structured XML allows the agent to leverage its deep, pre-existing knowledge of SQL querying and document structure to find information more accurately.

  • Skills and JIT Prompting A "Skill" is a modular package of files (instructions and assets) that an agent loads only when needed. This supports "Just-In-Time" (JIT) prompting, where specific instructions (e.g., how to format a spreadsheet) are injected into the context window only at the moment of execution, rather than stuffing the system prompt with rules for every possible scenario.

  • Reversibility as a Success Metric Agents thrive in domains where actions are reversible (like coding with Git). They struggle in domains where state changes are permanent or compounding (like browsing the web to buy products). Designing systems with "undo" buttons or checkpoints allows agents to self-correct without catastrophic failure.

Quotes

  • At 0:02:58 - "Agents build their own context, decide their own trajectories, are working very, very autonomously. ... As the future goes on, agents will get more and more autonomous." - Defining the shift from static workflows to autonomous systems.
  • At 0:05:12 - "The file system is a way of context engineering... one of the key insights we had through Claude Code was thinking a lot more through... context not just [as] a prompt, it's also the tools, the files, the scripts that it can use." - Expanding the definition of "context" beyond just the text prompt to include the agent's entire operating environment.
  • At 0:08:08 - "We have strong opinions on the best way to build agents... One of our biggest learnings: the Bash tool is the most powerful agent tool." - Highlighting the core contrarian thesis of the SDK: generic compute (Bash) beats specific tools.
  • At 0:15:52 - "Bash is what makes Claude Code so good... I think a lot of people are only thinking about tools. Tools are extremely structured and very, very reliable... [but have] high context usage, not composable." - Explaining the trade-off: structured tools are safe but rigid; Bash is risky but infinitely flexible.
  • At 0:18:03 - "Imagine if someone came to you with a stack of papers and [said] 'hey, how much did I spend on ride sharing this week? Can you read through my emails?' ... That would be really hard... Or with Bash... you can run a query function... pipe it, grep for prices... then add them together." - A practical example of why programmatic agents outperform text-processing agents for data tasks.
  • At 0:19:56 - "The number one... meta learning for designing an agent loop to me is just to read the transcripts over and over again... Every time you see the agent run, just read it and figure out like, 'Hey, what is it doing? Why is it doing this?'" - The speaker’s primary advice for debugging and improving agent performance.
  • At 0:22:29 - "Almost all agents operate in this loop... You have to gather context, you have to take an action, and you have to verify the work." - This quote defines the fundamental architecture for building agentic workflows.
  • At 0:26:00 - "Bash is extremely composable. All of these scripts are static... they're very low context usage. You don't have to explain to the model what ls does or grep does." - This explains why standard computing tools are often superior to custom-built tools for simple agent tasks.
  • At 0:28:54 - "Use code generation for highly dynamic, flexible logic... If you want to do data analysis, you should probably just write a Python script for it rather than trying to build a tool that does data analysis." - This highlights a common mistake developers make: over-engineering tools when the LLM could simply write a script to solve the problem.
  • At 0:34:00 - "Skills let one agent accomplish longer, more complex tasks without needing sub-agents. The agent can use many skills and read them only when needed." - This introduces a scalable way to increase an agent's capabilities without increasing the complexity of the primary system prompt.
  • At 0:47:35 - "The only thing I'm putting in the context is the results.txt. I'm not putting in the audio file, I'm not putting in the raw transcript... This makes it extremely fast and extremely cheap." - This demonstrates the efficiency of processing data in the background (via code execution) and only feeding the LLM the necessary outputs.
  • At 0:55:46 - "If you can translate something into an interface that the agent knows very well, that's great... If you can convert it into a SQL query, then your agent really knows how to search SQL." - Explaining why transforming data into standard formats (like SQL or XML) drastically improves agent performance.
  • At 1:05:25 - "I wouldn't want the person to send me a stack of papers being like, 'Hey, this is probably all the information you need.' I'd rather just be like, 'Hey, just give me a computer, give me the problem, let me search it and figure it out.'" - A powerful analogy for why giving agents tools to search is superior to overloading their context window with raw data.
  • At 1:06:45 - "Sub-agents are a very, very important way of managing context... Sub-agents are great for when you need to do a lot of work and return an answer to the main agent." - Defining the architectural role of sub-agents: they are isolation chambers that prevent the main agent from getting confused.
  • At 1:11:00 - "When you think about... what problem domains are agents good at? 'How reversible is the work' is a really good intuition." - Identifying a key heuristic for determining if a task is suitable for an agent; if errors can be easily unwound, agents will thrive.
  • At 1:19:41 - "Sub-agents are a great primitive in the Agent SDK and I haven't seen anyone do it as well... Generally, you want these sub-agents to preserve context." - Explaining the unique value proposition of their SDK architecture versus standard loops.
  • At 1:20:59 - "Any time you spend not solving these [core logic] problems and solving lower level problems, you're probably not delivering value to your users." - A warning against getting bogged down in infrastructure rather than agent behavior.
  • At 1:21:52 - "I would say [do verification] everywhere you can. Just constantly verification... if you have rules or heuristics... throw an error and give it feedback... the model will read the error outputs and then it will just keep going." - Explaining how error handling acts as a reasoning loop for the agent.

Takeaways

  • Implement the "Gather-Act-Verify" loop explicitly in your agent's logic; never let an agent complete a task without a self-check step.
  • Stop over-building custom tools; give your agent a generic "Bash" or "Python" tool first and let it compose its own solutions.
  • Use code generation as a safety rail; ask the agent to write a script to calculate answers (deterministic) rather than asking it to think of the answer directly (probabilistic).
  • Read the transcripts of your agent's failures; this is the single most effective way to debug and understand "meta-learning" issues.
  • Design your agent's environment to be reversible; if an agent makes a mistake, it should be able to "undo" (like git revert) rather than breaking the system.
  • Package instructions into "Skills" (files/folders) that are loaded Just-In-Time to save tokens and keep the context window focused.
  • Transform your data into interfaces the model understands deeply, such as converting CSVs to SQLite or text to XML, before feeding it to the agent.
  • Use Sub-Agents to act as "context filters," allowing them to digest large amounts of information and return only the relevant summary to the main agent.
  • Implement "Continuous Verification" by having the system throw errors immediately when heuristics are violated, using these errors as feedback for the model to self-correct.
  • Adopt the "Computer vs. Stack of Papers" mindset: do not stuff the context window; instead, give the agent the tools to search and retrieve only what it needs.
  • Focus your development time on "System Engineering" (designing the environment and guardrails) rather than low-level prompt engineering.

Watch the full episode 1 hr 52 min

Read along with the audio summary

According to the speaker, the single most powerful tool you can give an autonomous artificial intelligence agent is not a custom piece of software, but a basic command line interface called Bash. In this episode, which came out on January fifth, twenty twenty six, a speaker from the AI company Anthropic shares their team's philosophy on shifting from static workflows to autonomous agents. By the end, you will know how to build reliable, self correcting AI systems that solve complex problems on their own.

Make your AI agents reliable with a three step verification loop.

A reliable agent repeats three distinct steps: it gathers context by reading files or searching logs, it takes action by running code, and it verifies the work. That verification step, like using a code checking tool or confirming a file exists, is often the missing link that reduces AI hallucinations. Never let your agent complete a task without building an explicit self check step into its logic, and have your system throw immediate errors so the model can read the feedback and self correct.

Give your agent a basic command line instead of custom tools.

Anthropic's software development kit philosophy argues that generic computing tools like Bash, a standard Unix command line, and standard file systems are far superior to specific tools like a custom email reader. With Bash, an agent does not need you to predict every use case, because it already knows standard commands and can pipe the output of one search directly into a word count tool. Stop overbuilding custom tools, and instead give your agent a generic Bash tool first so it can compose its own solutions.

With that command line in hand, you can use code generation for general logic to eliminate guesswork.

Asking a large language model to read one hundred emails and add up your spending relies on probabilistic text prediction, which invites mistakes. When the agent writes a Python script to parse the emails and calculate the total, a code execution engine handles the logic deterministically rather than guessing the next word. Ask your agent to write a script to calculate answers rather than asking it to think of the answer directly.

Keep your main agent focused and cheap to run by filtering data through sub agents.

Stuffing a model's context window, which is its working memory, with raw audio files or long transcripts causes context pollution and drives up costs. Use sub agents as context filters to digest large amounts of information and return only the relevant summary.

Translate messy data into formats your model already knows deeply.

By converting a messy comma separated values file into a SQLite database, or turning raw text into structured XML, the agent can use its deep knowledge of database queries to find accurate answers. Transform your data into interfaces the model understands deeply before feeding it to the agent.

Save working memory by packaging instructions to load just in time.

Stuffing a system prompt with rules for every possible scenario wastes tokens and confuses the model. Instead, a skill is a modular folder of instructions and assets, like how to format a spreadsheet, that the agent reads only at the exact moment of execution.

Judge whether a task is right for an agent by how easy it is to undo.

Agents struggle when state changes are permanent, like browsing the web to buy products, but they thrive when actions are easily unwound, like coding with version control software such as Git. Design your agent's environment with undo buttons and checkpoints so it can recover from mistakes without breaking the system.

To make all of these architectural pieces work together, focus your time on system engineering rather than low level prompt engineering, and debug your system by reading the raw transcripts of its failures. Every time you see the agent run, just read it and figure out like, Hey, what is it doing? Why is it doing this?

More from AI Engineer

Related Episodes