Background: The Evolution of Coding Agents Beyond Local IDEs
Claude Code is already being used by many developers in local environments as a model provider for Amazon Bedrock. However, local execution has constraints such as single machine resource contention, credential exposure risks, and inability to close laptops during tasks. The latest post on the AWS Machine Learning blog introduces a solution to these limitations with the Amazon Bedrock AgentCore runtime through the implementation of sample-remote-coding-agent.
"Hand off the task and come back with the results after closing your laptop" — this is the core promise of this article.
The remote agent pattern transforms coding tasks into a hand-off. Multiple tasks are executed simultaneously, each running in a disposable environment, and the results return as pull requests that team members can review. However, it is also noted that steering during execution is difficult, environment configuration is required, and cost prediction is challenging.
Architecture: Isolated MicroVM Sessions and Control Plane
The sample architecture is divided into a control plane and an execution plane. Developers submit tasks via the Claude Code local plugin (`sample-rca`) or a web console served by Amazon CloudFront. Submission requests are signed with AWS IAM credentials and passed to the Amazon API Gateway HTTP API, or enter through the Cognito authorization API after Amazon Cognito authentication.
- task submission
- guardrail check
- queue loading
- AgentCore session start
- repository checkout
- planning
- code writing·verification
- review·retry
- PR creation
The core of the execution plane is the AgentCore runtime session. A dedicated AgentCore runtime exists for each registered repository, using a single container image stored in Amazon ECR. This image includes Claude Code CLI, Claude Agent SDK, git, and make. Each session has isolated CPU, memory, and filesystem in a microVM (lightweight virtual machine) and communicates with Bedrock and other AWS services through a private endpoint.
Security: The Three Key Characteristics of Bedrock Inherited by Remote Sessions
The three security characteristics of Bedrock emphasized by AWS are applied to the remote execution environment without modification.
| Security Characteristic | Details | Implications in Remote Sessions |
|---|---|---|
| Data Protection | No model training on content, provider access not allowed, compliance with SOC/ISO/FedRAMP/HIPAA/GDPR | Prompts, completions, and logs are not exposed to model providers or AWS operators |
| Access Through Existing Governance | Temporary IAM credentials, integration with Entra ID/Okta, private connection to VPC via AWS PrivateLink | Developer authentication and authorization systems remain intact, traffic does not traverse the public internet |
| Retention·Operator Access Control | Mantle inference engine's Zero Operator Access (ZOA), Zero Data Retention (ZDR) configurable | AWS operators technically cannot access customer data, durability storage of requests and responses can be blocked |
These characteristics are automatically inherited because all model calls are routed through Bedrock. Additionally, Amazon Bedrock Guardrails are used for pre-checking task prompts.
Workflow: Detailed 7 Steps from Submission to PR Creation
1. Submit — The Claude Code plugin runs a local MCP (Model Context Protocol) server to provide additional tools and calls the API Gateway after signing with AWS credentials. The web console path calls the Cognito authorization API after Cognito authentication. 2. Queue — AWS Lambda checks prompts with Guardrails → records tasks in Amazon DynamoDB → loads the queue in Amazon SQS → the dispatcher function starts the AgentCore session in the corresponding repository runtime. 3. Run in Isolated Session — Dedicated runtime, container image, microVM, and private VPC endpoint per repository. 4. Check Out and Plan — Obtains GitHub access token from AgentCore Identity → clones the repository → retrieves past task lessons from AgentCore Memory → establishes a change plan with Claude Opus. 5. Code and Verify — Writes code with Claude Sonnet → executes the repository's own setup·test commands in the same session. 6. Review — Claude Opus reviews results → resends to the planning stage (up to 3 retries). 7. Open a Pull Request — Pushes to the `agent/<taskId>` branch → generates a PR with verification commands, exit codes, and attempt counts recorded (remains draft until verification passes). The agent never merges.
The status of each step is recorded in DynamoDB, allowing Claude Code and the console to track task progress.
Scope and Limitations: Where to Use and Where Not to Use
Good Fit
- Development of clearly scoped features
- Bug fixes
- Writing test code
- Trusted repositories that declare their own setup·test commands
Not a Fit
- Untrusted code — The agent executes the repository's own commands, so safety cannot be guaranteed
- Open-ended work — Tasks end after a maximum of 3 attempts
This distinction arises from the design constraint that "the agent cannot execute the repository's own commands safely".
Developer Perspective Implications: From Local to Remote, from Credentials to IAM
This architecture replaces local credentials (such as shell environment variables) with cloud IAM roles. AWS keys do not reside on developer laptops, and access to Bedrock, AgentCore, and GitHub is achieved solely with temporary IAM credentials. Since Bedrock traffic remains within the VPC via PrivateLink, the network attack surface is also reduced.
AgentCore Memory goes beyond simple log storage to extract and reuse implicit knowledge such as "hidden build prerequisites". This leads to improved planning quality in repeated tasks within the same repository. However, the hardcoded maximum of 3 retries may impose constraints on complex refactoring.
---