Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jamesjoplin opened this issue Apr 25, 2025 · 4 comments
Open

Comments

@jamesjoplin
Copy link

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.

@kujtimiihoxha
Copy link
Collaborator

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?

@kujtimiihoxha
Copy link
Collaborator

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

@imrane
Copy link

imrane commented Apr 25, 2025

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

@jamesjoplin
Copy link
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants