Skip to content

Slow startup when AWS_PROFILE is set #7614

Closed

Description

@Biacode

Description

When you have AWS_PROFILE env var it assumes you gonna use AWS bedrock and the CLI starts ethernity

Plugins

doesn't matter

OpenCode version

v1.1.11

Steps to reproduce

1, Set AWS_PROFILE
2. Open opencode
3. see it takes too long to start

Screenshot and/or share link

No response

Operating System

Linux Ubuntu 22.04

Terminal

Gnome terminal, Ghosy, no matter what

Activity

  1. added
    perfIndicates a performance issue or need for optimization
    on Jan 10, 2026
  2. github-actions commented on Jan 10, 2026

    @github-actions
    Contributor

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

    Feel free to ignore if none of these address your specific case.

  3. Biacode commented on Jan 10, 2026

    @Biacode
    Author

    as a fix

    alias opencode='AWS_PROFILE= BUN_TMPDIR=$HOME/.opencode/tmp opencode'
  4. Biacode commented on Jan 10, 2026

    @Biacode
    Author

    OpenCode runs this command on every startup:
    bun add --force --exact --cwd ~/.cache/opencode @aws-sdk/credential-providers@latest

    This causes:

    • --force bypasses the local cache
    • @latest requires npm registry lookup
    • ~30 second delay even with packages already installed

    Log Evidence

    INFO +0ms service=bun cmd=["opencode","add","--force","--exact","--cwd","/home/user/.cache/opencode","@aws-sdk/credential-providers@latest"]
    INFO +29183ms service=bun code=143 stdout=bun add v1.3.5 ... stderr=Resolving dependencies

    Root Cause

    OpenCode's provider detection sees AWS_PROFILE → assumes user wants AWS Bedrock → installs AWS SDK with --force flag on every startup, defeating caching.

    Workaround

    AWS_PROFILE= opencode

  5. fantomc0der commented on Jan 20, 2026

    @fantomc0der

    Experienced extremely slow starts after trying OpenCode for the first time. Attempted this fix by clearing AWS_PROFILE and resolved the issue for me.

  6. added a commit that references this issue on Jan 21, 2026
    b47d573
  7. github-actions commented on Mar 26, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 90 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

bugSomething isn't workingperfIndicates a performance issue or need for optimization

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions