Repository navigation
feat(cli): configure one-shot exec sessions - #533
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 5, 2026, 6:16 PM ET / 22:16 UTC. ClawSweeper reviewWhat this changesAdds repeatable one-shot configuration flags that apply ACP session settings after model selection and before prompting, with documentation and regression coverage. Merge readiness✅ Ready for maintainer review This remains a useful, narrowly scoped contribution absent from current main. The supplied live-adapter proof is sufficient, subsequent validation covers the current head, and no blocking defect was found. Likely related people: steipete and Firmansyah Otoluwa are relevant routing candidates from adjacent session-control history; precise source-line ownership remains unverified. Priority: P2 Review scores
Verification
How this fits togetherThe acpx CLI launches an ACP adapter and creates a temporary session for each exec invocation. The new flags feed configuration requests into that session before its single prompt, without saving acpx session preferences. flowchart TD
A[Exec arguments] --> B[Parse configuration pairs]
B --> C[Create temporary ACP session]
C --> D[Select requested model]
D --> E[Apply options in order]
E --> F{All options accepted?}
F -->|Yes| G[Send prompt and return output]
F -->|No| H[Report error and close adapter]
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Use the existing ACP configuration method for explicit per-invocation settings, preserving default execution and keeping temporary choices out of saved acpx preferences. Do we have a high-confidence way to reproduce the issue? Not applicable as a bug reproduction: this adds a capability. The supplied live-adapter transcript demonstrates the new per-invocation setting taking effect. Is this the best way to solve the issue? Yes. The patch reuses the existing ACP method and temporary-session lifecycle; persistent session controls cannot configure this otherwise inaccessible one-shot session. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 9ace84727fc2. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles) |
|
Inspectable live-adapter proof from the reviewed head ( $ git rev-parse HEAD
0549a5d229fc0d05dffd302f893b46e4d794f60c
$ rg '^model_reasoning_effort\\s*=' ~/.codex/config.toml
model_reasoning_effort = "high"
$ node dist/cli.js --model gpt-5.6-luna codex exec \
--config-option reasoning_effort=low \
'Reply with exactly: exec-effort-ok'
exec-effort-ok
[acpx] tokens: input=17919 output=8 cache_read=9984 total=27911
$ jq -c 'select(.type == "turn_context") | .payload | {model, effort}' \
~/.codex/sessions/2026/09/01/rollout-2026-09-01T10-25-35-01a05c12-dd22-77f3-80c8-323238260170.jsonl
{"model":"gpt-5.6-luna","effort":"low"}This demonstrates the one-shot flag overriding the real Codex adapter's global @clawsweeper re-review @superbiche · user · drafted with Codex (GPT-5). |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Resolve the changelog conflict against current main and preserve the contributor's one-shot configuration work and attribution. Co-authored-by: Michel Tomas <michel@superbiche.me>
|
Maintainer proof for head The real built {"orderedConfiguration": [["session/set_config_option", "model", "fast-model"], ["session/set_config_option", "reasoning_effort", "high"], ["session/set_config_option", "reasoning_effort", "xhigh"]], "promptAfterConfiguration": true, "rejectedConfigurationPreventsPrompt": true}The model was selected first, repeated effort options followed in CLI order, and prompting followed those selections. A second invocation used a rejecting adapter and exited without sending Exact-head hosted CI is fully green, including Test, Mutation, Slophammer, and Docs: https://github.com/openclaw/acpx/actions/runs/33994537600. Local formatting, types, lint, build, viewer checks, and docs passed. The initial local full suite encountered an unrelated Gemini fixture failure; a fresh-temp retry cleared it but stalled in the viewer test, so the complete hosted Test job supplies the full-suite gate. Local and committed-branch autoreview are clean through P2. The changelog conflict is resolved against current main and credits @superbiche. Recommended for authorized squash landing. |
Fixes the cancel regression introduced by 4f3fa88c (96ced10): AcpClient.prompt() awaited resolveTurnContext before the prompt was active, so a pending cancel was dropped. The fix holds a startingPrompt across that await (ad0ce2d red-first test, ba889d2 fix). Gate: L0 full acpx suite on ba889d2 3729/3726/2 fail/1 todo (#1301 PASS; openclaw#533 load; #2560 -> 800aad0e, A/B both arms pass alone and whole-file). TE 536212eb verified 08:01Z: #1301 12/12 vs 402c52e 12/12; real Claude cancel cold start 12/12 + long tool turn 10/10; alarm mid-turn intact; deterministic test red 3/3 / tip 3/3; 22 files 428/428 + integration.test.js 90/90. Session: https://atrium.devbox.nativai.de/?session=ca088077-7fc1-436f-a1d3-2863b4b0b2d6 Brick: https://atrium.devbox.nativai.de/?brick=bb92604b-b13b-440c-9c27-db1a26215442 Seat: https://atrium.devbox.nativai.de/?seat=0ce64dda-d1c0-44f8-8158-a28f47ef9cbb
One-shot exec runs can now apply adapter-advertised ACP session settings through repeatable
--config-option <key=value>flags. The requested model is selected first, options are applied in command-line order, and the prompt starts only after every selection succeeds. Invalid or rejected selections stop before prompting; temporary selections are not persisted.The contributor implementation is preserved, the changelog conflict is resolved against current main, and the Unreleased entry credits @superbiche. No contributor history was rewritten.
Validation on head
08c51474aec36c65b96d0cc466f2aea46915df8c: formatting, typecheck, lint, build, viewer checks, and documentation checks passed. The new regression cases and a real built-CLI run prove model/option/prompt ordering, repeated values, and rejection without prompt submission. Local and branch Codex autoreview are scoped clean through P2.The complete hosted CI run is green, including Test, Mutation, Slophammer, and Docs: https://github.com/openclaw/acpx/actions/runs/33994537600. Local full-suite attempts encountered an unrelated Gemini fixture failure and then a viewer-test stall; the hosted Test job supplies the complete suite gate. Captured built-CLI execution output is posted in the proof comment.