# Command-line agent, defined with a sourced example

GLOSSARY, read 12 Nov 2026

**The short answer.** A command-line agent is a coding agent that runs in a terminal session instead of an editor window. OpenAI's Codex documentation says that locally Codex uses an OS-enforced sandbox, typically limited to the current workspace, plus an approval policy, and that network access is off by default.

## Definition

A command-line agent is a coding agent that runs in a terminal session instead of an editor window. It starts shell commands and edits files on the local machine, so its sandbox and approval policy define how much it can do unattended.

## Example from a real source

**Example.** OpenAI's Codex documentation says that locally Codex uses an OS-enforced sandbox, typically limited to the current workspace, plus an approval policy, and that network access is off by default.

## Related terms

- [MCP server (local stdio)](/glossary/mcp-server-local-stdio/): A local stdio MCP server is a program the MCP client launches as a subprocess on the same machine, talking over standard input and output.
- [MCP client](/glossary/mcp-client/): An MCP client is the connector inside an AI application that holds a dedicated connection to one MCP server.
- [Coding agent](/glossary/coding-agent/): A coding agent is an AI tool that reads a repository, edits files, runs commands and calls tools to finish a development task with limited step-by-step direction.

## Where to read more

- [The Agent Surface Map](/agent-surface-map/)
- [The Action Control Matrix](/action-control-matrix/)
- [All glossary terms](/glossary/)

## Sources

- developers.openai.com/codex/agent-approvals-security: https://developers.openai.com/codex/agent-approvals-security (read 12 Nov 2026)

Last reviewed 12 Nov 2026. Canonical: https://aiendpointsecurityranked.com/glossary/command-line-agent/
