Repository navigation
Let automations pass extra agent arguments on each run - #26659
Conversation
Automations could only use the host's default agent Arguments, so a per-automation choice such as a different model needed a settings change that affected every run. Automations can now save extra arguments that are appended to the host's defaults on each fresh run. Extras are allowlisted to model, effort, and Claude's --add-dir, and are refused for permission, config, prompt, and session options. - Add the field through the CLI (`automations create/edit --extra-agent-args`), the RPC contract, the automation store, and the editor's Advanced section, with validation at save and at launch. - Merge extras over the defaults by replacing a model or effort option the defaults already set, then re-tokenize to confirm the launch argv matches what was validated. - Gate writes behind a new runtime capability, and refuse to save or migrate extras to a host that would silently drop them. - Require a fresh session, since reused sessions cannot take new arguments.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughAutomations now support saved extra agent arguments. The change adds argument validation and merging, persistence, CLI and editor controls, and forwarding into fresh agent launches. Runtime capability checks guard supported write and migration paths. Documentation and translations describe the option, its constraints, and how to clear it. Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to Automations gain validated per-run agent arguments, with unsupported-host writes and migrations guarded. No concrete merge-blocking risk is identified; proceed subject to normal CI checks. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Description checkExplanation The description explains the change, rationale, testing, compatibility considerations, and implementation scope. However, it does not provide the required linked issue, and the required visual proof for the UI change is still pending.
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
e49329a4-79a4-4583-b6a8-2c0538b16f31
📒 Files selected for processing (60)
docs/site/content/docs/cli/automations.mdxskill-guides/orca-cli/references/automations.mdsrc/cli/automation-format.tssrc/cli/bundled-skill-guides.tssrc/cli/flag-help-text.tssrc/cli/handlers/automation-extra-agent-args-flag.tssrc/cli/handlers/automations.tssrc/cli/index-automation-extra-agent-args.test.tssrc/cli/specs/automations.tssrc/main/automations/headless-workspace-create.test.tssrc/main/automations/headless-workspace-create.tssrc/main/automations/runtime-automation-service.test.tssrc/main/automations/runtime-automation-service.tssrc/main/persistence-automation-extra-agent-args.test.tssrc/main/persistence/scheduling-automations/automation-context-migration.tssrc/main/persistence/scheduling-automations/automation-definition-operations.tssrc/main/runtime/orca-runtime-activate-managed-worktree.tssrc/main/runtime/orca-runtime-terminal-create-deduplication.tssrc/main/runtime/runtime-automation-controller.tssrc/main/runtime/runtime-managed-worktree-create-types.tssrc/main/runtime/runtime-worktree-agent-startup.test.tssrc/main/runtime/runtime-worktree-agent-startup.tssrc/main/ssh/orcad-migration-catalog-client-extra-agent-args.test.tssrc/main/ssh/orcad-migration-catalog-client.tssrc/renderer/src/components/automations/AutomationDetail.tsxsrc/renderer/src/components/automations/AutomationEditorDialog.tsxsrc/renderer/src/components/automations/AutomationEditorSettingsSidebar.tsxsrc/renderer/src/components/automations/AutomationExtraAgentArgsField.tsxsrc/renderer/src/components/automations/AutomationSchedulePicker.render.test.tsxsrc/renderer/src/components/automations/AutomationSchedulePicker.test.tssrc/renderer/src/components/automations/automation-capability-probe.tssrc/renderer/src/components/automations/automation-draft-model.tssrc/renderer/src/components/automations/automation-edit-draft.tssrc/renderer/src/components/automations/automation-extra-agent-args-capability.test.tssrc/renderer/src/components/automations/automation-host-client.tssrc/renderer/src/components/automations/automation-orca-save.tssrc/renderer/src/components/automations/automation-save-action.tssrc/renderer/src/components/automations/automation-scoped-list-client.tssrc/renderer/src/components/automations/use-automation-editor-actions.tssrc/renderer/src/components/automations/use-automations-page-local-state.tssrc/renderer/src/hooks/automation-dispatch-handler.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/fr.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/renderer/src/lib/agent-background-session-contract.tssrc/renderer/src/lib/launch-agent-background-session-extra-args.test.tssrc/renderer/src/lib/launch-agent-background-session.tssrc/shared/agent-startup-plan-inputs-extra-agent-args.test.tssrc/shared/agent-startup-plan-inputs.tssrc/shared/automation-extra-agent-args-record.tssrc/shared/automation-extra-agent-args.test.tssrc/shared/automation-extra-agent-args.tssrc/shared/automations-types.tssrc/shared/orcad-migration-dormant-automation-validation.tssrc/shared/protocol-version.tssrc/shared/rpc-contract/automation-params-extra-agent-args.test.tssrc/shared/rpc-contract/automation-params.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
Dormant automations imported from the migration manifest skipped the extra-args check. A disallowed flag, or Reuse combined with extra args, could persist and then fail every later run. The manifest parser now rejects those rows. Also move the automation runtime capability constants into `automation-runtime-capabilities.ts`. `protocol-version.ts` re-exports them, so existing imports keep working.
ELI5
Each automation can now choose its own model or reasoning effort without changing the host's defaults for every other run.
What Changed
--extra-agent-argsto CLI create/edit commands. Save the text with the automation and display it in automation details, with translations for all supported locales.--add-dir; reject permission, prompt, session, and unrelated configuration options.Why
Previously, choosing a different model for one automation required changing host settings that affected every run. Per-automation extras keep those defaults intact. A narrow allowlist and the existing launch-option catalog avoid exposing arbitrary agent configuration or duplicating option-handling rules.
Linked Issue
No linked issue.
Visual Proof
Before/after screenshots are pending. This changes the automation editor's Advanced section and the saved-arguments display; rendered Electron UI validation has not been performed in this session.
Testing
On macOS, ran the eight focused extra-agent-arguments test files covering CLI, parsing/merging, startup inputs, RPC validation, persistence, SSH migration, editor capability checks, and background launches: 109 tests passed.
Earlier commit-blocker validation passed
pnpm exec lint-staged,pnpm tc:cli, and 15 CLI tests. Later commits changed validation, display, and translations, so those earlier checks do not cover every final change. Full lint, typecheck, build, and platform checks remain for CI. No live Windows, Linux, or SSH-host run was performed.Review
Fresh-session enforcement, unsupported-host rejection, allowlisting, and shell argument round trips are covered by focused tests. Visual review and live cross-platform checks remain pending.
Agent skill upstream boundary
Notes
The new optional stored/RPC field is guarded by a runtime capability when writing to a host. Argument quoting uses the existing shell-specific launch path. Older hosts reject saves/migrations with extras instead of silently dropping the user's choice.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)