Skip to content

feat(cli): configure one-shot exec sessions - #533

Merged
steipete merged 3 commits into
openclaw:mainfrom
superbiche:feat/exec-config-options
Sep 5, 2026
Merged

steipete merged 3 commits into
openclaw:mainfrom
superbiche:feat/exec-config-options

Conversation

@superbiche

@superbiche superbiche commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

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.

@superbiche
superbiche requested a review from a team as a code owner September 1, 2026 09:29
@clawsweeper

clawsweeper Bot commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added P2 Normal priority bug or improvement with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 1, 2026
@clawsweeper

clawsweeper Bot commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 5, 2026, 6:16 PM ET / 22:16 UTC.

ClawSweeper review

What this changes

Adds 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
Reviewed head: 08c51474aec36c65b96d0cc466f2aea46915df8c

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused implementation with sufficient live proof, targeted regression coverage, successful supplied checks, and no blocking findings.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): The real built-CLI Codex run proves the new configuration loop overrides global effort for one temporary session; its relevant production code is unchanged at this head. The current-head spawned-adapter trace supplements that proof with repeated-option ordering and rejection before prompting.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The real built-CLI Codex run proves the new configuration loop overrides global effort for one temporary session; its relevant production code is unchanged at this head. The current-head spawned-adapter trace supplements that proof with repeated-option ordering and rejection before prompting.
Evidence reviewed 8 items Repository policy and scope: Read the complete root AGENTS.md, VISION.md, and CONTRIBUTING.md. No additional ancestor policy applies to the changed paths, and no maintainer-notes directory exists. The patch synchronizes the skill and Codex documentation and appends its attributed Unreleased entry.
Current main still lacks the requested behavior: Main creates the temporary session, applies the requested model, and proceeds directly to prompting; it has no intervening arbitrary configuration loop.
Latest-release comparison: The supplied latest release, v0.13.2, defines ExecFlags with only the file option; the proposed configuration flag is not present there.
Findings None None.
Security None None.

How this fits together

The 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]
Loading

Before merge

None.

Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Production and test growth production +49, tests +145 The production additions provide flag parsing and execution wiring, with larger test coverage for parsing, ordering, and rejection.

Technical review

Best 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.

Labels

Label justifications:

  • P2: This is a bounded improvement to one-shot ACP configuration with no demonstrated urgent regression.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The real built-CLI Codex run proves the new configuration loop overrides global effort for one temporary session; its relevant production code is unchanged at this head. The current-head spawned-adapter trace supplements that proof with repeated-option ordering and rejection before prompting.
  • proof: sufficient: Contributor real behavior proof is sufficient. The real built-CLI Codex run proves the new configuration loop overrides global effort for one temporary session; its relevant production code is unchanged at this head. The current-head spawned-adapter trace supplements that proof with repeated-option ordering and rejection before prompting.

Evidence

What I checked:

  • Repository policy and scope: Read the complete root AGENTS.md, VISION.md, and CONTRIBUTING.md. No additional ancestor policy applies to the changed paths, and no maintainer-notes directory exists. The patch synchronizes the skill and Codex documentation and appends its attributed Unreleased entry. (AGENTS.md:1, 08c51474aec3)
  • Current main still lacks the requested behavior: Main creates the temporary session, applies the requested model, and proceeds directly to prompting; it has no intervening arbitrary configuration loop. (src/cli/session/runtime.ts:1131, 9ace84727fc2)
  • Latest-release comparison: The supplied latest release, v0.13.2, defines ExecFlags with only the file option; the proposed configuration flag is not present there. (src/cli/flags.ts:63, fd173f04aa1b)
  • Configuration ordering and failure boundary: The introduced loop awaits the existing ACP configuration method for each option before invoking the prompt. Rejections reach the existing error handling and client-close finally block. The existing persistent set command requires a saved session and does not provide equivalent temporary-session configuration. (src/cli/session/runtime.ts:1142, 08c51474aec3)
  • Contributor live-adapter proof: The captured comment feat(cli): configure one-shot exec sessions #533 (comment) shows the built CLI using the real Codex adapter with reasoning_effort=low despite a global high default. The response completes, and the adapter rollout records the requested model and low effort. Local comparisons found no changes to the relevant production files between that proven head and the reviewed head. (src/cli/session/runtime.ts:1142, 0549a5d229fc)
  • Current-head validation and review disposition: The captured comment feat(cli): configure one-shot exec sessions #533 (comment) reports built-CLI execution against a spawned ACP fixture, with model-first ordering, repeated options in order, and rejection preventing prompt submission. It recommends authorized landing. Supplied checks report successful Test, Mutation, Slophammer, Docs, and other validation for the current head. These are supplied results, not checks executed by this reviewer. (test/integration.test.ts:1474, 08c51474aec3)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Firmansyah Otoluwa: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (3 earlier review cycles)
  • reviewed 2026-09-01T09:31:49.777Z sha 0549a5d :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-01T09:36:56.404Z sha 0549a5d :: needs maintainer review before merge. :: none
  • reviewed 2026-09-05T22:02:58.120Z sha 08c5147 :: needs maintainer review before merge. :: none

@superbiche

Copy link
Copy Markdown
Contributor Author

Inspectable live-adapter proof from the reviewed head (0549a5d229fc0d05dffd302f893b46e4d794f60c):

$ 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 high default with the requested per-invocation low effort. The raw local trace is retained as tmp/live-exec-effort.log and tmp/live-exec-rollout.log in the contributor checkout.

@clawsweeper re-review


@superbiche · user · drafted with Codex (GPT-5).

@clawsweeper

clawsweeper Bot commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Sep 1, 2026
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>
@steipete steipete changed the title feat: configure one-shot exec sessions feat(cli): configure one-shot exec sessions Sep 5, 2026
@steipete

steipete commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Maintainer proof for head 08c51474aec36c65b96d0cc466f2aea46915df8c:

The real built dist/cli.js used a spawned ACP fixture. Its captured request order and failure-path assertions were:

{"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 session/prompt.

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.

@steipete
steipete merged commit 95848ba into openclaw:main Sep 5, 2026
14 checks passed
nativai-ops pushed a commit to nativai/acpx that referenced this pull request Oct 8, 2026
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal priority bug or improvement with limited blast radius. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants