Skip to content

op plugin run -- gh fails with "interactive IO not available" after successful biometric approval #575

@SamBarker

Description

@SamBarker

Environment:

  • op version: 2.32.0
  • gh version: 2.86.0
  • macOS: 26.2 (Build 25C56)
  • Context: Claude Code CLI tool (non-interactive subprocess, no TTY)

Description:

Running op plugin run -- gh api ... from a non-interactive shell (Claude Code's Bash tool, which has no TTY) triggers the 1Password biometric prompt as expected. After successfully approving the prompt, the command fails with:

[ERROR] 2026/02/12 21:13:17 interactive IO not available

Steps to Reproduce:

  1. Configure gh shell plugin with 1Password (alias gh='op plugin run -- gh')
  2. Run a gh command from a context with no TTY attached (e.g., a subprocess without a pseudo-terminal)
  3. 1Password biometric prompt appears and is approved
  4. Command fails with interactive IO not available

Expected Behavior:

After successful biometric approval, op should inject the credential and run gh to completion. The authentication gate has been passed — there should be no further need for interactive IO.

Actual Behavior:

op fails post-approval with interactive IO not available. The credential was presumably unlocked, but something in the post-auth flow requires a TTY that isn't present.

Workaround:

Bypass the plugin entirely and call the gh binary directly (e.g., /opt/homebrew/bin/gh), relying on gh's own stored auth token.

Notes:

  • tty returns not a tty and [[ -t 0 ]] is false in this context
  • This differs from #120 where the alias isn't available at all. Here, op plugin run is invoked explicitly and the biometric prompt works — the failure is post-authentication.
  • Once the session is cached (presumably from a recent approval), subsequent calls from the same non-TTY context succeed. This suggests the error only occurs during the initial credential provisioning flow.

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