aws / aws/bedrock-agentcore-starter-toolkit

[BUG] Launching Bedrock AgentCore...:x: Build failed during COMPLETED phase :x: CodeBuild failed with status: FAILED

Open
#283 0 comments 0 reactions 0 assignees View on GitHub
bug runtime
Dominant language
Python
Stars
508
Forks
155
Avg merge
8h 50m
Merged PRs (30d)
4

Description

I'm trying to deploy an agent to AgentCore Runtime but I'm getting the following error when I execute the agentcore launch command:

⠼ Launching Bedrock AgentCore...:x: Build failed during COMPLETED phase
:x: CodeBuild failed with status: FAILED

I checked CodeBuild and this is the error that is causing the failed state:

[Container] 2025/10/10 15:56:38.264664 Phase context status code: YAML_FILE_ERROR Message: could not find expected ':' at line 28

I checked the buildspec file and looks like that when the name of the file for the agent is too long (attached image), codebuild cuts it and it produces this error, I fixed it by leaving it in one line and the build succeeded, but when I tried to invoke agentcore with agentcore invoke command , it threw an error saying "Agent not deployed - run 'agentcore launch' to deploy" , maybe because the process of agentcore launch didn't actually finish from the agentcore launch command.. so it's kinda like a loop.

Image

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the failure with `agentcore launch` using an agent filename long enough to trigger the reported CodeBuild YAML_FILE_ERROR, then inspect the generated buildspec file. Verify that the buildspec remains valid, launch completes successfully, and `agentcore invoke` no longer reports that the agent is undeployed.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.