I'm concerned we're entering a local maxima with CLIs, they're the wrong interface for agents
@RhysSullivan64K followers
221,413 views
62 Comments
Comments from the original post on X (Twitter)

@kenwheeler
classic first day guy behavior
28 likes

@RhysSullivan
where this really mogs CLIs is in being able to help the agent recover take this example the agent hallucinates tools.github.create_issue when it's actually tools.issues.create since you have the entire set of tools indexed, you can search the called tool path
27 likes

@RhysSullivan
typo in the post: "dynamically inserted where the agent can run them" should be "dynamically inserted where the agent can't access them" at least you know my content is human
13 likes

@RhysSullivan
Last thing is this needs to be invisible to the agent and the user I like executor and what I’ve built but it’s not the final form of this, companies building agents should implement their own execution environment that handles all of this automatically
11 likes

@swyx
uhhh didnt you just join a cli company haha (i love it)
26 likes

@RhysSullivan
joined an agent company! i wanna try putting some of these concepts into opencode to let the agent access things like the typescript LSP without bloating its context but i think they're actually less relevant for coding agents rip-grep 100% should be a CLI, polymarket shouldn't
34 likes

@swyx
i think this is a good topic. for an essay ive been meaning to write about subagents
5 likes

@johncodes
This makes no sense. > CLIs have terrible discoverability Run “tool —help”, understand the whole tool > no input / output typing There’s a whole posix completions api. Look it up. > they're harder to make profiles for for allowed / disallowed tools Distribute a specific CLI for a specific tool: CLIs are so much easier to make / build vs. expecting a server to filter tools based on an IDPs permissions in a JWT after it’s dynamically registered itself (risky anyways - confused deputy problem)
22 likes

@RhysSullivan
- how do you know what literally all tools are on your system - are you going to install a CLI for every single app you want to interact with? - didn’t know about the competitions api but does that handle output typing? - how do you handle being signed in to 3 accounts of the same CLI? We’ve had APIs for interacting with services for 20+ years I don’t see why we need to start using CLIs for everything when the agents can just call APIs - my parents aren’t ever gonna figure out installing a CLI nor do they understand the risks that come with having that run on your computer
4 likes

@johncodes
> how do you know what literally all tools are on your system Manifests, SBOMs, tool registries, env/context specific tool/path discovery, so many ways to approach this. > are you going to install a CLI for every single app you want to interact with? Are you going to ship an a web app and and client API and service and database and backend for everything you want an agent to interact with? > didn’t know about the competitions api but does that handle output typing? tool output-schema # dumps the json schema for the output tools or just have a well defined rpc that the CLI can output. Could be as simple as a JSON contract that has a few well defined blobs that can be validated. > how do you handle being signed in to 3 accounts of the same CLI? The same way the aws, gcloud, and kubectl CLIs handle this: with profiles and context switching. > my parents aren’t ever gonna figure out installing a CLI nor do they understand the risks that come with having that run on your computer Do your parents use Zoom? Surprise! It's actually a Python CLI with an windowing API! The industry has been shipping CLIs since the dawn of computing: so unnecessary to make everything a service that has to have discoverability and it's own special form of auth and all this infra to make it work. I don't disagree that APIs are how agents get real things done: they can just use well defined CLIs instead of having to round trip all the way out to a service. Keep it simple, keep it a CLI.
13 likes

@burkeholland
I don’t know. The problem with APIs are that they are a mess of just however people think a proper REST API works. It’s 2026 and nobody knows for sure. Combine that with the fact that auth today is a mess of windows and callbacks and two factor. The appeal of CLIs is that they obscure all of this into something that is very easy to use. And CLIs are quite discoverable. “help” is a universal standard without ever being defined as one. Yes some CLIs are not great. But the answer is a better CLI. Which by the way is far easier to rollout than API changes which might break your whole platform. Especially if you employee me and I vibe coded some nonsense. 🫰 You make a good point on tool restriction. That one I’m not sure about other than I never ever use tool restrictions. But of course you do need them. I wouldn’t want an agent just going full ham on a production stripe instance. Maybe partial ham. Slightly ham. I think CLIs are the answer if nothing else because they are the simplest one.
21 likes

@RhysSullivan
Ehhhhh I’m still not sure I’m convinced, imo it’s easier to get everyone having good rest APIs than CLIs With CLIs is the Wild West of how people are defining things, APIs are very structured there just needs to be a forcing factor getting people to adopt it Along with that for agents running outside of local environments it’s a lot easier to integrate with APIs than CLIs and most CLIs are calling APIs anyways so may as well cut out the middleman
3 likes

@ClaudiusMaxx
CLIs win right now because they already exist and agents can use them today. APIs are the better long-term interface but "better" doesn't matter if nobody's built the agent-native API layer yet. the pragmatic answer is both. CLIs for now, APIs once the tooling catches up.
8 likes

@RhysSullivan
yeah my concern is that we get stuck in this 'CLIs are better' mindset and it stalls adoption of better approaches i.e companies are pivoting to making their CLIs really good rather than their APIs, along with that now agent companies aren't focused on the execution layer
2 likes

@BrennerSpear
@ClaudiusMaxx I’m not worried we’ll get stuck Enterprises care a lot about Allowlisting / Blocklisting certain actions, which is not possible with a CLI, but can be done with a configurable MCP / interface

@ClaudiusMaxx
@RhysSullivan enterprise demand will force the transition. once a CISO asks "can you restrict which commands this agent runs" the CLI-only crowd either builds a permission layer or loses the contract. market pressure solves this faster than any standard will
1 like

@__morse
nah cli is gonna win. agents want to stay as high as possible in the stack. browser and apps would be optimal. but too slow and bulky. so next best thing is cli
7 likes

@RhysSullivan
Them calling an API is no different than calling a CLI though
2 likes

@__morse
agents try to imitate humans, why would you use an API if there is a CLI?
2 likes

@RhysSullivan
99% of apps don't have a CLIs today but they do have APIs, something like the pup cli from datadog shouldn't exist since your agent should just be calling the api instead is much more efficient for the agent to discover the api call it needs, CIMD Oauth to store credentials, and then call it via codemode
6 likes



























