Skip to content
This repository was archived by the owner on Sep 18, 2025. It is now read-only.
This repository was archived by the owner on Sep 18, 2025. It is now read-only.

Utilizing opencode in WSL2 returns 'Error: agent coder not found' #62

Closed

Description

@jamesjoplin

When installing and utilizing opencode in an Ubuntu 24.04.2 LTS WSL 2 installation, running opencode in a bash terminal returns

Error: agent coder not found

Attempting to debug with the debug flag returns the same error.

I attempted installation from both the README.md directions utilizing curl and installing the .deb file manually. Both installation methods return the same result.

We intend to utilize the tool via AWS Bedrock.

Activity

  1. kujtimiihoxha commented on Apr 25, 2025

    @kujtimiihoxha
    Contributor

    Might be that the message is misleading, can you make sure that you have the aws env variables setup? I am wondering if it is not able to set the provider config, also for bedrock you need to add a config override, can you share that?

  2. kujtimiihoxha commented on Apr 25, 2025

    @kujtimiihoxha
    Contributor

    Ok it has most likely to do with the env, if none of these match the agent won't be set.

    There should be a better message here for sure but I think that should be the case.

    Image
  3. imrane commented on Apr 25, 2025

    @imrane

    same issue - I've set my keys for openai & anthropic

  4. jamesjoplin commented on Apr 26, 2025

    @jamesjoplin
    Author

    Thanks for the quick feedback! It was very helpful to quickly troubleshoot.

    We utilize the AWS CLI SSO behavior since we utilize IAM Identity Center to manage credentials, we never set the AWS_* variables. The ~/.aws/config file defines the multi account setup utilized across our application landscape.

    That being said - I was curious why it was working on different equipment for me...

    I didn't have AWS_DEFAULT_REGION set in my bash profile for WSL2. Once I set this, the hasAWSCredentials function looks like it will return true and we are off to the races. It was great to have everything work OOTB without having to configure!

    Setting this variable doesn't cause issue with the aws sso login process we use daily to get short lived credentials.

    I believe this is good to close -- minor rough edge with the misleading error message.

    I've never written go code before but I'm happy to take a look and submit a PR to provide a better error message if it would help.

  5. kujtimiihoxha commented on Apr 27, 2025

    @kujtimiihoxha
    Contributor

    @jamesjoplin thanks for the response, I think I will rework a little how this works currently. Let me know if for now we can close this issue.

  6. jamesjoplin commented on Apr 27, 2025

    @jamesjoplin
    Author

    Good to close. Thank you! Looking forward to watching this grow and evolve.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions