Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .council.yml.example
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ tools:
input_mode: "stdin"
prompt_file_arg: null
extra_args:
- "--ask-for-approval"
- "never" # prevents interactive approval pauses
- "--sandbox"
- "read-only" # safer default: no file writes by Codex
- "--color"
Expand Down
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,6 @@ tools:
command: ["codex", "exec"] # exec subcommand is the automation-friendly mode
input_mode: "stdin"
extra_args:
- "--ask-for-approval"
- "never" # prevents interactive approval pauses
- "--sandbox"
- "read-only" # safer default: no file writes by Codex
- "--color"
Expand All @@ -224,7 +222,6 @@ tools:

- **Claude `-p "query"`** (print mode): Runs non-interactively, prints response to stdout. Council pipes the full prompt via stdin and passes a short print-mode query argument. The official CLI pattern is `claude -p "query"`, where piped stdin is processed as additional context.
- **Codex `exec`**: The automation-friendly subcommand (vs the interactive default). Use `codex exec` for scripted/CI-style runs.
- **Codex `--ask-for-approval never`**: Prevents Codex from pausing to ask for user confirmation mid-run, which would hang the pipeline.
- **Codex `--sandbox read-only`**: Safer default — Codex can read your repo but won't write files or run commands.
- **Codex `--color never`**: Disables ANSI color escape codes in stdout, keeping saved run artifacts clean and readable.
- **Codex `-` (last arg)**: This is the PROMPT positional argument. The literal `-` tells Codex to read the prompt from stdin. **It must be the last argument.**
Expand Down Expand Up @@ -257,7 +254,7 @@ tools:
command: ["codex", "exec"]
input_mode: "file"
prompt_file_arg: "--input"
extra_args: ["--ask-for-approval", "never", "--sandbox", "read-only", "--color", "never"]
extra_args: ["--sandbox", "read-only", "--color", "never"]
```

## Run Artifacts
Expand Down
3 changes: 1 addition & 2 deletions src/council/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -572,8 +572,7 @@ def _get_example_config_text() -> str:
" codex:\n"
' command: ["codex", "exec"]\n'
' input_mode: "stdin"\n'
' extra_args: ["--ask-for-approval", "never",'
' "--sandbox", "read-only",'
' extra_args: ["--sandbox", "read-only",'
' "--color", "never",'
' "-"]\n'
" env: {}\n"
Expand Down
9 changes: 4 additions & 5 deletions src/council/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ def defaults(cls) -> CouncilConfig:
- Claude Code: ``claude -p "query"`` (headless print mode).
The full prompt is piped via stdin; a short constant query
argument satisfies the required positional arg for ``-p``.
- Codex: ``codex exec`` with ``--ask-for-approval never``,
``--sandbox read-only``, ``--color never``, and ``-``
(read prompt from stdin)
- Codex: ``codex exec`` with ``--sandbox read-only``,
``--color never``, and ``-`` (read prompt from stdin).
Note: ``exec`` is already non-interactive so
``--ask-for-approval`` is not needed / not accepted.
"""
return cls(
tools={
Expand All @@ -56,8 +57,6 @@ def defaults(cls) -> CouncilConfig:
command=["codex", "exec"],
input_mode=InputMode.STDIN,
extra_args=[
"--ask-for-approval",
"never",
"--sandbox",
"read-only",
# Disable ANSI color codes so saved artifacts are clean.
Expand Down
4 changes: 2 additions & 2 deletions tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ def test_defaults_codex_uses_exec_mode(self):
config = CouncilConfig.defaults()
args = config.tools["codex"].extra_args
assert config.tools["codex"].command == ["codex", "exec"]
assert "--ask-for-approval" in args
assert "never" in args
assert "--sandbox" in args
assert "read-only" in args
# codex exec is already non-interactive; --ask-for-approval is not accepted.
assert "--ask-for-approval" not in args
# --color never keeps saved artifacts free of ANSI codes.
color_idx = args.index("--color")
assert args[color_idx + 1] == "never"
Expand Down