mirror of
https://github.com/openai/codex.git
synced 2026-04-29 08:56:38 +00:00
Redirect debug client output to a file (#17234)
In the app-server debug client, allow redirecting output to a file in addition to just stdout. Shell redirecting works OK but is a bit weird with the interactive mode of the debug client since a bunch of newlines get dumped into the shell. With async messages from MCPs starting it's also tricky to actually type in a prompt.
This commit is contained in:
@@ -12,7 +12,8 @@ Start the app-server client (it will spawn `codex app-server` itself):
|
||||
```
|
||||
cargo run -p codex-debug-client -- \
|
||||
--codex-bin codex \
|
||||
--approval-policy on-request
|
||||
--approval-policy on-request \
|
||||
--output-file /tmp/app-server-server-json.jsonl
|
||||
```
|
||||
|
||||
You can resume a specific thread:
|
||||
@@ -29,6 +30,7 @@ cargo run -p codex-debug-client -- --thread-id thr_123
|
||||
- `--approval-policy <policy>`: `untrusted`, `on-failure` (deprecated), `on-request`, `never`.
|
||||
- `--auto-approve`: auto-approve command/file-change approvals (default: decline).
|
||||
- `--final-only`: only show completed assistant messages and tool items.
|
||||
- `--output-file <path>`: write raw server JSONL to this file instead of stdout.
|
||||
- `--model <name>`: optional model override for thread start/resume.
|
||||
- `--model-provider <name>`: optional provider override.
|
||||
- `--cwd <path>`: optional working directory override.
|
||||
@@ -46,7 +48,8 @@ Type a line to send it as a new turn. Commands are prefixed with `:`:
|
||||
|
||||
The prompt shows the active thread id. Client messages (help, errors, approvals)
|
||||
print to stderr; raw server JSON prints to stdout so you can pipe/record it
|
||||
unless `--final-only` is set.
|
||||
unless `--final-only` is set. Pass `--output-file <path>` to record raw server
|
||||
JSONL to a file instead of stdout.
|
||||
|
||||
## Notes
|
||||
|
||||
|
||||
Reference in New Issue
Block a user