anomalyco / anomalyco/opencode
Bedrock credential_process sessions expire far faster than expected vs. native handling in other tools
@nexxeln is already working on this.
Since Aug 12, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
Using amazon-bedrock provider with a credential_process-based AWS profile (wrapping an aws login-authenticated session), AWS sessions are expiring inconsistently and often much sooner than expected — sometimes within 10–20 minutes, occasionally close to the full session window. This happens across multiple machines (Windows and Kali Linux) using the same AWS profile.
A colleague using the same underlying aws login session with Claude Code (not OpenCode), and a plain AWS profile with no credential_process wrapper, does not experience this issue — sessions hold for the expected duration.
This may be related to the credential-loading gap described in #8559, and/or to how frequently OpenCode's Bedrock provider invokes credential_process per session versus other.
`[profile <REDACTED_PROFILE_NAME>]
login_session = arn:aws:iam::<REDACTED_ACCOUNT_ID>:user/<REDACTED_USERNAME>
region = ap-southeast-2
[profile bedrock-cred]
region = ap-southeast-2
credential_process = aws configure export-credentials --profile <REDACTED_PROFILE_NAME> --format process`
"amazon-bedrock": { "options": { "region": "ap-southeast-2", "profile": "bedrock-cred" } }
Plugins
No response
OpenCode version
1.18.16
Steps to reproduce
Authenticate via aws login --profile <REDACTED_PROFILE_NAME> --region
Confirm valid session: aws sts get-caller-identity --profile <REDACTED_PROFILE_NAME>
Launch OpenCode, select an amazon-bedrock model, and use it normally in a session
At some point — inconsistently, sometimes within 10–20 minutes, sometimes much longer — OpenCode throws a credentials/token expired error
Manually re-running aws login and retrying resolves it, but the same pattern recurs
Screenshot and/or share link
No response
Operating System
No response
Terminal
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.