ChatGPT 웹의 Composer에는 전용 명령어 메뉴가 있습니다. /를 입력하면 현재 채팅에서 사용할 수 있는 작업이 표시됩니다. ChatGPT 웹에서는 ChatGPT 데스크톱 앱이나 CLI의 명령어를 제공하지 않습니다. 이 레퍼런스의 Codex 슬래시 명령어, CLI 명령어, 플래그는 ChatGPT 웹에 적용되지 않습니다.
ChatGPT 데스크톱 앱 명령어
명령어 페이지에서는 앱 탐색, 채팅 단축키, 키보드 설정 변경 방법을 설명합니다. 채팅, 설정, 스킬, 예약 작업, 플러그인, 펫으로 바로 이동하는 딥 링크도 안내합니다.
슬래시 명령어 페이지에서는 /feedback, /goal, /init, /mcp, /plan, /review, /status 등 앱의 Composer에서 사용할 수 있는 명령어를 설명합니다.
레퍼런스 이용 방법
이 페이지에는 문서화된 모든 Codex CLI 명령어와 플래그가 나와 있습니다. 대화형 표에서 키나 설명으로 검색하세요. 각 섹션에는 옵션의 성숙도와 함께 사용 중단 예정(deprecated)인 옵션 및 함께 사용하면 위험한 조합이 표시됩니다.
CLI의 기본값은 대부분 ~/.codex/config.toml에서 가져옵니다. 명령줄에서 -c key=value로 지정한 값은 해당 실행에서 우선 적용됩니다. 자세한 내용은 설정 기초를 참고하세요.
전역 플래그
| Key | Type / Values | Details |
|---|---|---|
--add-dir | path | Grant additional directories write access alongside the main workspace. Repeat for multiple paths. |
--approve-for-me, --not-so-yolo | boolean | Use automatic approval review with on-request approvals and the workspace-write sandbox. Conflicts with --sandbox and --yolo; the interactive CLI also rejects --ask-for-approval. |
--ask-for-approval, -a | on-request | never | Control when Codex pauses for human approval before running a command. |
--cd, -C | path | Set the working directory for the agent before it starts processing your request. |
--config, -c | key=value | Override configuration values. Values parse as TOML if possible; otherwise the literal string is used. |
--dangerously-bypass-approvals-and-sandbox, --yolo | boolean | Run every command without approvals or sandboxing. Only use inside an externally hardened environment. |
--dangerously-bypass-hook-trust | boolean | Run enabled hooks without requiring persisted hook trust for this invocation. Intended only for automation that already vets hook sources. |
--disable | feature | Force-disable a feature flag (translates to -c features.<name>=false). Repeatable. |
--enable | feature | Force-enable a feature flag (translates to -c features.<name>=true). Repeatable. |
--image, -i | path[,path...] | Attach one or more image files to the initial prompt. Separate multiple paths with commas or repeat the flag. |
--local-provider | lmstudio | ollama | Choose the local provider used with --oss, overriding oss_provider for this run. |
--model, -m | string | Override the model set in configuration (for example gpt-6.1-sol). |
--no-alt-screen | boolean | Disable alternate screen mode for the TUI (overrides tui.alternate_screen for this run). |
--no-daemon | boolean | Run the interactive CLI without the shared background server. Can't be combined with --remote or codex agents. |
--oss | boolean | Use a local open source model provider. Codex uses --local-provider, your configured oss_provider, or prompts you to choose between LM Studio and Ollama. |
--profile, -p | string | Layer $CODEX_HOME/profile-name.config.toml on top of the base user config. |
--remote | ws://host:port | wss://host:port | unix:// | unix://PATH | Connect to a remote app-server endpoint over WebSocket or a Unix socket. Supported for codex, codex agents, codex queue, codex resume, codex fork, codex archive, codex delete, and codex unarchive; other subcommands reject remote mode. |
--remote-auth-token-env | ENV_VAR | Read a bearer token from this environment variable and send it when connecting with --remote. Requires --remote; tokens are only sent over wss:// URLs or local-only ws:// URLs. |
--sandbox, -s | read-only | workspace-write | danger-full-access | Select the sandbox policy for model-generated shell commands. |
--search | boolean | Enable live web search (sets web_search = "live" instead of the default "cached"). |
--strict-config | boolean | Error when config.toml contains fields this Codex version does not recognize. Supported by runtime commands such as codex, exec, review, resume, fork, app-server, and exec-server. |
--worktree | boolean | Start in a new managed Git worktree. Supports new interactive sessions, codex fork <SESSION_ID>, codex exec, and codex exec fork; requires local execution. |
PROMPT | string | Optional text instruction to start the session. Omit to launch the TUI without a pre-filled message. |
--add-dirpath--approve-for-me, --not-so-yolobooleanon-request approvals and the workspace-write sandbox. Conflicts with --sandbox and --yolo; the interactive CLI also rejects --ask-for-approval.--ask-for-approval, -aon-request | never--cd, -Cpath--config, -ckey=value--dangerously-bypass-approvals-and-sandbox, --yoloboolean--dangerously-bypass-hook-trustboolean--disablefeature-c features.<name>=false). Repeatable.--enablefeature-c features.<name>=true). Repeatable.--image, -ipath[,path...]--local-providerlmstudio | ollama--oss, overriding oss_provider for this run.--model, -mstringgpt-6.1-sol).--no-alt-screenbooleantui.alternate_screen for this run).--no-daemonboolean--remote or codex agents.--ossboolean--local-provider, your configured oss_provider, or prompts you to choose between LM Studio and Ollama.--profile, -pstring$CODEX_HOME/profile-name.config.toml on top of the base user config.--remotews://host:port | wss://host:port | unix:// | unix://PATHcodex, codex agents, codex queue, codex resume, codex fork, codex archive, codex delete, and codex unarchive; other subcommands reject remote mode.--remote-auth-token-envENV_VAR--remote. Requires --remote; tokens are only sent over wss:// URLs or local-only ws:// URLs.--sandbox, -sread-only | workspace-write | danger-full-access--searchbooleanweb_search = "live" instead of the default "cached").--strict-configbooleanconfig.toml contains fields this Codex version does not recognize. Supported by runtime commands such as codex, exec, review, resume, fork, app-server, and exec-server.--worktreebooleancodex fork <SESSION_ID>, codex exec, and codex exec fork; requires local execution.PROMPTstring이 옵션은 기본 codex 명령어에 적용됩니다. 대부분 하위 명령어에도 전달됩니다. 예외는 위의 설명이나 해당 명령어의 도움말을 참고하세요. 전달되는 플래그의 사용법은 해당 명령어의 도움말을 따르세요. 예를 들어 codex exec --oss ...를 실행하면 --oss가 exec에 적용됩니다.
명령어 개요
성숙도 열에는 실험 단계, 베타, 안정, 사용 중단 예정(deprecated) 등 기능의 성숙도가 표시됩니다. 각 단계의 의미는 기능 성숙도를 참고하세요.
| Key | 성숙도 | Details |
|---|---|---|
codex | Stable | Launch the terminal UI. Accepts the global flags above plus an optional prompt or image attachments. |
codex agents | Stable | Open the agent command center on a shared local or remote server. |
codex app | Stable | Launch the ChatGPT desktop app on macOS or Windows. On macOS, Codex can open a workspace path; on Windows, Codex prints the path to open. |
codex app-server | Experimental | Launch the Codex app server for local development or debugging over stdio, WebSocket, or a Unix socket. |
codex apply | Stable | Apply the latest diff generated by a Codex cloud chat to your local working tree. Alias: codex a. |
codex archive | Stable | Archive a saved interactive session by session ID or session name. |
codex cloud | Experimental | Browse or execute Codex cloud chats from the terminal without opening the TUI. Alias: codex cloud-tasks. |
codex completion | Stable | Generate shell completion scripts for Bash, Zsh, Fish, or PowerShell. |
codex debug app-server send-message-v2 | Experimental | Debug app-server by sending a single V2 message through the built-in test client. |
codex debug models | Experimental | Print the raw model catalog Codex sees, including an option to inspect only the bundled catalog. |
codex debug prompt-input | Experimental | Render the model-visible prompt input list as JSON, optionally with a prompt and images. |
codex delete | Stable | Permanently delete a saved interactive session by session ID or session name. |
codex doctor | Stable | Generate a diagnostic report for local installation, config, auth, runtime, Git, terminal, app-server, and thread inventory issues. |
codex exec | Stable | Run Codex non-interactively. Alias: codex e. Stream results to stdout or JSONL, resume sessions, or fork them into new sessions. |
codex execpolicy | Experimental | Evaluate execpolicy rule files and see whether a command would be allowed, prompted, or blocked. |
codex features | Stable | List feature flags and persistently enable or disable them in config.toml. |
codex fork | Stable | Fork a previous interactive session into a new chat, preserving the original transcript. |
codex login | Stable | Authenticate Codex using ChatGPT OAuth, device auth, an API key, or an access token piped over stdin. |
codex logout | Stable | Remove stored authentication credentials. |
codex mcp | Stable | Manage Model Context Protocol servers (list, add, remove, authenticate). |
codex plugin | Stable | Install, list, and remove plugins from configured marketplace sources. |
codex plugin marketplace | Stable | Add, list, upgrade, or remove plugin marketplaces from Git or local sources. |
codex queue | Stable | Queue a text message for an existing session by UUID or exact name. |
codex remote-control | Experimental | Run or manage remote control for the local app-server, or create a short-lived pairing code. |
codex resume | Stable | Continue a previous interactive session by ID or resume the most recent chat. |
codex review | Stable | Run a non-interactive review of uncommitted changes, a base branch diff, a commit, or custom review instructions. |
codex sandbox | Stable | Run arbitrary commands inside Codex-provided macOS, Linux, or Windows sandboxes. |
codex unarchive | Stable | Restore an archived interactive session by session ID or session name. |
codex update | Stable | Check for and apply a Codex CLI update when the installed release supports self-update. |
codexcodex appcodex applycodex a.codex cloudcodex cloud-tasks.codex deletecodex doctorcodex execcodex e. Stream results to stdout or JSONL, resume sessions, or fork them into new sessions.config.toml.codex forkcodex logincodex mcpcodex plugincodex resumecodex reviewcodex update명령어 상세 설명
codex(대화형)
하위 명령어 없이 codex를 실행하면 대화형 터미널 UI(TUI)가 열립니다. 에이전트는 위의 전역 플래그와 이미지 첨부를 지원합니다. 웹 검색은 기본적으로 캐시 모드를 사용합니다. 실시간 탐색으로 전환하려면 --search를 사용하세요. 로컬 작업에서 승인 절차를 줄이려면 --sandbox workspace-write --ask-for-approval on-request를 사용하세요.
--remote ws://host:port 또는 --remote wss://host:port를 사용하면 codex app-server --listen ws://IP:PORT로 시작한 App Server에 TUI를 연결할 수 있습니다. 로컬 Unix 소켓을 사용할 때는 --remote unix://로 기본 소켓을 선택하거나 --remote unix://PATH로 경로를 지정하세요. 서버의 WebSocket 인증에 Bearer 토큰이 필요하면 --remote-auth-token-env <ENV_VAR>를 추가하세요.
codex agents
명령 센터를 열어 공유 서버의 채팅을 살펴보고 에이전트를 전환합니다. --remote <URL>로 원격 서버에 연결하고 --cd <DIR>로 새 원격 작업의 디렉터리를 지정하세요. codex agents는 --no-daemon을 지원하지 않습니다.
codex queue
기존 세션의 대기열에 텍스트 메시지를 추가합니다.
codex queue --thread <SESSION_ID> --message "Run the remaining checks"--thread에는 UUID 또는 정확한 세션 이름을 지정할 수 있습니다. 이름이 같은 세션이 여러 개라면 UUID를 사용하세요. 대기열에 추가한 메시지는 해당 세션의 모델이 처리합니다. 이 명령어는 텍스트만 받습니다.
--resume을 추가하면 먼저 메시지를 대기열에 넣은 뒤, 세션을 아직 불러오지 않은 경우 해당 세션을 재개합니다. 세션을 재개하려면 실행 중인 로컬 데몬이나 --remote로 선택한 서버가 필요합니다. 서버에 토큰이 필요하면 --remote-auth-token-env를 사용하세요. Codex가 세션을 재개할 수 없어도 명령어는 경고를 출력하고 성공 종료 코드를 반환합니다.
codex app-server
Codex App Server를 로컬에서 시작합니다. 주로 개발 및 디버깅에 사용하는 명령어로, 예고 없이 변경될 수 있습니다.
| Key | Type / Values | Details |
|---|---|---|
--analytics-default-enabled | boolean | Defaults analytics to enabled for first-party app-server clients unless the user opts out in config. |
--code-mode-host | http://HOST[:PORT] | https://HOST[:PORT] | Share an outbound HTTP/2 gRPC connection to a remote Code Mode host across threads. Supply an HTTP or HTTPS origin without credentials, a path, a query, or a fragment. |
--listen | stdio:// | ws://IP:PORT | unix:// | unix://PATH | off | Transport listener URL. Use stdio:// for JSONL, ws://IP:PORT for a TCP WebSocket endpoint, unix:// for the default Unix socket, unix://PATH for a custom Unix socket, or off to disable the local transport. |
--stdio | boolean | Use stdio transport. Equivalent to --listen stdio:// and mutually exclusive with --listen. |
--ws-audience | string | Expected aud claim for signed bearer tokens. Requires --ws-auth signed-bearer-token. |
--ws-auth | capability-token | signed-bearer-token | Authentication mode for app-server WebSocket clients. If omitted, WebSocket auth is disabled; non-local listeners warn during startup. |
--ws-issuer | string | Expected iss claim for signed bearer tokens. Requires --ws-auth signed-bearer-token. |
--ws-max-clock-skew-seconds | number | Clock skew allowance when validating signed bearer token exp and nbf claims. Requires --ws-auth signed-bearer-token. |
--ws-shared-secret-file | absolute path | File containing the HMAC shared secret used to validate signed JWT bearer tokens. Required with --ws-auth signed-bearer-token. |
--ws-token-file | absolute path | File containing the shared capability token. Use with --ws-auth capability-token unless you provide --ws-token-sha256 instead. |
--ws-token-sha256 | hexadecimal SHA-256 digest | Expected SHA-256 digest for capability-token authentication. Use instead of --ws-token-file when the client token comes from another source. |
--analytics-default-enabledboolean--code-mode-hosthttp://HOST[:PORT] | https://HOST[:PORT]--listenstdio:// | ws://IP:PORT | unix:// | unix://PATH | offstdio:// for JSONL, ws://IP:PORT for a TCP WebSocket endpoint, unix:// for the default Unix socket, unix://PATH for a custom Unix socket, or off to disable the local transport.--stdioboolean--listen stdio:// and mutually exclusive with --listen.--ws-audiencestringaud claim for signed bearer tokens. Requires --ws-auth signed-bearer-token.--ws-authcapability-token | signed-bearer-token--ws-issuerstringiss claim for signed bearer tokens. Requires --ws-auth signed-bearer-token.--ws-max-clock-skew-secondsnumberexp and nbf claims. Requires --ws-auth signed-bearer-token.--ws-shared-secret-fileabsolute path--ws-auth signed-bearer-token.--ws-token-fileabsolute path--ws-auth capability-token unless you provide --ws-token-sha256 instead.--ws-token-sha256hexadecimal SHA-256 digest--ws-token-file when the client token comes from another source.codex app-server --listen stdio://는 stdio로 JSONL을 주고받는 기본 동작을 유지하며, codex app-server --stdio도 같은 전송 방식을 지정합니다. --listen ws://IP:PORT는 App Server 클라이언트용 WebSocket 전송을 활성화합니다. 서버는 수신 URL로 ws://를 받습니다. 클라이언트가 wss://로 연결할 때는 TLS 종료 처리나 보안 프록시를 사용하세요. --listen unix://를 사용하면 Codex의 기본 Unix 소켓에서 WebSocket 핸드셰이크를 수락합니다. 소켓 경로를 직접 지정하려면 --listen unix:///absolute/path.sock를 사용하세요. 클라이언트 바인딩용 스키마를 생성할 때 제한된 필드와 메서드까지 포함하려면 --experimental을 추가하세요.
--code-mode-host https://code-mode.example.com을 사용하면 App Server 프로세스의 모든 스레드가 gRPC를 통해 원격 Code Mode 호스트에 연결됩니다. --listen은 클라이언트가 App Server에 연결하는 방식을 지정합니다.
codex remote-control
codex remote-control을 실행하면 조건을 충족하는 경우 관리형 백그라운드 서버를 통해 원격 제어를 시작하고, 그렇지 않으면 포그라운드에서 실행합니다. 포그라운드 실행을 명시하려면 codex remote-control --no-daemon을 사용하세요. codex remote-control start는 원격 제어를 활성화한 상태로 로컬 App Server 데몬을 시작하고, codex remote-control stop은 데몬을 중지합니다. 관리형 원격 제어 클라이언트와 SSH 원격 워크플로우에서 이 명령어들을 사용합니다. 로컬 프로토콜 클라이언트를 개발할 때는 codex app-server --listen을 사용하세요.
데몬을 시작한 뒤 codex remote-control pair를 실행하면 유효 시간이 짧은 수동 페어링 코드를 생성해 출력합니다. 원격 제어 명령어에 --json을 추가하면 기계가 읽을 수 있는 형식으로 출력합니다. pair의 JSON 응답에는 pairingCode, manualPairingCode, environmentId, expiresAt이 포함됩니다. --no-daemon은 하위 명령어 없이 remote-control을 실행할 때만 적용됩니다. start, stop, pair와 함께 사용하지 마세요.
codex app
macOS 또는 Windows의 터미널에서 ChatGPT 데스크톱 앱을 시작합니다. macOS에서는 Codex가 지정한 워크스페이스 경로를 열 수 있고, Windows에서는 열어야 할 경로를 출력합니다.
| Key | Type / Values | Details |
|---|---|---|
--download-url | url | Advanced override for the ChatGPT desktop app installer URL used during install. |
PATH | path | Workspace path for the ChatGPT desktop app. On macOS, Codex opens this path; on Windows, Codex prints the path. |
--download-urlurlPATHpathcodex app은 설치된 ChatGPT 데스크톱 앱을 엽니다. 앱이 없으면 설치 프로그램을 시작합니다. macOS에서는 지정한 워크스페이스 경로를 열고, Windows에서는 설치 후 열어야 할 경로를 출력합니다.
codex debug app-server send-message-v2
내장 App Server 테스트 클라이언트로 App Server의 V2 스레드/턴 플로우를 통해 메시지 하나를 보냅니다.
| Key | Type / Values | Details |
|---|---|---|
USER_MESSAGE | string | Message text sent to app-server through the built-in V2 test-client flow. |
USER_MESSAGEstring이 디버그 플로우는 experimentalApi: true로 초기화한 뒤 스레드를 시작하고 턴을 전송하며 서버 알림을 스트리밍합니다. App Server 프로토콜의 동작을 로컬에서 재현하고 확인할 때 사용하세요.
codex debug models
Codex가 인식하는 모델 카탈로그의 원본 데이터를 JSON으로 출력합니다.
| Key | Type / Values | Details |
|---|---|---|
--bundled | boolean | Skip refresh and print only the model catalog bundled with the current Codex binary. |
--bundledboolean원격 모델 엔드포인트에서 새 데이터를 가져오지 않고 현재 바이너리에 포함된 카탈로그만 확인하려면 --bundled를 사용하세요.
codex debug prompt-input
모델에 전달되는 프롬프트 입력 목록을 그대로 JSON으로 출력합니다. 지침을 찾는 과정, 세션 컨텍스트 또는 프롬프트 구성을 디버깅할 때 사용하세요.
| Key | Type / Values | Details |
|---|---|---|
--image, -i | path[,path...] | Attach one or more images to the user prompt. Separate multiple paths with commas or repeat the flag. |
PROMPT | string | Optional user prompt appended after the session context. |
--image, -ipath[,path...]PROMPTstringcodex apply
Codex 클라우드 채팅의 최신 diff를 로컬 리포지터리에 적용합니다. 인증을 완료해야 하며 해당 채팅에 대한 접근 권한이 필요합니다.
| Key | Type / Values | Details |
|---|---|---|
TASK_ID | string | Identifier of the Codex cloud chat whose diff should be applied. |
TASK_IDstringCodex는 패치가 적용된 파일을 출력합니다. 충돌 등의 이유로 git apply가 실패하면 0이 아닌 종료 코드를 반환합니다.
codex review
비대화형으로 코드 리뷰를 실행합니다. 리뷰 대상을 정확히 하나 선택하거나 사용자 지정 리뷰 지침을 프롬프트로 전달하세요.
| Key | Type / Values | Details |
|---|---|---|
--base | branch | Review changes against the specified base branch. |
--commit | SHA | Review the changes introduced by the specified commit. |
--strict-config | boolean | Error when config.toml contains fields this Codex version does not recognize. |
--title | string | Set the commit title shown in the review summary. Requires --commit. |
--uncommitted | boolean | Review staged, unstaged, and untracked changes. |
PROMPT | string | - (read stdin) | Custom review instructions. Use - to read the instructions from stdin. |
--basebranch--commitSHA--strict-configbooleanconfig.toml contains fields this Codex version does not recognize.--titlestring--commit.--uncommittedbooleanPROMPTstring | - (read stdin)- to read the instructions from stdin.--uncommitted, --base, --commit, 사용자 지정 PROMPT는 서로 함께 사용할 수 없습니다. --title은 --commit과 함께 사용할 때만 지정하세요.
codex archive 및 codex unarchive
세션 ID나 이름으로 저장된 대화형 세션을 보관하거나 복원합니다. 채팅 기록을 삭제하지 않고 세션 선택 목록을 정리하려면 이 명령어를 사용하세요. 세션 ID가 세션 이름보다 우선합니다.
세션을 보관하거나 복원하면 Codex는 해당 세션이 생성한 하위 에이전트 세션과 그 아래에서 파생된 모든 세션도 함께 보관하거나 복원하려고 시도합니다.
codex archive <SESSION>
codex unarchive <SESSION>| Key | Type / Values | Details |
|---|---|---|
--remote | ws://host:port | wss://host:port | unix:// | unix://PATH | Connect to a remote app-server endpoint before changing archive state. |
--remote-auth-token-env | ENV_VAR | Read a bearer token from this environment variable when --remote requires authentication. |
SESSION | session ID | session name | Saved session to archive or restore. Session IDs take precedence over session names. |
--remotews://host:port | wss://host:port | unix:// | unix://PATH--remote-auth-token-envENV_VAR--remote requires authentication.SESSIONsession ID | session namecodex delete
세션 ID나 이름으로 저장된 대화형 세션을 영구 삭제합니다. 활성 세션 목록에서 숨기는 것만으로는 부족하고 채팅 기록까지 삭제하려는 경우에만 사용하세요.
codex delete <SESSION>
codex delete <SESSION_UUID> --force| Key | Type / Values | Details |
|---|---|---|
--force | boolean | Delete without prompting. The session argument must be a UUID; names still require interactive confirmation. |
--remote | ws://host:port | wss://host:port | unix:// | unix://PATH | Connect to a remote app-server endpoint before deleting the session. |
--remote-auth-token-env | ENV_VAR | Read a bearer token from this environment variable when --remote requires authentication. |
SESSION | session ID | session name | Saved session to delete. Session IDs take precedence over session names. |
--forceboolean--remotews://host:port | wss://host:port | unix:// | unix://PATH--remote-auth-token-envENV_VAR--remote requires authentication.SESSIONsession ID | session name--force는 세션 UUID와 함께 사용할 때만 지정하세요. 이름으로 세션을 지정하면 Codex가 여전히 확인을 요청합니다. 이름이 중복되거나 모호한 세션을 확인 없이 삭제하지 않도록 하기 위해서입니다.
codex cloud
터미널에서 Codex 클라우드 채팅을 사용합니다. 기본 명령어는 대화형 선택 메뉴를 엽니다. codex cloud exec는 작업을 바로 제출하고, codex cloud list는 최근 채팅 목록을 반환하므로 스크립트에서 사용하거나 채팅을 빠르게 확인할 수 있습니다.
| Key | Type / Values | Details |
|---|---|---|
--attempts | 1-4 | Number of assistant attempts (best-of-N) Codex cloud should run. |
--env | ENV_ID | Target Codex cloud environment identifier (required). Use codex cloud to list options. |
QUERY | string | Task prompt. If omitted, Codex prompts interactively for details. |
--attempts1-4--envENV_IDcodex cloud to list options.QUERYstring인증에는 기본 CLI와 같은 자격 증명을 사용합니다. 작업 제출에 실패하면 Codex는 0이 아닌 종료 코드를 반환합니다.
codex cloud list
최근 클라우드 채팅 목록을 표시합니다. 필요에 따라 필터링과 페이지 나누기를 사용할 수 있습니다.
| Key | Type / Values | Details |
|---|---|---|
--cursor | string | Pagination cursor returned by a previous request. |
--env | ENV_ID | Filter tasks by environment identifier. |
--json | boolean | Emit machine-readable JSON instead of plain text. |
--limit | 1-20 | Maximum number of tasks to return. |
--cursorstring--envENV_ID--jsonboolean--limit1-20일반 텍스트 출력에는 작업 URL과 상태 세부 정보가 차례로 표시됩니다. 자동화에는 --json을 사용하세요. JSON 페이로드에는 tasks 배열이 포함되며 cursor 값이 추가될 수 있습니다. 각 작업에는 id, url, title, status, updated_at, environment_id, environment_label, summary, is_review, attempt_total이 포함됩니다.
codex completion
셸 자동 완성 스크립트를 생성하고 출력을 적절한 위치로 리디렉션하세요. 예를 들어 codex completion zsh > "${fpath[1]}/_codex"를 실행합니다.
| Key | Type / Values | Details |
|---|---|---|
SHELL | bash | zsh | fish | power-shell | elvish | Shell to generate completions for. Output prints to stdout. |
SHELLbash | zsh | fish | power-shell | elvishcodex doctor
지원팀에 문제를 신고하기 전이나 설치된 Codex가 제대로 작동하지 않는 원인을 조사할 때 로컬 진단 보고서를 생성합니다. 설치, 설정, 인증, 런타임, Git, 터미널, App Server 및 스레드 목록의 상태를 점검합니다.
| Key | Type / Values | Details |
|---|---|---|
--all | boolean | Expand long lists in the detailed human-readable report. |
--ascii | boolean | Use ASCII status labels and separators in human-readable output. |
--json | boolean | Emit a redacted machine-readable support report. |
--network-only | boolean | Limit checks to configuration, the network environment, provider HTTP connectivity, and Responses WebSocket connectivity. |
--no-color | boolean | Disable ANSI color in human-readable output. |
--summary | boolean | Show grouped check rows and the final count summary only. |
--allboolean--asciiboolean--jsonboolean--network-onlyboolean--no-colorboolean--summarybooleancodex features
$CODEX_HOME/config.toml에 저장된 기능 플래그를 관리합니다. enable과 disable 명령어는 변경 사항을 저장해 이후 세션에도 적용합니다. features 하위 명령어는 --profile을 지원하지 않습니다.
| Key | Type / Values | Details |
|---|---|---|
Disable subcommand | codex features disable <feature> | Persistently disable a feature flag in $CODEX_HOME/config.toml. |
Enable subcommand | codex features enable <feature> | Persistently enable a feature flag in $CODEX_HOME/config.toml. |
List subcommand | codex features list | Show known feature flags, their maturity stage, and their effective state. |
Disable subcommandcodex features disable <feature>$CODEX_HOME/config.toml.Enable subcommandcodex features enable <feature>$CODEX_HOME/config.toml.List subcommandcodex features listcodex exec
사용자 개입 없이 완료해야 하는 스크립트나 CI 작업에는 codex exec(축약형 codex e)를 사용하세요.
| Key | Type / Values | Details |
|---|---|---|
--approve-for-me, --not-so-yolo | boolean | Use automatic approval review with on-request approvals and the workspace-write sandbox. Conflicts with --sandbox and --yolo; the interactive CLI also rejects --ask-for-approval. |
--cd, -C | path | Set the workspace root before executing the task. |
--color | always | never | auto | Control ANSI color in stdout. |
--cyber-access-program | standard | daybreak_blue | daybreak_red | Request a cyber access program for this turn (experimental, OpenAI provider only). Requires access for the account and model. Unavailable with review. A fork requires a prompt. |
--dangerously-bypass-approvals-and-sandbox, --yolo | boolean | Bypass approval prompts and sandboxing. Dangerous—only use inside an isolated runner. |
--dangerously-bypass-hook-trust | boolean | Run enabled hooks without requiring persisted hook trust for this invocation. Intended only for automation that already vets hook sources. |
--ephemeral | boolean | Run without persisting session rollout files to disk. |
--ignore-rules | boolean | Do not load user or project execpolicy .rules files for this run. |
--ignore-user-config | boolean | Do not load $CODEX_HOME/config.toml. Authentication still uses CODEX_HOME. |
--image, -i | path[,path...] | Attach images to the first message. Repeatable; supports comma-separated lists. |
--json, --experimental-json | boolean | Print newline-delimited JSON events instead of formatted text. |
--local-provider | lmstudio | ollama | Choose the local provider used with --oss, overriding oss_provider for this run. |
--model, -m | string | Override the configured model for this run. |
--oss | boolean | Use a local open source provider. Codex uses --local-provider or your configured oss_provider, and exits with an error if neither is set. |
--output-last-message, -o | path | Write the assistant’s final message to a file. Useful for downstream scripting. |
--output-schema | path | Path to a JSON Schema for the model's final response. |
--profile, -p | string | Layer $CODEX_HOME/profile-name.config.toml on top of the base user config. |
--sandbox, -s | read-only | workspace-write | danger-full-access | Sandbox policy for model-generated commands. Defaults to configuration. |
--skip-git-repo-check | boolean | Allow running outside a Git repository (useful for one-off directories). |
--thread-source | SOURCE | Set the source label for a new or forked thread. Resuming a thread keeps its original label. |
--worktree | boolean | Run a new or forked session in a managed Git worktree. Requires local execution; can't be combined with resume, review, --ephemeral, or --ignore-user-config. |
-c, --config | key=value | Inline configuration override for the non-interactive run (repeatable). |
PROMPT | string | - (read stdin) | Initial instruction for the task. Use - to pipe the prompt from stdin. |
Resume subcommand | codex exec resume [SESSION_ID] | Resume an exec session by ID or add --last to continue the most recent session from the current working directory. Add --all to consider sessions from any directory. Accepts an optional follow-up prompt. |
--approve-for-me, --not-so-yolobooleanon-request approvals and the workspace-write sandbox. Conflicts with --sandbox and --yolo; the interactive CLI also rejects --ask-for-approval.--cd, -Cpath--coloralways | never | auto--cyber-access-programstandard | daybreak_blue | daybreak_red--dangerously-bypass-approvals-and-sandbox, --yoloboolean--dangerously-bypass-hook-trustboolean--ephemeralboolean--ignore-rulesboolean.rules files for this run.--ignore-user-configboolean$CODEX_HOME/config.toml. Authentication still uses CODEX_HOME.--image, -ipath[,path...]--json, --experimental-jsonboolean--local-providerlmstudio | ollama--oss, overriding oss_provider for this run.--model, -mstring--ossboolean--local-provider or your configured oss_provider, and exits with an error if neither is set.--output-last-message, -opath--output-schemapath--profile, -pstring$CODEX_HOME/profile-name.config.toml on top of the base user config.--sandbox, -sread-only | workspace-write | danger-full-access--skip-git-repo-checkboolean--thread-sourceSOURCE--worktreebooleanresume, review, --ephemeral, or --ignore-user-config.-c, --configkey=valuePROMPTstring | - (read stdin)- to pipe the prompt from stdin.Resume subcommandcodex exec resume [SESSION_ID]--last to continue the most recent session from the current working directory. Add --all to consider sessions from any directory. Accepts an optional follow-up prompt.Codex는 기본적으로 서식이 적용된 결과를 출력합니다. --json을 추가하면 상태가 바뀔 때마다 JSON 이벤트를 한 줄씩 출력합니다. 선택적 하위 명령어인 resume으로 비대화형 작업을 이어갈 수 있습니다. --last를 사용하면 현재 작업 디렉터리에서 가장 최근 세션을 선택합니다. 모든 세션을 대상으로 검색하려면 --all을 추가하세요.
| Key | Type / Values | Details |
|---|---|---|
--all | boolean | Include sessions outside the current working directory when selecting the most recent session. |
--image, -i | path[,path...] | Attach one or more images to the follow-up prompt. Separate multiple paths with commas or repeat the flag. |
--last | boolean | Resume the most recent chat from the current working directory. |
PROMPT | string | - (read stdin) | Optional follow-up instruction sent immediately after resuming. |
SESSION_ID | uuid | session name | Resume the specified session. Omit and use --last to continue the most recent session. |
--allboolean--image, -ipath[,path...]--lastbooleanPROMPTstring | - (read stdin)SESSION_IDuuid | session name--last to continue the most recent session.codex exec fork <SESSION_ID> [PROMPT]를 사용하면 저장된 세션을 새 세션으로 복사합니다. 세션 인수에는 UUID나 이름을 지정할 수 있습니다. 프롬프트를 생략하면 Codex가 세션을 포크하되 턴을 시작하지 않습니다. 프롬프트로 -를 전달하면 표준 입력에서 프롬프트를 읽습니다. 이미지를 첨부하려면 --image를 추가하세요.
이미지를 첨부하거나 --output-schema, --output-last-message, --ephemeral을 사용할 때는 프롬프트가 필요합니다.
새로 시작하거나 포크해서 실행할 때 --worktree를 추가하면 관리형 Git 작업 트리를 생성합니다.
codex exec --worktree "implement the next step"
codex exec fork <SESSION_ID> --worktree "try an alternative approach"--worktree는 로컬 실행에서만 사용할 수 있습니다. resume, review, --ephemeral, --ignore-user-config와 함께 사용하지 마세요.
codex execpolicy
execpolicy 규칙 파일을 저장하기 전에 검사하세요. codex execpolicy check에는 --rules 플래그를 하나 이상 전달할 수 있습니다(예: ~/.codex/rules 아래의 파일). 결과는 JSON으로 출력되며, 가장 엄격한 결정과 일치하는 규칙을 보여 줍니다. 읽기 쉽게 출력하려면 --pretty를 추가하세요. execpolicy 명령어는 현재 프리뷰 단계입니다.
| Key | Type / Values | Details |
|---|---|---|
--pretty | boolean | Pretty-print the JSON result. |
--rules, -r | path (repeatable) | Path to an execpolicy rule file to evaluate. Provide multiple flags to combine rules across files. |
COMMAND... | var-args | Command to be checked against the specified policies. |
--prettyboolean--rules, -rpath (repeatable)COMMAND...var-argscodex login
ChatGPT 계정, API 키 또는 액세스 토큰으로 CLI를 인증합니다. 플래그 없이 실행하면 Codex가 브라우저를 열어 ChatGPT OAuth 플로우를 시작합니다.
| Key | Type / Values | Details |
|---|---|---|
--device-auth | boolean | Use OAuth device code flow instead of launching a browser window. |
--with-access-token | boolean | Read an access token from stdin (for example printenv CODEX_ACCESS_TOKEN | codex login --with-access-token). |
--with-api-key | boolean | Read an API key from stdin (for example printenv OPENAI_API_KEY | codex login --with-api-key). |
status subcommand | codex login status | Print the active authentication mode and exit with 0 when logged in. |
--device-authboolean--with-access-tokenbooleanprintenv CODEX_ACCESS_TOKEN | codex login --with-access-token).--with-api-keybooleanprintenv OPENAI_API_KEY | codex login --with-api-key).status subcommandcodex login statuscodex login status는 자격 증명이 있으면 종료 코드 0을 반환하므로 자동화 스크립트에서 인증 상태를 확인할 때 유용합니다.
codex logout
API 키 인증과 ChatGPT 인증에 사용하도록 저장된 자격 증명을 모두 제거합니다. 이 명령어에는 플래그가 없습니다.
codex mcp
~/.codex/config.toml에 저장된 Model Context Protocol 서버 항목을 관리합니다.
| Key | Type / Values | Details |
|---|---|---|
add <name> | -- <command...> | --url <value> | Register a server using a stdio launcher command or a streamable HTTP URL. Supports --env KEY=VALUE for stdio transports. |
get <name> | --json | Show a specific server configuration. --json prints the raw config entry. |
list | --json | List configured MCP servers. Add --json for machine-readable output. |
login <name> | [--scopes scope1,scope2] [--no-browser] [--oauth-client-registration auto|cimd|dcr] | Sign in to a streamable HTTP server that supports OAuth. With --no-browser, open the printed URL in a browser and paste the full redirect URL into the CLI. |
logout <name> | Remove stored OAuth credentials for a streamable HTTP server. | |
remove <name> | Delete a stored MCP server definition. |
add <name>-- <command...> | --url <value>--env KEY=VALUE for stdio transports.get <name>--json--json prints the raw config entry.list--json--json for machine-readable output.login <name>[--scopes scope1,scope2] [--no-browser] [--oauth-client-registration auto|cimd|dcr]--no-browser, open the printed URL in a browser and paste the full redirect URL into the CLI.logout <name>remove <name>add 하위 명령어는 stdio와 스트리밍 가능한 HTTP 전송 방식을 모두 지원합니다.
| Key | Type / Values | Details |
|---|---|---|
--bearer-token-env-var | ENV_VAR | Environment variable whose value is sent as a bearer token when connecting to a streamable HTTP server. |
--env KEY=VALUE | repeatable | Environment variable assignments applied when launching a stdio server. |
--oauth-client-id | CLIENT_ID | OAuth client identifier for a streamable HTTP MCP server. Requires --url. |
--oauth-resource | RESOURCE | OAuth resource parameter to include during login for a streamable HTTP MCP server. Requires --url. |
--url | https://… | Register a streamable HTTP server instead of stdio. Mutually exclusive with COMMAND.... |
COMMAND... | stdio transport | Executable plus arguments to launch the MCP server. Provide after --. |
--bearer-token-env-varENV_VAR--env KEY=VALUErepeatable--oauth-client-idCLIENT_ID--url.--oauth-resourceRESOURCE--url.--urlhttps://…COMMAND....COMMAND...stdio transport--.OAuth 작업(login, logout)은 스트리밍 가능한 HTTP 서버에서만 작동하며, 해당 서버가 OAuth를 지원해야 합니다.
codex plugin
설정된 마켓플레이스의 플러그인을 설치하거나 목록을 조회하거나 제거합니다.
| Key | Type / Values | Details |
|---|---|---|
add <plugin[@marketplace]> | [--marketplace, -m NAME] [--json] | Install a plugin from a configured marketplace. Use --marketplace or -m when the plugin argument omits @marketplace. |
list | [--marketplace, -m NAME] [--available --json] [--json] | List installed plugins. With --json, output has installed and available arrays; --available includes uninstalled marketplace plugins and requires --json. |
marketplace | Manage configured marketplace sources. See codex plugin marketplace below. | |
remove <plugin[@marketplace]> | [--marketplace, -m NAME] [--json] | Remove an installed plugin from local config and cache. Use --json for automation-friendly output. |
add <plugin[@marketplace]>[--marketplace, -m NAME] [--json]--marketplace or -m when the plugin argument omits @marketplace.list[--marketplace, -m NAME] [--available --json] [--json]--json, output has installed and available arrays; --available includes uninstalled marketplace plugins and requires --json.marketplacecodex plugin marketplace below.remove <plugin[@marketplace]>[--marketplace, -m NAME] [--json]--json for automation-friendly output.codex plugin add --json은 pluginId, name, marketplaceName, version, installedPath, authPolicy를 출력합니다. codex plugin list --json은 installed와 available 배열을 출력합니다. 각 항목에는 pluginId, name, marketplaceName, version, installed, enabled, source, installPolicy, authPolicy가 포함됩니다. 마켓플레이스 소스 정보가 있으면 marketplaceSource에 설정된 소스 유형과 값도 포함됩니다. codex plugin remove --json은 pluginId, name, marketplaceName을 출력합니다.
codex plugin marketplace
Codex가 플러그인을 탐색하고 설치할 수 있는 마켓플레이스 소스를 관리합니다.
| Key | Type / Values | Details |
|---|---|---|
add <source> | [--ref REF] [--sparse PATH] [--json] | Install a plugin marketplace from GitHub shorthand, a Git URL, an SSH URL, or a local marketplace root directory. --sparse is supported only for Git sources and can be repeated. |
list | [--json] | Show plugin marketplaces Codex is currently considering and the root path for each marketplace. |
remove <marketplace-name> | [--json] | Remove a configured plugin marketplace. |
upgrade [marketplace-name] | [--json] | Refresh one configured Git marketplace, or all configured Git marketplaces when no name is provided. |
add <source>[--ref REF] [--sparse PATH] [--json]--sparse is supported only for Git sources and can be repeated.list[--json]remove <marketplace-name>[--json]upgrade [marketplace-name][--json]codex plugin marketplace add에는 owner/repo 또는 owner/repo@ref 같은 GitHub 축약 표기, HTTP 또는 HTTPS Git URL, SSH Git URL, 로컬 마켓플레이스 루트 디렉터리를 지정할 수 있습니다. Git ref를 고정하려면 --ref를 사용하세요. --sparse PATH를 경로마다 지정하면 Git 기반 마켓플레이스 리포지터리에서 희소 체크아웃을 사용할 수 있습니다.
codex plugin marketplace list는 현재 범위에 있는 마켓플레이스의 이름과 루트를 출력합니다. 자동으로 발견된 기본 마켓플레이스와 설정된 마켓플레이스 스냅샷도 포함합니다.
마켓플레이스 추가, 목록 조회, 업그레이드, 제거 명령어에 --json을 추가하면 자동화에 적합한 형식으로 출력합니다. 추가 결과에는 marketplaceName, installedRoot, alreadyAdded가 포함됩니다. 목록 조회 결과에는 marketplaces 배열이 있으며 각 항목에는 name, root, 선택적 필드인 marketplaceSource가 포함됩니다. 업그레이드 결과에는 selectedMarketplaces, upgradedRoots, errors가, 제거 결과에는 marketplaceName과 installedRoot가 포함됩니다.
codex mcp-server
codex mcp-server 명령어와 독립 실행형 codex-mcp-server 바이너리는 제거되었습니다. 대신 Codex App Server를 사용하세요.
codex resume
ID로 대화형 세션을 이어가거나 가장 최근 채팅을 재개합니다. codex resume에서 --last의 검색 범위는 현재 작업 디렉터리이며, --all을 전달하면 모든 세션을 검색합니다. 모델과 샌드박스 설정은 재정의할 수 있지만 --worktree는 지원하지 않습니다.
현재 작업 디렉터리가 세션에 저장된 디렉터리와 다르면 Codex가 어느 디렉터리를 사용할지 묻습니다. tui.resume_cwd를 "current" 또는 "session"으로 설정하면 매번 묻지 않고 해당 선택을 적용합니다. --cd(-C)로 직접 지정한 값은 tui.resume_cwd보다 우선합니다.
| Key | Type / Values | Details |
|---|---|---|
--all | boolean | Include sessions outside the current working directory when selecting the most recent session. |
--include-non-interactive | boolean | Include non-interactive sessions in the picker and --last selection. |
--last | boolean | Skip the picker and resume the most recent chat from the current working directory. |
SESSION_ID | uuid | session name | Resume the specified session. Omit and use --last to continue the most recent session. |
--allboolean--include-non-interactiveboolean--last selection.--lastbooleanSESSION_IDuuid | session name--last to continue the most recent session.codex fork
이전 대화형 세션을 새 채팅으로 포크합니다. 기본적으로 codex fork는 세션 선택 메뉴를 엽니다. 현재 디렉터리에서 가장 최근 세션을 포크하려면 --last를 사용하세요. 모든 디렉터리를 통틀어 가장 최근 세션을 포크하려면 --last --all을 사용하세요.
현재 작업 디렉터리가 세션에 저장된 디렉터리와 다르면 codex fork는 동일한 디렉터리 선택 메시지를 표시하고 tui.resume_cwd 설정을 적용합니다. 이는 codex resume과 같은 동작입니다.
| Key | Type / Values | Details |
|---|---|---|
--all | boolean | Show sessions beyond the current working directory in the picker. |
--last | boolean | Skip the picker and fork the most recent chat automatically. |
SESSION_ID | uuid | Fork the specified session. Omit and use --last to fork the most recent session. |
--allboolean--lastbooleanSESSION_IDuuid--last to fork the most recent session.관리형 Git 작업 트리로 포크하려면 codex fork <SESSION_ID> --worktree를 실행하세요. 로컬에서 실행해야 하며 세션 ID를 직접 지정해야 합니다. --last와 세션 선택 메뉴는 지원하지 않습니다.
codex sandbox
샌드박스 도우미를 사용하면 Codex가 내부적으로 사용하는 정책을 그대로 적용해 명령어를 실행할 수 있습니다.
macOS seatbelt
| Key | Type / Values | Details |
|---|---|---|
--allow-unix-socket | path | Allow the sandboxed command to bind or connect Unix sockets rooted at this path. Repeat to allow multiple paths. |
--cd, -C | DIR | Working directory used for profile resolution and command execution. Requires --permission-profile. |
--config, -c | key=value | Pass configuration overrides into the sandboxed run (repeatable). |
--include-managed-config | boolean | Include managed requirements while resolving an explicit permissions profile. Requires --permission-profile. |
--log-denials | boolean | Capture macOS sandbox denials with log stream while the command runs and print them after exit. |
--permission-profile, -P | NAME | Apply a named permissions profile from the active configuration stack. |
--profile, -p | NAME | Layer $CODEX_HOME/NAME.config.toml on top of the base user config. |
COMMAND... | var-args | Shell command to execute under macOS Seatbelt. Everything after -- is forwarded. |
--allow-unix-socketpath--cd, -CDIR--permission-profile.--config, -ckey=value--include-managed-configboolean--permission-profile.--log-denialsbooleanlog stream while the command runs and print them after exit.--permission-profile, -PNAME--profile, -pNAME$CODEX_HOME/NAME.config.toml on top of the base user config.COMMAND...var-args-- is forwarded.Linux 샌드박스
| Key | Type / Values | Details |
|---|---|---|
--cd, -C | DIR | Working directory used for profile resolution and command execution. Requires --permission-profile. |
--config, -c | key=value | Configuration overrides applied before launching the sandbox (repeatable). |
--include-managed-config | boolean | Include managed requirements while resolving an explicit permissions profile. Requires --permission-profile. |
--permission-profile, -P | NAME | Apply a named permissions profile from the active configuration stack. |
--profile, -p | NAME | Layer $CODEX_HOME/NAME.config.toml on top of the base user config. |
COMMAND... | var-args | Command to execute with bubblewrap filesystem isolation and seccomp filtering. Provide the executable after --. |
--cd, -CDIR--permission-profile.--config, -ckey=value--include-managed-configboolean--permission-profile.--permission-profile, -PNAME--profile, -pNAME$CODEX_HOME/NAME.config.toml on top of the base user config.COMMAND...var-args--.Windows
| Key | Type / Values | Details |
|---|---|---|
--cd, -C | DIR | Working directory used for profile resolution and command execution. Requires --permission-profile. |
--config, -c | key=value | Configuration overrides applied before launching the sandbox (repeatable). |
--include-managed-config | boolean | Include managed requirements while resolving an explicit permissions profile. Requires --permission-profile. |
--permission-profile, -P | NAME | Apply a named permissions profile from the active configuration stack. |
--profile, -p | NAME | Layer $CODEX_HOME/NAME.config.toml on top of the base user config. |
COMMAND... | var-args | Command to execute under the native Windows sandbox. Provide the executable after --. |
--cd, -CDIR--permission-profile.--config, -ckey=value--include-managed-configboolean--permission-profile.--permission-profile, -PNAME--profile, -pNAME$CODEX_HOME/NAME.config.toml on top of the base user config.COMMAND...var-args--.기존 Windows 샌드박스를 제거하기 전에 먼저 해당 샌드박스를 사용하는 앱을 중지하세요. 샌드박스 프로비저닝 서비스가 설치되어 있으면 이 서비스도 중지하세요. 그런 다음 관리자 권한으로 codex sandbox uninstall을 실행하세요. 이 명령어는 컴퓨터 전체에 적용되는 샌드박스 계정과 네트워크 규칙을 제거합니다. 샌드박스 디렉터리와 파일 시스템 권한을 포함한 Codex 홈은 유지됩니다.
codex update
설치된 릴리스가 자체 업데이트를 지원하면 Codex CLI 업데이트를 확인하고 적용합니다. 디버그 빌드에서는 릴리스 빌드를 설치하라는 메시지가 표시됩니다.
플래그 조합과 안전한 사용법
- 워크스페이스 안에서 완료할 수 있는 무인 로컬 작업에는
--sandbox workspace-write를 사용하세요. 전용 샌드박스 VM 안에서 실행하는 경우가 아니라면--dangerously-bypass-approvals-and-sandbox는 피하세요. - Codex에 다른 디렉터리의 쓰기 권한을 부여해야 한다면
--add-dir를 우선 사용하세요.--sandbox danger-full-access를 강제로 적용할 필요가 없습니다. - CI에서
--json과--output-last-message를 함께 사용하면 기계가 읽을 수 있는 진행 정보와 자연어로 작성된 최종 요약을 모두 수집할 수 있습니다.
대화형 단축키
@를 입력하면 워크스페이스에서 파일을 검색해 해당 경로를 프롬프트에 추가할 수 있습니다.- 위쪽 화살표 또는 아래쪽 화살표를 누르면 이전에 작성한 초안을 불러옵니다.
- Ctrl+R을 눌러 프롬프트 기록을 검색한 뒤, Enter를 눌러 검색 결과를 사용하거나 Escape를 눌러 취소하세요.
- Ctrl+ O 를 누르면 마지막으로 완료된 응답을 복사합니다. 복사할 내용을 선택하려면
/copy를 실행하세요. - 줄 맨 앞에
!를 입력하면 현재 승인 및 샌드박스 설정에 따라 로컬 셸 명령어를 실행합니다. - Codex가 작업 중일 때 Tab을 누르면 후속 프롬프트, 슬래시 명령어 또는 셸 명령어가 다음 턴의 대기열에 추가됩니다.
- Codex가 작업 중일 때 Enter를 누르면 현재 턴에 새 지침을 전달합니다.
- Composer가 비어 있을 때 Escape를 두 번 누르면 이전 사용자 메시지를 편집하고 그 지점에서 채팅을 포크할 수 있습니다.
- Ctrl+C를 누르거나
/exit를 실행하면 세션이 종료됩니다.
관련 자료
- Codex CLI 개요에서 설치, 업그레이드 및 간단한 사용 팁을 확인하세요.
- 설정 기초에서는 모델과 제공자 등의 기본값을 저장하는 방법을 설명합니다.
- 고급 설정에서는 프로필, 제공자, 샌드박스 조정 및 통합을 다룹니다.
- AGENTS.md에서 Codex 에이전트의 기능과 권장 사용법을 살펴보세요.
슬래시 명령어를 사용하면 키보드로 Codex를 빠르게 제어할 수 있습니다. Composer에 /를 입력해 슬래시 명령어 팝업을 열고 명령어를 선택하세요. 터미널에서 바로 모델을 바꾸거나 권한을 조정하거나 긴 채팅을 요약할 수 있습니다.
이 가이드에서는 다음 방법을 설명합니다.
- 작업에 적합한 내장 슬래시 명령어 찾기
/model,/fast,/permissions,/approve,/raw,/agents,/subagents,/status등의 명령어로 활성 세션 제어하기
내장 슬래시 명령어
Codex는 다음 명령어를 기본 제공합니다. 슬래시 명령어 팝업을 열고 명령어 이름을 입력하면 목록이 좁혀집니다.
채팅이 이미 실행 중이라면 슬래시 명령어를 입력하고 Tab을 눌러 다음 턴의 대기열에 추가할 수 있습니다. Codex는 대기 중인 슬래시 명령어를 실행 시점에 해석하므로, 명령어 메뉴나 오류는 현재 턴이 끝난 뒤에 표시됩니다. 대기열에 추가하기 전에도 슬래시 명령어 자동 완성을 사용할 수 있습니다.
| 명령어 | 기능 | 사용 시점 |
|---|---|---|
/permissions |
Codex가 사전 확인 없이 수행할 수 있는 작업을 설정합니다. | 세션 도중 자동과 읽기 전용을 전환하는 등 승인 요건을 완화하거나 강화할 때 사용합니다. |
/ide |
열린 파일, 현재 선택 영역 등 IDE 컨텍스트를 포함합니다. | IDE에서 열어 둔 내용을 다시 설명하지 않고 다음 프롬프트에 편집기 컨텍스트를 추가할 때 사용합니다. |
/config |
터미널 설정을 검색하고 변경합니다. | 테마, 알림, 키보드 단축키 또는 텍스트 선택 방식을 조정할 때 사용합니다. |
/keymap |
TUI 키보드 단축키를 다시 지정합니다. | 사용자 지정 단축키를 확인하고 config.toml에 저장할 때 사용합니다. |
/vim |
Composer의 Vim 모드를 켜거나 끕니다. | Vim의 일반/삽입 모드와 Composer의 기본 편집 모드 간에 전환할 때 사용합니다. |
/setup-default-sandbox |
권한이 상승된 에이전트 샌드박스를 설정합니다(Windows 전용). | Codex가 권한 상승 설정을 제안하면 기능이 제한된 Windows 샌드박스를 교체할 때 사용합니다. |
/agents |
에이전트 명령 센터를 엽니다. | 연결된 서버의 채팅을 살펴보고 에이전트를 전환할 때 사용합니다. |
/subagents |
활성 하위 에이전트 스레드를 전환합니다. | 현재 세션에서 하위 에이전트의 작업을 확인하거나 이어갈 때 사용합니다. |
/apps |
앱(커넥터)을 탐색하고 프롬프트에 삽입합니다. | Codex에 앱 사용을 요청하기 전에 $app-slug 형식으로 앱을 첨부할 때 사용합니다. |
/plugins |
설치된 플러그인과 검색 가능한 플러그인을 살펴봅니다. | 플러그인 도구를 확인하거나 추천 플러그인을 설치하거나 플러그인 사용 가능 여부를 관리할 때 사용합니다. |
/hooks |
수명 주기 훅을 확인하고 관리합니다. | 설정된 훅을 확인하거나, 새 훅 또는 변경된 훅을 신뢰하도록 지정하거나, 관리형이 아닌 훅을 실행 전에 비활성화할 때 사용합니다. |
/clear |
터미널을 지우고 새 채팅을 시작합니다. | 처음부터 다시 시작하기 위해 화면과 채팅 컨텍스트를 함께 초기화할 때 사용합니다. |
/rename |
현재 채팅의 이름을 변경합니다. | TUI에서 바로 저장된 세션에 알아보기 쉬운 이름을 붙일 때 사용합니다. |
/archive |
현재 세션을 보관합니다. | 채팅 기록을 삭제하지 않고 현재 세션을 활성 세션 목록에서 제외할 때 사용합니다. |
/delete |
현재 세션을 영구 삭제합니다. | 보관만으로는 부족해 채팅 기록과 여기에서 파생된 세션까지 삭제할 때 사용합니다. |
/compact |
화면에 표시된 채팅을 요약해 토큰 공간을 확보합니다. | 긴 작업 후에 컨텍스트 윈도우 한도를 넘지 않으면서 핵심 내용을 유지할 때 사용합니다. |
/copy |
응답, 코드 블록 또는 인용문을 복사합니다. | 메뉴를 열지 않고 마지막으로 완료된 응답을 복사하려면 Ctrl+ O 를 누르세요. |
/diff |
Git이 아직 추적하지 않는 파일까지 포함해 Git diff를 표시합니다. | 커밋하거나 테스트를 실행하기 전에 Codex의 변경 사항을 검토할 때 사용합니다. |
/exit |
CLI를 종료합니다(/quit과 동일). |
두 명령어 중 어느 쪽을 사용해도 세션이 종료됩니다. |
/experimental |
실험 기능을 켜거나 끕니다. | 네트워크 프록시, 실행 중 절전 방지 등의 옵션을 활성화할 때 사용합니다. |
/approve |
자동 검토에서 최근 거부된 작업의 재시도를 한 번 승인합니다. | 자동 검토가 거부한 명령어나 작업을 다시 시도할 때 사용합니다. |
/memories |
메모리 사용과 생성을 설정합니다. | TUI에서 바로 메모리를 컨텍스트에 추가하거나 생성하는 기능을 켜고 끌 때 사용합니다. |
/skills |
스킬을 찾아 사용합니다. | 작업에 맞는 로컬 스킬을 선택해 Codex가 해당 작업을 더 잘 수행하도록 할 때 사용합니다. |
/import |
Claude Code 또는 Cursor의 설정, 프로젝트, 채팅을 가져옵니다. | 지원되는 외부 에이전트 데이터를 Codex 설정과 로컬 파일로 이전할 때 사용합니다. |
/feedback |
Codex 유지관리자에게 로그를 보냅니다. | 문제를 신고하거나 지원팀에 진단 정보를 공유할 때 사용합니다. |
/init |
현재 디렉터리에 AGENTS.md 기본 틀을 생성합니다. |
작업 중인 리포지터리나 하위 디렉터리에 계속 적용할 지침을 기록할 때 사용합니다. |
/logout |
Codex에서 로그아웃합니다. | 공유 컴퓨터에서 로컬 자격 증명을 지울 때 사용합니다. |
/mcp |
설정된 Model Context Protocol(MCP) 도구 목록을 표시합니다. | 세션에서 Codex가 호출할 수 있는 외부 도구를 확인할 때 사용합니다. 서버 세부 정보를 보려면 verbose를 추가하세요. |
/mention |
채팅에 파일을 첨부합니다. | Codex가 다음에 살펴볼 파일이나 폴더를 지정할 때 사용합니다. |
/model |
활성 모델을 선택하고, 지원되는 경우 추론 수준도 선택합니다. | 목록에 있으면 gpt-6-luna 또는 gpt-6.1-sol를 사용하세요. |
/presets |
프롬프트나 슬래시 명령어를 저장하고 실행합니다. | 자주 사용하는 명령어나 프롬프트를 다시 불러올 때 사용합니다. |
/fast |
모델 카탈로그에서 제공하는 경우 Fast 서비스 등급을 켜거나 끕니다. | 현재 모델의 Fast 등급을 켜거나 끄고 선택을 저장할 때 사용합니다. |
/daybreak |
계정과 모델이 사용 조건을 충족하면 Daybreak를 켜거나 끕니다. | 채팅에서 승인된 사이버 보안 액세스 프로그램을 사용할 때 사용합니다. |
/voice |
음성 대화가 지원되면 대화를 시작하거나 종료합니다. | 음성을 지원하는 터미널 빌드에서 Codex와 말로 대화할 때 사용합니다. |
/plan |
플랜 모드로 전환하고 필요하면 프롬프트도 보냅니다. | 구현을 시작하기 전에 Codex에 실행 계획을 제안하도록 요청할 때 사용합니다. |
/goal |
작업 목표를 설정, 수정, 일시 중지, 재개, 조회 또는 삭제합니다. | 규모가 큰 작업을 진행하는 동안 Codex가 계속 추적할 목표를 지정할 때 사용합니다. |
/ps |
백그라운드 터미널과 최근 출력을 표시합니다. | 기본 채팅 기록을 벗어나지 않고 장시간 실행되는 명령어를 확인할 때 사용합니다. |
/stop |
모든 백그라운드 터미널을 중지합니다. | 현재 세션이 시작한 백그라운드 터미널 작업을 취소할 때 사용합니다. |
/fork |
현재 채팅을 새 채팅으로 포크합니다. | 현재 기록을 유지하면서 활성 세션에서 분기해 새로운 접근 방식을 시도할 때 사용합니다. |
/app |
ChatGPT 데스크톱 앱에서 현재 세션을 이어갑니다. | macOS 또는 Windows에서 TUI에서 데스크톱 앱으로 이동할 때 사용합니다. |
/side, /btw |
임시 보조 채팅을 시작합니다. | 기본 채팅 기록에 영향을 주지 않고 특정 내용에 관해 후속 질문을 할 때 사용합니다. |
/raw |
원시 스크롤백 모드를 켜거나 끕니다. | 긴 출력을 검토할 때 터미널에서 서식의 영향을 덜 받으면서 텍스트를 선택하고 복사할 때 사용합니다. |
/resume |
세션 목록에서 저장된 채팅을 재개합니다. | 처음부터 다시 시작하지 않고 이전 CLI 세션의 작업을 이어갈 때 사용합니다. |
/new |
같은 CLI 세션 안에서 새 채팅을 시작합니다. | 같은 리포지터리에서 새 프롬프트로 시작하기 위해 CLI를 종료하지 않고 채팅 컨텍스트를 초기화할 때 사용합니다. |
/quit |
CLI를 종료합니다. | 세션을 즉시 종료할 때 사용합니다. |
/review |
Codex에 작업 트리 리뷰를 요청합니다. | Codex가 작업을 완료했거나 로컬 변경 사항을 한 번 더 검토하고 싶을 때 사용합니다. |
/status |
세션 설정과 토큰 사용량을 표시합니다. | 활성 모델, 승인 정책, 쓰기 가능한 루트, 남은 컨텍스트 용량을 확인할 때 사용합니다. |
/usage |
계정의 토큰 사용량을 조회하거나 요청 한도 초기화 기회를 사용합니다. | TUI에서 ChatGPT의 일별, 주별 또는 누적 토큰 사용 내역을 확인할 때 사용합니다. |
/debug-config |
설정 계층과 요구 사항에 대한 진단 정보를 출력합니다. | 실험적 네트워크 제약을 포함해 설정 우선순위와 정책 요구 사항을 디버깅할 때 사용합니다. |
/statusline |
TUI 상태 표시줄의 필드를 대화형으로 설정합니다. | 하단에 표시할 모델, 컨텍스트, 한도, Git, 토큰, 세션 항목을 선택하고 순서를 바꾼 뒤 config.toml에 저장할 때 사용합니다. |
/title |
터미널 창 또는 탭 제목의 필드를 대화형으로 설정합니다. | 프로젝트, 상태, 스레드, 브랜치, 모델, 작업 진행률 등의 제목 항목을 선택하고 순서를 바꿀 때 사용합니다. |
/theme |
구문 강조 테마를 선택합니다. | 터미널 구문 강조 테마를 미리 보고 저장할 때 사용합니다. |
/pets, /pet |
터미널 펫을 선택하거나 숨깁니다. | 내장 펫 또는 사용자 지정 펫을 표시해 TUI를 꾸밀 때 사용합니다. |
/tui |
다음 실행에 사용할 터미널 모드를 선택합니다. | 터미널 스크롤백과 전체 화면 채팅 기록 간에 전환할 때 사용합니다. |
/export |
대화를 Markdown으로 내보냅니다. | 전체 채팅 기록을 파일로 저장하거나 클립보드에 복사할 때 사용합니다. |
/recap |
현재 대화의 요약을 생성합니다. | 컨텍스트를 압축하지 않고 지금까지의 채팅 내용을 파악할 때 사용합니다. |
/cd |
세션의 작업 디렉터리를 변경합니다. | 대기 상태인 기본 채팅을 다른 디렉터리에서 이어갈 때 사용합니다. |
/pwd, /cwd |
작업 디렉터리를 표시합니다. | 활성 세션에서 사용하는 디렉터리를 확인할 때 사용합니다. |
/worktree |
관리형 Git 작업 트리에서 채팅을 시작하거나 이어갑니다. | 로컬 리포지터리를 별도로 체크아웃해 작업할 때 사용합니다. |
/daemon |
백그라운드 서버 제어 메뉴를 엽니다. | 연결을 확인하고 Codex가 소유한 로컬 서버를 관리할 때 사용합니다. |
/warnings |
보관된 경고와 진단 정보를 표시합니다. | 세션 중에 표시된 경고를 다시 확인할 때 사용합니다. |
/quit과 /exit는 모두 CLI를 종료합니다. 중요한 작업은 먼저 저장하거나 커밋한 뒤 사용하세요.
/permissions로 Codex가 사전 확인 없이 수행할 수 있는 작업을 조정하세요. /approve는 자동 검토에서 최근 거부된 작업을 재시도해야 할 때만 사용하세요.
슬래시 명령어로 세션 제어하기
다음 워크플로우를 사용하면 Codex를 다시 시작하지 않고 세션을 관리할 수 있습니다.
/config로 터미널 설정 변경하기
/config를 입력해 터미널 설정을 여세요. 그룹별로 설정을 살펴보거나 / 를 눌러 검색하세요. Codex가 변경 사항을 자동으로 저장합니다.
/tui로 터미널 모드 선택하기
/tui를 입력하세요.- 스크롤백 모드나 전체 화면 모드를 선택한 뒤 확인하세요.
- 선택을 적용하려면 Codex를 다시 시작하세요.
실행 결과: 다음 실행부터 저장된 터미널 모드를 사용합니다. --no-alt-screen처럼 실행 시 지정한 옵션은 계속 적용됩니다.
/export로 대화 내보내기
/export를 입력하세요.- 클립보드에 복사 또는 파일로 저장 중 하나를 선택하세요.
실행 결과: Codex가 전체 대화를 Markdown으로 내보냅니다. 파일로 바로 저장하려면 /export session.md를 실행하세요. 현재 턴이 끝난 뒤 내보내세요.
/recap으로 채팅 요약하기
- Codex가 대기 상태일 때
/recap을 입력하세요.
실행 결과: Codex가 대화를 요약합니다. tui.auto_recap = false로 설정해도 사용할 수 있습니다. 컨텍스트 공간을 확보하려면 /compact를 사용하세요.
/cd로 디렉터리 변경하기
/pwd(또는/cwd)를 입력해 현재 디렉터리를 확인하세요./cd <path>를 입력해 디렉터리를 변경하세요. 홈 디렉터리로 이동하려면/cd를 입력하세요.
실행 결과: Codex가 선택한 디렉터리에서 채팅을 이어갑니다. 디렉터리를 변경하려면 기본 세션이 대기 상태여야 하며 대기열에 입력이 없어야 하고 백그라운드 터미널도 없어야 합니다.
/worktree로 작업 트리에서 이어가기
- 로컬 Git 리포지터리에서
/worktree를 입력하세요. - 새 작업 트리에서 새 채팅을 시작할지 현재 대화를 이어갈지 선택하세요.
실행 결과: Codex가 관리형 Git 작업 트리를 만들고 그 안에서 선택한 채팅을 시작합니다. 작업 트리 찾아보기 항목을 선택하면 기존 작업 트리와 각 작업 트리를 소유한 채팅을 찾을 수 있습니다. 로컬 환경에서 작업 트리를 지원해야 하며 작업 실행 중에는 이 명령어를 사용할 수 없습니다.
/daemon으로 백그라운드 서버 관리하기
/daemon을 입력하세요.- 서버 연결 상태와 사용 가능한 작업을 확인하세요.
실행 결과: Codex가 로컬 백그라운드 서버에 최신 공개 안정 릴리스를 설치하거나 현재 CLI 빌드를 사용하도록 제안합니다. 업데이트를 확인하면 Codex가 종료되며 진행 중인 작업이 중단될 수 있습니다. 관리형 로컬 서버를 다시 시작하려면 백그라운드 서버 다시 시작을 선택한 뒤 확인하세요. Codex가 자동으로 다시 연결됩니다. 서버를 다시 시작하면 다른 채팅에서 실행 중이거나 대기 중인 작업이 중단될 수 있습니다. 원격 연결을 사용하는 경우에는 서버가 실행되는 호스트에서 관리하세요.
/warnings로 경고 확인하기
/warnings를 입력하세요.
실행 결과: Codex가 보관된 경고와 각 경고의 진단 세부 정보를 표시합니다.
/model로 활성 모델 설정하기
선택 메뉴에는 계정과 워크스페이스에서 사용할 수 있는 모델만 표시됩니다. GPT-6.1 Sol이 목록에 없으면 다른 모델을 선택하세요. 플랜별 GPT-6.1 Sol 사용 가능 여부를 참고하세요.
- Codex를 시작하고 Composer를 여세요.
/model을 입력하고 Enter를 누르세요.- 팝업에서
gpt-6-luna또는gpt-6.1-sol같은 모델을 선택하세요.
실행 결과: Codex가 채팅 기록에 새 모델을 표시합니다. /status를 실행해 변경 사항을 확인하세요.
현재 세션의 설정을 직접 변경하려면 /model [model] [--reasoning=<level>] [--speed=<tier>]를 사용하세요. 예를 들어 /model --reasoning=high를 실행하면 현재 모델을 유지하면서 해당 모델이 지원하는 경우 추론 수준을 높게 설정합니다.
/presets로 프롬프트와 명령어 재사용하기
/presets를 입력하고 n 을 누르면 번호가 지정된 슬롯에 프롬프트나 슬래시 명령어를 저장할 수 있습니다. s 를 누르면 현재 모델, 권한, 터미널 제목 또는 상태 표시줄 설정으로 프리셋을 만들 수 있습니다. 저장한 프리셋을 실행하려면 /presets를 열고 해당 번호를 누르세요.
/fast로 패스트 모드 전환하기
/fast를 입력해 현재 모델의 Fast 서비스 등급을 켜세요.- 끄려면
/fast를 다시 입력하세요.
실행 결과: Codex가 서비스 등급을 전환하고 선택을 저장합니다. TUI 하단에는 /statusline을 사용해 패스트 모드 상태도 표시할 수 있습니다.
Fast 등급 명령어는 모델 카탈로그에 따라 제공됩니다. 카탈로그에 현재 모델의 Fast 등급이 명시되어 있지 않으면 Codex에 /fast가 표시되지 않습니다.
Daybreak 켜거나 끄기
OpenAI 제공자를 사용하고 계정과 모델 모두에 Daybreak 사용 권한이 있으면 /daybreak로 Daybreak를 켜거나 끌 수 있습니다. Codex는 선택한 설정을 현재 채팅에 적용하고 이후 채팅의 기본값으로 저장합니다.
/voice로 Codex와 음성 대화하기
CLI 빌드와 세션이 모두 음성을 지원하면 /voice 또는 F8로 음성 대화를 시작하거나 종료할 수 있습니다. 마이크를 켜거나 끄려면 /voice mute를, 대화를 끝내려면 /voice stop을 사용하세요. 이후 대화에서 사용할 목소리는 /voice settings에서 선택하세요.
/plan으로 플랜 모드 전환하기
/plan을 입력하고 Enter를 눌러 활성 채팅을 플랜 모드로 전환하세요.- 필요하면 명령어 뒤에 프롬프트를 입력하세요(예:
/plan 이 서비스의 마이그레이션 계획을 제안해 줘). /plan에 인수를 직접 입력할 때 내용을 붙여 넣거나 이미지를 첨부할 수도 있습니다.
실행 결과: Codex가 플랜 모드로 전환합니다. 명령어와 함께 입력한 프롬프트가 있으면 첫 번째 계획 요청으로 사용합니다.
Codex가 작업 중인 동안에는 /plan을 일시적으로 사용할 수 없습니다.
/goal로 작업 목표 설정 또는 확인하기
/goal <objective>를 입력해 목표를 설정하세요. 예를 들어/goal 마이그레이션을 완료하고 테스트가 계속 통과하도록 해 줘를 입력합니다./goal을 입력해 현재 목표를 확인하세요./goal edit로 목표를 수정하세요./goal pause,/goal resume,/goal clear로 각각 목표를 일시 중지하거나 재개하거나 삭제할 수 있습니다.
실행 결과: 작업을 이어가는 동안 활성 채팅에 목표가 계속 연결되어 있습니다.
목표는 비워 둘 수 없으며 최대 4,000자까지 입력할 수 있습니다. 지침이 더 길다면 세부 내용을 파일에 작성하고 목표에서 해당 파일을 참조하세요.
/experimental로 실험 기능 전환하기
/experimental을 입력하고 Enter를 누르세요.- 원하는 기능(예: 네트워크 프록시 또는 실행 중 절전 방지)을 켜거나 끈 뒤, 다시 시작하라는 메시지가 표시되면 Codex를 다시 시작하세요.
실행 결과: Codex가 선택한 기능을 설정에 저장하고 다시 시작할 때 적용합니다.
/approve로 자동 검토에서 거부된 작업의 재시도 승인하기
자동 검토에서 최근 작업이 거부되었고 Codex가 한 번 더 시도하도록 하려면 /approve를 사용하세요.
/approve를 입력하세요.- Codex가 해당 작업을 표시하면 재시도를 확인하세요.
실행 결과: Codex가 현재 세션 정책에 따라 거부된 작업을 한 번 재시도합니다.
/memories로 메모리 설정하기
/memories를 입력하세요.- Codex가 기존 메모리를 사용할지, 새 메모리를 생성할지, 메모리 기능을 꺼 둘지 선택하세요.
실행 결과: Codex가 이후 세션에 적용할 메모리 설정을 업데이트합니다.
/skills로 스킬 사용하기
/skills를 입력하세요.- Codex가 적용할 스킬을 선택하세요.
실행 결과: Codex가 선택한 스킬의 컨텍스트를 삽입해 다음 요청을 해당 스킬의 지침에 따라 처리합니다.
/import로 Claude Code 또는 Cursor 설정 가져오기
/import를 입력하세요.- Claude Code 또는 Cursor 중 하나를 선택하세요.
- 이전할 설정, 프로젝트 파일 또는 최근 채팅을 선택하세요.
Codex는 최근 30일 동안의 채팅을 최대 50개까지 찾습니다. 로컬 데몬이나 원격 서버에 연결된 경우 Codex는 해당 데몬이나 서버가 실행되는 컴퓨터에서 파일을 읽고 가져옵니다. 현재 작업이 끝난 뒤 가져오기를 시작하세요.
데스크톱 앱에서 가져오는 방법과 지원되는 데이터 유형은 다른 에이전트에서 가져오기를 참고하세요.
/clear로 터미널을 지우고 새 채팅 시작하기
/clear를 입력하고 Enter를 누르세요.
실행 결과: Codex가 터미널을 지우고 화면에 표시된 채팅 기록을 초기화한 뒤 같은 CLI 세션에서 새 채팅을 시작합니다.
채팅을 만들면서 이름을 지정하려면 /clear release prep을 실행하세요.
Ctrl+L과 달리 /clear는 새 채팅을 시작합니다.
Ctrl+L은 터미널 화면만 지우고 현재 채팅은 유지합니다. 작업이 진행 중이면 Codex가 두 기능을 모두 비활성화합니다.
/archive로 현재 세션 보관하기
/archive를 입력하고 Enter를 누르세요.- 현재 세션을 보관할지 확인하세요.
실행 결과: Codex가 세션을 보관합니다. 로컬 백그라운드 서버나 원격 서버에 연결된 경우 명령 센터로 돌아가며, 공유 서버가 없으면 Codex가 종료됩니다. 채팅 기록은 유지되므로 나중에 codex unarchive <SESSION>으로 복원할 수 있습니다.
턴이 실행 중일 때 /archive를 확인하면 해당 턴을 중지한 뒤 세션을 보관합니다.
/delete로 현재 세션 삭제하기
/delete를 입력하고 Enter를 누르세요.- 현재 세션을 삭제할지 확인하세요.
실행 결과: Codex가 채팅 기록과 여기에서 파생된 모든 하위 세션을 영구 삭제합니다. 로컬 백그라운드 서버나 원격 서버에 연결된 경우 명령 센터로 돌아가며, 공유 서버가 없으면 Codex가 종료됩니다.
/delete는 채팅이 실행 중이거나 보조 채팅에 있는 동안에는 사용할 수 없습니다.
/permissions로 권한 변경하기
/permissions를 입력하고 Enter를 누르세요.- 원하는 수준의 승인 프리셋을 선택하세요. 예를 들어 사용자 개입 없이 실행하려면
Auto를, 수정 사항을 검토하려면Read Only를 선택하세요. 이름이 지정된 권한 프로필이 활성화된 경우 선택 메뉴에 설정된 사용자 지정 프로필과 설명도 표시됩니다.
현재 세션에서 ID로 프로필을 선택하려면 /permissions <profile-id> [--approval-policy=<policy>] [--reviewer=user|auto_review]를 사용하세요. 예를 들어 /permissions :workspace --approval-policy=on-request --reviewer=user를 실행하면 워크스페이스 접근 권한이 선택되며, 설정에서 허용하는 경우 승인 요청이 사용자에게 전달됩니다.
/ide로 IDE 컨텍스트 포함하기
/ide를 입력하세요.- 현재 IDE 선택 영역이나 열린 파일을 Codex가 어떻게 처리해야 하는지 설명하려면 명령어 뒤에 내용을 입력하세요.
실행 결과: Codex가 다음 프롬프트에 사용 가능한 IDE 컨텍스트를 포함합니다.
/vim으로 Vim 모드 전환하기
/vim을 입력하세요.- Composer에서 편집을 이어가세요.
실행 결과: 현재 세션에서 Composer의 Vim 모드가 전환됩니다. 새 세션에서 Vim 모드를 기본으로 사용하려면 tui.vim_mode_default = true를 config.toml에 설정하세요.
/setup-default-sandbox로 권한이 상승된 Windows 샌드박스 설정하기
이 명령어는 Windows에서 Codex가 제한된 토큰을 사용하는 기능 축소형 샌드박스를 사용 중일 때만 표시됩니다.
/setup-default-sandbox를 입력하세요.- 관리자 설정 절차를 따르세요.
실행 결과: Codex가 권한이 상승된 Windows 샌드박스를 설정하고 이에 맞는 자동 승인 프리셋을 선택합니다.
/copy로 최근 응답 복사하기
스크롤백 모드에서는 /copy를 입력한 뒤 마지막으로 완료된 응답 전체를 선택하거나 그 안의 코드 블록 또는 인용문을 선택하세요. 전체 화면 모드에서는 채팅 기록에서 블록을 선택하세요. Enter를 누르면 선택한 내용이 복사됩니다.
/status를 실행한 뒤 /copy를 사용하면 상태 정보 전체나 개별 필드를 복사할 수 있습니다. 마지막으로 완료된 응답을 바로 복사하려면 Ctrl+ O 를 누르세요.
/raw로 원시 스크롤백 모드 전환하기
/raw,/raw on또는/raw off를 입력하세요.
실행 결과: Codex가 원시 스크롤백 모드를 전환합니다. 이 모드에서는 터미널의 텍스트를 더 직접적으로 선택하고 복사할 수 있습니다. 기본 단축키인 Alt+R을 사용하거나 tui.raw_output_mode = true를 설정해 기본값으로 저장할 수도 있습니다.
/status로 세션 확인하기
- 채팅에서
/status를 입력하세요. - 출력에서 활성 모델, 승인 정책, 쓰기 가능한 루트, 현재 토큰 사용량을 확인하세요. TUI가 원격으로 연결되어 있으면 원격 주소와 서버 버전도 표시됩니다.
실행 결과: Codex가 세션 요약을 출력하므로 의도한 환경에서 작동하는지 확인할 수 있습니다.
/usage로 계정 사용량 확인하기
/usage를 입력해 사용량 메뉴를 여세요.- 토큰 사용 내역을 볼지, 획득한 한도 초기화 기회를 사용할지 선택하세요.
- 토큰 사용 내역을 바로 열려면
/usage daily,/usage weekly또는/usage cumulative를 입력하세요.
실행 결과: Codex가 사용량 관련 메뉴를 열거나 선택한 기간의 계정 토큰 사용 내역을 표시합니다. 세션이 Codex 서비스 계정으로 인증되지 않은 경우 로그인이 필요하다는 안내가 표시됩니다.
/debug-config로 설정 계층 확인하기
/debug-config를 입력하세요.- 출력에서 설정 계층의 순서(우선순위가 낮은 계층부터 표시), 활성화 여부, 정책 출처를 확인하세요.
실행 결과: Codex가 계층별 진단 정보를 출력합니다. 설정된 경우 allowed_approval_policies, allowed_sandbox_modes, mcp_servers, rules, network_proxy 등의 정책 세부 정보도 표시합니다.
실제로 적용된 설정이 config.toml과 다른 이유를 조사할 때 이 출력을 사용하세요.
/statusline으로 하단 표시 항목 설정하기
/statusline을 입력하세요.- 선택 메뉴에서 항목을 켜거나 끄고 순서를 조정한 뒤 확인하세요.
실행 결과: 하단 상태 표시줄이 즉시 업데이트되며 선택한 구성이 tui.status_line에 저장됩니다. 이 설정은 config.toml에 있습니다.
상태 표시줄에는 모델, 모델과 추론 수준, 컨텍스트 통계, 요청 한도, Git 브랜치, 토큰 카운터, 세션 ID, 현재 디렉터리/프로젝트 루트, Codex 버전 등을 표시할 수 있습니다.
현재 세션에서만 하단 표시줄을 설정하려면 항목을 표시할 순서대로 입력하세요. 예를 들어 /statusline model project-name을 입력하면 모델이 프로젝트 이름 앞에 표시됩니다. 현재 세션에서 모든 항목을 숨기려면 /statusline --clear를 사용하세요.
/title로 터미널 제목 항목 설정하기
/title을 입력하세요.- 선택 메뉴에서 항목을 켜거나 끄고 순서를 조정한 뒤 확인하세요.
실행 결과: 터미널 창이나 탭의 제목이 즉시 업데이트되며 선택한 구성이 tui.terminal_title에 저장됩니다. 이 설정은 config.toml에 있습니다.
제목에는 앱 이름, 프로젝트, 스피너, 상태, 스레드, Git 브랜치, 모델, 작업 진행률 등을 표시할 수 있습니다.
현재 세션에서만 제목을 설정하려면 항목을 표시할 순서대로 입력하세요. 예를 들어 /title project-name model을 입력하면 프로젝트 이름이 모델 앞에 표시됩니다. 현재 세션의 제목 항목을 모두 지우려면 /title --clear를 사용하세요.
/theme으로 구문 강조 테마 선택하기
/theme을 입력하세요.- 선택 메뉴에서 테마를 미리 본 뒤 확인하세요.
실행 결과: Codex가 구문 강조를 업데이트하고 선택한 테마를 tui.theme에 저장합니다. 이 설정은 config.toml에 있습니다.
/pets로 터미널 펫 선택하기
/pets(또는/pet)를 입력해 펫 선택 메뉴를 여세요.- 내장 펫이나 사용자 지정 펫을 선택하거나 펫을 끄세요.
실행 결과: Codex가 지원되는 터미널에 선택한 펫을 표시하고 선택을 저장합니다. /pets off를 입력해 펫을 숨길 수도 있습니다.
/keymap으로 TUI 단축키 다시 지정하기
/keymap을 사용하면 TUI 키보드 단축키를 확인하고 변경한 뒤 저장할 수 있습니다.
/keymap을 입력하세요.- 단축키를 변경할 컨텍스트와 동작을 선택하세요.
- 새 키 조합을 입력하거나 기존 키 조합을 제거하세요.
실행 결과: Codex가 활성 키맵을 업데이트하고 사용자 지정 키 조합을 tui.keymap에 기록합니다. 이 설정은 config.toml에 있습니다.
키 조합에는 ctrl-a, shift-enter, page-down 같은 이름을 사용합니다. 컨텍스트별 키 조합은 tui.keymap.global보다 우선합니다. 키 조합 목록을 비우면 해당 동작의 단축키 지정이 해제됩니다.
/ps로 백그라운드 터미널 확인하기
/ps를 입력하세요.- 백그라운드 터미널 목록과 각 터미널의 상태를 확인하세요.
실행 결과: Codex가 각 백그라운드 터미널의 명령어와 비어 있지 않은 최근 출력 줄을 최대 3개까지 표시하므로 진행 상황을 한눈에 파악할 수 있습니다.
백그라운드 터미널은 unified_exec를 사용하는 경우 표시됩니다. 그렇지 않으면 목록이 비어 있을 수 있습니다.
/stop으로 백그라운드 터미널 중지하기
/stop을 입력하세요.- 목록에 있는 터미널을 중지하기 전에 Codex가 확인을 요청하면 확인하세요.
실행 결과: Codex가 현재 세션의 모든 백그라운드 터미널을 중지합니다. /clean도 계속 /stop의 별칭으로 사용할 수 있습니다.
/compact로 채팅 기록 압축하기
- 대화가 길어졌다면
/compact를 입력하세요. - Codex가 지금까지의 채팅을 요약할지 물으면 확인하세요.
실행 결과: Codex가 이전 턴을 간결한 요약으로 대체해 중요한 세부 정보를 유지하면서 컨텍스트 공간을 확보합니다.
/diff로 변경 사항 검토하기
/diff를 입력해 Git diff를 확인하세요.- CLI에서 출력을 스크롤하며 수정 사항과 추가된 파일을 검토하세요.
실행 결과: Codex가 스테이징한 변경 사항, 아직 스테이징하지 않은 변경 사항, Git이 아직 추적하지 않는 파일을 표시하므로 무엇을 유지할지 결정할 수 있습니다.
/mention으로 파일 지정하기
/mention뒤에 경로를 입력하세요. 예를 들어/mention src/lib/api.ts를 입력합니다.- 팝업에서 일치하는 결과를 선택하세요.
실행 결과: Codex가 파일을 채팅에 추가해 이후 턴에서 직접 참조할 수 있게 합니다.
/new로 새 채팅 시작하기
/new를 입력하고 Enter를 누르세요.- Codex가 체크아웃 위치를 선택하라고 하면 현재 디렉터리나 새 작업 트리를 선택하세요.
실행 결과: Codex가 같은 CLI 세션에서 새 채팅을 시작하므로 터미널을 나가지 않고 채팅을 전환할 수 있습니다.
채팅을 만들면서 이름을 지정하려면 /new bug bash를 실행하세요.
/clear와 달리 /new는 현재 터미널 화면을 먼저 지우지 않습니다.
/rename으로 현재 채팅 이름 변경하기
/rename <name>을 입력하거나/rename을 입력해 이름 입력 창을 여세요.- 나중에 채팅을 쉽게 찾을 수 있도록 짧은 이름을 입력하세요.
실행 결과: Codex가 채팅 기록을 유지하면서 저장된 채팅의 이름을 변경합니다.
/resume으로 저장된 채팅 재개하기
/resume을 입력하고 Enter를 누르세요.- 선택 메뉴에서 검색 범위를 선택하세요.
Cwd는 현재 디렉터리의 채팅을 표시합니다.Repo를 사용할 수 있으면 연결된 로컬 작업 트리에서 현재 디렉터리에 해당하는 디렉터리까지 검색 범위에 포함합니다.All은 모든 디렉터리를 검색합니다. - 재개할 채팅을 선택하세요.
실행 결과: Codex가 선택한 채팅의 기록을 다시 불러오므로 기존 기록을 그대로 유지하면서 중단한 지점부터 이어갈 수 있습니다.
/fork로 현재 채팅 포크하기
/fork를 입력하고 Enter를 누르세요.- Codex가 체크아웃 위치를 선택하라고 하면 현재 디렉터리나 새 작업 트리를 선택하세요.
실행 결과: Codex가 현재 채팅을 복제해 새 ID가 있는 채팅을 만듭니다. 원래 채팅 기록이 그대로 유지되므로 다른 접근 방식을 병행해 볼 수 있습니다.
현재 세션 대신 저장된 세션을 포크하려면 터미널에서 codex fork를 실행해 세션 선택 메뉴를 여세요.
/app으로 데스크톱 앱에서 이어가기
macOS와 Windows에서는 /app을 입력해 현재 세션을 ChatGPT 데스크톱 앱에서 열 수 있습니다. 앱이 설치되어 있지 않거나 실행 중이 아니면 Codex가 앱을 설치하거나 실행하라는 오류 메시지를 표시합니다.
실행 결과: 데스크톱 앱에서 저장된 동일한 채팅이 열리므로 작업을 이어갈 수 있습니다.
/side로 보조 채팅 시작하기
/side를 사용하면 기본 채팅을 벗어나지 않고 현재 채팅을 임시로 포크할 수 있습니다.
/side를 입력해 보조 채팅을 여세요.- 필요하면 명령어 뒤에 내용을 입력하세요. 예를 들어
/side 이 계획에 눈에 띄는 위험 요소가 있는지 확인해 줘를 입력합니다. - 별도로 확인하려던 내용의 처리가 끝나면 상위 채팅으로 돌아가세요.
실행 결과: Codex가 상위 채팅과 기록이 분리된 보조 채팅을 엽니다. 보조 채팅에서도 TUI에 상위 채팅의 상태가 계속 표시되므로 기본 채팅이 여전히 실행 중인지 확인할 수 있습니다.
/side는 다른 보조 채팅 안에서나 리뷰 모드에서는 사용할 수 없습니다.
AGENTS.md를 /init으로 생성하기
- Codex가 지속적으로 적용할 지침을 찾을 디렉터리에서
/init을 실행하세요. - 생성된
AGENTS.md를 검토한 뒤 리포지터리 규칙에 맞게 수정하세요.
실행 결과: Codex가 AGENTS.md 기본 틀을 생성합니다. 이후 세션에서 사용할 수 있도록 내용을 다듬고 커밋하세요.
/review로 작업 트리 리뷰 요청하기
/review를 입력하세요.- 정확한 파일 변경 내용을 확인하려면 이어서
/diff를 실행하세요.
실행 결과: Codex가 동작 변경과 누락된 테스트를 중심으로 작업 트리에서 발견한 문제를 요약합니다. review_model을 config.toml에 설정하지 않으면 현재 세션의 모델을 사용합니다.
/mcp로 MCP 도구 목록 확인하기
/mcp를 입력하세요.- 목록에서 사용 가능한 MCP 서버와 도구를 확인하세요.
실행 결과: 이번 세션에서 Codex가 호출할 수 있도록 설정된 Model Context Protocol(MCP) 도구가 표시됩니다.
자세한 서버 진단 정보도 보려면 /mcp verbose를 사용하세요. 활성 세션에서 설정된 MCP 서버에 로그인하려면 /mcp login <name>을 사용하세요.
/apps로 앱 찾아보기
/apps를 입력하세요.- 목록에서 앱을 선택하세요.
실행 결과: Codex가 Composer에 $app-slug 형식으로 앱 멘션을 삽입하므로 곧바로 해당 앱을 사용하도록 요청할 수 있습니다.
/plugins로 플러그인 찾아보기
/plugins를 입력하세요.- 마켓플레이스 탭을 선택한 뒤 플러그인을 선택해 기능과 사용 가능한 작업을 확인하세요.
실행 결과: Codex가 플러그인 탐색기를 엽니다. 설치된 플러그인과 그 상태, 현재 설정에서 검색할 수 있는 플러그인을 확인할 수 있습니다. 설치된 플러그인에서 Space를 누르면 활성화 상태가 전환됩니다.
/hooks로 수명 주기 훅 확인 및 관리하기
/hooks를 입력하세요.- 훅 이벤트를 선택해 해당하는 핸들러를 확인하세요.
- 필요에 따라 관리형이 아닌 훅을 신뢰하도록 지정하거나 비활성화하거나 다시 활성화하세요.
실행 결과: Codex가 훅 탐색기를 열어 설정된 수명 주기 훅을 보여 줍니다. 관리형 훅은 관리형으로 표시되며 사용자 훅 탐색기에서 비활성화할 수 없습니다.
/agents로 채팅 관리하기
/agents를 입력하고 Enter를 누르세요.- 명령 센터에서 열려는 채팅을 선택하세요.
실행 결과: Codex가 연결된 서버의 채팅을 한눈에 보여 줍니다. 각 채팅의 상태를 확인하고 채팅 간에 전환할 수 있습니다. 터미널에서 명령 센터를 바로 열려면 codex agents를 실행하세요. 명령 센터를 사용하려면 공유 로컬 서버나 원격 서버가 필요합니다.
/subagents로 에이전트 스레드 전환하기
/subagents를 입력하고 Enter를 누르세요.- 선택 메뉴에서 원하는 스레드를 선택하세요.
실행 결과: Codex가 활성 스레드를 전환해 해당 에이전트의 작업을 확인하거나 이어갈 수 있습니다.
/feedback으로 피드백 보내기
/feedback을 입력하고 Enter를 누르세요.- 안내에 따라 로그나 진단 정보를 포함하세요.
실행 결과: Codex가 요청된 진단 정보를 수집해 유지관리자에게 제출합니다.
/logout으로 로그아웃하기
/logout을 입력하고 Enter를 누르세요.
실행 결과: Codex가 현재 사용자 세션의 로컬 자격 증명을 지웁니다.
/quit 또는 /exit로 CLI 종료하기
/quit(또는/exit)를 입력하고 Enter를 누르세요.
실행 결과: Codex가 즉시 종료됩니다. 중요한 작업은 먼저 저장하거나 커밋하세요.
VS Code 명령 팔레트에서 다음 명령어로 Codex를 제어하세요. 키보드 단축키를 지정할 수도 있습니다.
단축키 지정하기
Codex 명령어에 단축키를 지정하거나 기존 단축키를 변경하려면 다음 단계를 따르세요.
- 명령 팔레트를 여세요(macOS에서는 Cmd+Shift+P, Windows/Linux에서는 Ctrl+Shift+P).
- 기본 설정: 바로 가기 키 열기 명령어를 실행하세요.
Codex또는 명령어 ID(예:chatgpt.newChat)를 검색하세요.- 연필 아이콘을 선택한 뒤 원하는 단축키를 입력하세요.
확장 프로그램 명령어
| 명령어 | 기본 단축키 | 설명 |
|---|---|---|
chatgpt.addToThread |
- | 선택한 텍스트 범위를 현재 채팅의 컨텍스트로 추가합니다. |
chatgpt.addFileToThread |
- | 전체 파일을 현재 채팅의 컨텍스트로 추가합니다. |
chatgpt.newChat |
macOS: Cmd+NWindows/Linux: Ctrl+N |
새 채팅을 만듭니다. |
chatgpt.newCodexPanel |
- | 새 Codex 패널을 만듭니다. |
chatgpt.openCommandMenu |
- | Codex 명령어 메뉴를 엽니다. |
chatgpt.openSidebar |
- | Codex 사이드바 패널을 엽니다. |
슬래시 명령어를 사용하면 Composer에서 바로 Codex를 제어할 수 있습니다. 상태 확인, 로컬 모드와 클라우드 모드 간 전환, 피드백 전송에 사용하세요.
슬래시 명령어 사용하기
- Codex Composer에
/를 입력하세요. - 목록에서 명령어를 선택하거나 계속 입력해 목록을 좁히세요(예:
/status). - Enter를 누르세요.
사용 가능한 슬래시 명령어
| 슬래시 명령어 | 설명 |
|---|---|
/approve |
자동 검토가 활성화되어 있을 때 최근 거부된 작업의 재시도를 한 번 승인합니다. |
/cloud |
클라우드 실행이 가능한 경우 클라우드에서 채팅을 실행합니다. |
/cloud-environment |
채팅에 사용할 클라우드 환경을 선택합니다. |
/compact |
현재 채팅의 컨텍스트를 압축합니다. |
/fast |
모델 카탈로그에서 Fast 서비스 등급을 제공하는 경우 해당 등급을 켜거나 끕니다. |
/feedback |
피드백 대화상자를 열어 피드백을 제출합니다. 필요하면 로그도 포함할 수 있습니다. |
/fork |
로컬 채팅을 새 로컬 채팅으로 복사합니다. |
/goal |
Codex가 작업하는 동안 계속 추적할 목표를 설정합니다. |
/ide-context |
IDE 컨텍스트 자동 추가를 켜거나 끕니다. |
/init |
현재 프로젝트에 AGENTS.md 기본 틀을 생성합니다. |
/local |
로컬 워크스페이스에서 채팅을 실행합니다. |
/mcp |
MCP 상태 화면을 열어 연결된 서버를 확인합니다. |
/memories |
메모리 기능을 사용할 수 있는 경우 채팅에서 메모리를 사용하거나 생성할 수 있는지 설정합니다. |
/model |
현재 채팅에 사용할 모델을 선택합니다. |
/plan |
여러 단계로 이루어진 계획을 세우기 위해 플랜 모드를 켜거나 끕니다. |
/project |
새 채팅에 사용할 프로젝트를 선택합니다. |
/reasoning |
현재 채팅의 추론 수준을 선택합니다. |
/review |
코드 리뷰 모드를 시작해 커밋하지 않은 변경 사항을 검토하거나 기준 브랜치와 비교합니다. |
/side |
기본 채팅을 중단하지 않고 임시 보조 채팅을 시작합니다. |
/status |
채팅 ID, 컨텍스트 사용량, 요청 한도를 표시합니다. |
/worktree |
새 Git 작업 트리에서 채팅을 실행합니다. |