Skip to content

[Feature]: Add config option to auto-inject bypassPermissions for ocx claude #690

Closed as not planned

Description

@jhste102lab

Area

CLI

What are you trying to accomplish?

When launching Claude Code via ocx claude, I want all tool permissions to be auto-approved without interactive prompts — the same behaviour you get with claude --permission-mode=bypassPermissions. I currently have to type ocx claude --permission-mode=bypassPermissions every time, which is tedious and error-prone.

What prevents this today?

There is no field in config.claudeCode that tells ocx claude to append --permission-mode=bypassPermissions automatically. The ocx binary directly spawn("claude", args) and does not read any bypass-related config. A shell wrapper (bash function) around ocx is possible but fragile — it clashes with other ocx subcommands and does not survive across shell profiles.

What should OpenCodex do?

Add an optional boolean field bypassPermissions under config.claudeCode. When set to true, ocx claude should inject --permission-mode=bypassPermissions into the argument list passed to the spawned claude child process.

// ~/.opencodex/config.json
{
  "claudeCode": {
    "enabled": true,
    "bypassPermissions": true   // new field
  }
}

A default of false (or absent) preserves the current behaviour — prompting the user for every tool call.

Example usage or interface

# Before (manual, every time)
ocx claude --permission-mode=bypassPermissions "fix the auth bug"

# After (set once in config, then just)
ocx claude "fix the auth bug"

Alternatively, a dedicated CLI subcommand flag could work:

ocx claude --bypass     # sugar flag for a single launch

Alternatives or workarounds

  1. Bash function wrapper: wrap ocx in a shell function that detects claude subcommand and appends the flag. Works but fragile — must be sourced in every new shell profile.
  2. Manually pass the flag: ocx claude --permission-mode=bypassPermissions works today. This request is purely for convenience and automation.

Additional context

  • This mirrors how the existing claude() bash wrapper in many users' .bashrc already appends --permission-mode=bypassPermissions for direct claude invocations.
  • The implementation surface is minimal: cmdClaude() in src/cli/claude.ts already has access to the full config. It just needs to read one extra boolean and splice one extra argument.

Checks

  • I searched existing issues and documentation.
  • This request describes a concrete OpenCodex workflow rather than merely naming a desired technology.
  • I removed secrets and personal data.

Activity

  1. added
    enhancement
    on Jul 29, 2026
  2. github-actions commented on Jul 29, 2026

    @github-actions
    Contributor

    Automated translation bookkeeping — detected language: unknown.

  3. jhste102lab commented on Jul 29, 2026

    @jhste102lab
    ContributorAuthor

    Additionally, it would be useful to have an ON/OFF toggle for this in the web dashboard (GUI) under the Claude integration settings, not just the JSON config / CLI path. That way users can flip it without editing config files manually.

  4. added
    cli
    tools
    on Aug 1, 2026
  5. Ingwannu commented on Aug 1, 2026

    @Ingwannu
    Owner

    Declining the persistent configuration option.

    bypassPermissions disables Claude Code's interactive tool authorization boundary. Storing it in OpenCodex config would silently apply that unsafe mode to every later ocx claude launch, including launches where the user no longer remembers the setting. The existing explicit per-launch argument already works and preserves visible consent at the point of use:

    ocx claude --permission-mode=bypassPermissions

    A shell alias is also under the user's direct control. We will not add a dashboard toggle or persistent auto-injection for this flag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    clienhancementtools

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions