Skip to content

[feat]: Custom execution command settings for CLI providers #685

@Devdha

Description

@Devdha

Feature Summary

Allow users to customize CLI execution commands for each provider through Settings > Connections. This enables full control over how agent CLIs are invoked, including custom flags, arguments, and execution parameters.

Problem or Use Case

Currently, CLI execution flags are hardcoded in the provider registry. Users cannot:

  • Use codex --yolo instead of --full-auto (see [feat]: use --yolo for codex #659)
  • Add provider-specific flags like --search, --enable collab
  • Customize resume flags, default arguments, or initial prompt handling
  • Use custom CLI paths or wrapper scripts

This limitation forces users to accept default behavior that may not fit their workflow or security preferences.

Proposed Solution

Add a settings modal accessible via a gear icon (⚙️) next to each detected provider in Settings > Connections. The modal provides granular control over:

Field Description Example
CLI Command The CLI executable to run codex, /custom/path/claude
Resume Flag Flag for resuming sessions -c -r, --continue --resume
Default Args Arguments always passed --search --enable collab
Auto-approve Flag Flag for auto-approve mode --yolo, --dangerously-skip-permissions
Initial Prompt Flag Flag for passing prompts -p, --prompt, (empty for direct)

Key features:

  • Real-time command preview showing the final assembled command
  • Shell-style argument parsing (supports quoted strings: --message "hello world")
  • Reset to defaults button
  • Settings persist across sessions

Implementation

I have a working implementation ready:

Changes:

  • src/main/settings.ts - Storage and CRUD for custom configs
  • src/main/ipc/connectionsIpc.ts - IPC handlers
  • src/main/services/ptyManager.ts - Shell-style arg parser + config application
  • src/renderer/components/CustomCommandModal.tsx - Settings UI
  • src/renderer/components/CliProvidersList.tsx - Settings button integration

PR: Will link after this issue is created.

Related Issues

Additional Context

This is a generic solution that addresses multiple feature requests by giving users full control over CLI invocation, rather than adding individual flags one by one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions