Skip to content

Shell completion probes run full CLI startup and feel slow #25692

Closed as not planned

Description

@luojiyin1987

Description

Shell completion probes are slower than they need to be because opencode --get-yargs-completions ... still goes through the normal CLI startup path.

The generated completion script calls that path on every completion request, so the extra startup work shows up as visible tab-completion lag.

Plugins

None

OpenCode version

v1.14.33

Steps to reproduce

  1. Enable shell completion with opencode completion
  2. Type a partial opencode command in the shell
  3. Press Tab
  4. Notice the completion delay

Direct measurement:

time opencode --get-yargs-completions opencode >/dev/null

Screenshot and/or share link

N/A

Operating System

Linux

Terminal

zsh

Activity

  1. github-actions commented on May 4, 2026

    @github-actions
    Contributor

    This issue doesn't fully meet our contributing guidelines.

    What needs to be fixed:

    • No issue template was used. Please resubmit using one of the three required templates: Bug Report, Feature Request (title must start with [FEATURE]:), or Question. This issue appears to combine a bug report (completion probe slowness) and a feature request (documentation + optimization), so please split or choose the most appropriate template.

    Please edit this issue to address the above within 2 hours, or it will be automatically closed.


    This issue might be a duplicate of existing issues. Please check:

    If you believe this was flagged incorrectly, please let a maintainer know.

  2. changed the title [-]Document shell completion setup and avoid full CLI init for completion probes[/-] [+]Shell completion probes run full CLI startup and feel slow[/+] on May 4, 2026
  3. luojiyin1987 commented on May 4, 2026

    @luojiyin1987
    ContributorAuthor

    Reformatted this as a bug report. #1515 is about shell-completion support existing at all; this issue is specifically about the hot-path latency of opencode --get-yargs-completions. Fix is in #25693.

  4. github-actions commented on May 4, 2026

    @github-actions
    Contributor

    Thanks for updating the issue! It now follows the Bug Report template with clear reproduction steps and context. Removing the compliance flag.

  5. github-actions commented on Jul 4, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

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

Metadata

Metadata

Assignees

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