
Your AI Coding Agent Can Work While You Sleep — But Should It?
Explore how AWS runs Claude Code as a remote coding agent using isolated AgentCore sessions, short-lived credentials, private networking, automated testing, and human-reviewed GitHub pull requests.
Your AI Coding Agent Can Work While You Sleep — But Should It?
Imagine giving an AI coding agent a development task before going to sleep.
You close your laptop, and somewhere in your cloud environment, an AI agent starts working on your codebase.
It examines the repository, understands the task, writes code, executes tests, reviews its changes, and eventually creates a GitHub Pull Request for you.
When you return, you have a proposed implementation waiting for your review.
Sounds interesting?
But there is a bigger engineering question:
Would you trust an AI coding agent with access to your development environment, source code, and credentials?
On November 6, 2026, AWS published a technical walkthrough demonstrating how to extend Claude Code into remote coding sessions using Amazon Bedrock AgentCore.
The architecture introduces isolated execution environments, temporary GitHub credentials, private networking, and human-reviewed pull requests.
Let's understand how it works.
1. Why Move AI Coding Agents to the Cloud?
Most developers initially run coding assistants locally.
The agent uses the developer's machine, local files, terminal, and development environment to complete tasks.
But this approach introduces limitations.
- Multiple coding tasks may compete for the same machine.
- Long-running tasks occupy local resources.
- Developer credentials may be exposed to the execution environment.
- Scaling multiple independent coding tasks becomes difficult.
Remote coding agents offer a different approach.
Instead of running everything on your laptop, you submit a task to a remote environment.
Each task can execute independently, and the result can be returned as a Pull Request.
The interesting idea is simple: assign the task, leave your laptop, and review the result when the agent finishes.
2. What AWS Demonstrated with Claude Code and AgentCore
AWS demonstrated how Claude Code can run as a remote agent using Amazon Bedrock AgentCore Runtime.
The architecture runs each coding task in its own isolated runtime session inside the developer's AWS account.
The sample uses:
- Amazon Bedrock for Claude model inference.
- Amazon Bedrock AgentCore Runtime for isolated execution.
- AgentCore Identity for GitHub credentials.
- Amazon Bedrock Guardrails for screening submitted task prompts.
- Amazon DynamoDB for task tracking.
- Amazon SQS for task queuing.
- AWS Lambda for task orchestration.
- Amazon ECR for container images.
- GitHub for source control and Pull Requests.
This is an important distinction: the AWS implementation is a sample architecture that developers can deploy and customize, rather than a single built-in feature that automatically takes over an entire development environment.
Official AWS article:
3. How the Architecture Works
Let's break the workflow into seven stages.
STEP 1: SUBMIT A CODING TASK
The developer submits a task through Claude Code using an MCP plugin or through the web console.
For example:
"Find a missing unit test in this repository and add a test covering the normal case and one edge case."
STEP 2: QUEUE THE TASK
The request passes through an API.
An AWS Lambda function screens the submitted prompt using Amazon Bedrock Guardrails.
The task is then recorded in DynamoDB and placed in an Amazon SQS queue.
STEP 3: START AN ISOLATED ENVIRONMENT
A dispatcher starts a dedicated Amazon Bedrock AgentCore Runtime session for that task.
Each session runs inside its own microVM with isolated CPU, memory, and filesystem.
This is particularly important because the coding agent does not need to execute every task directly on the developer's laptop.
STEP 4: ACCESS THE REPOSITORY
The agent obtains a GitHub access token through Amazon Bedrock AgentCore Identity.
It then clones the registered repository and can retrieve useful lessons from previous tasks through AgentCore Memory.
STEP 5: WRITE AND TEST CODE
Claude Code plans the changes using Claude Opus on Amazon Bedrock.
It writes the implementation using Claude Sonnet and executes the repository's setup and test commands.
STEP 6: REVIEW THE IMPLEMENTATION
Claude Code reviews its own result using Claude Opus.
If needed, it can return to the planning stage for another attempt.
In the AWS sample, the process is limited to a maximum of three attempts.
STEP 7: CREATE A GITHUB PULL REQUEST
The agent creates a new branch and opens a Pull Request.
The PR records the verification command, its exit code, and the attempts used.
If verification does not pass, the PR opens as a draft.
The agent creates the Pull Request, but a human reviews and merges it.
That final boundary is one of the most important parts of this architecture.
4. The Interesting Part: Security and Isolation
Running an AI coding agent remotely is not only about convenience.
The execution environment must also be controlled.
AWS's sample introduces several security mechanisms.
A. Isolated MicroVM Sessions
Every task runs inside its own AgentCore Runtime session.
Each session gets an isolated environment with dedicated CPU, memory, and filesystem.
When the session ends, its microVM memory is sanitized.
This helps prevent different coding tasks from sharing the same execution environment.
B. Short-Lived GitHub Credentials
The agent does not hold a permanent GitHub access token.
AgentCore Identity provides a temporary user-to-server token that expires after eight hours and is automatically refreshed.
The GitHub App is installed only on the repositories that the developer authorizes.
This limits which repositories the agent can access.
C. Private Networking
The runtime executes inside private subnets in the developer's VPC.
Private endpoints provide access to Amazon Bedrock and other AWS services.
The architecture also uses controlled outbound networking for GitHub and package registries.
D. Least-Privilege IAM Permissions
The runtime receives only the permissions needed for its task.
For example, it can access its own repository's task records and memory and invoke the supported Claude models through Amazon Bedrock.
It does not receive unrestricted AWS account permissions.
E. Human Review Before Merging
The agent can create a Pull Request, but it cannot merge its own changes.
Developers can inspect the code differences, test results, and verification history before accepting the implementation.
Automation should create the change. Human review should decide what enters the main codebase.
5. An Important Security Limitation
There is something particularly important that developers should not overlook.
Amazon Bedrock Guardrails screens the submitted task prompt before it enters the queue.
However, AWS explicitly notes that this sample does not screen repository files or command output for prompt injection during execution.
Imagine a repository containing a malicious instruction inside its README or a source-code comment.
The agent might encounter that instruction while examining the repository.
Therefore, prompt screening alone does not protect every stage of the coding process.
AWS identifies trusted repositories as the appropriate use case for this sample.
Never assume that an isolated execution environment automatically makes untrusted code safe.
6. What Kind of Coding Tasks Are Suitable?
AWS identifies some specific use cases that fit this architecture better than others.
GOOD FIT:
- Small feature implementations.
- Clearly defined bug fixes.
- Adding missing unit tests.
- Scoped refactoring tasks.
- Tasks in trusted repositories with working setup and test commands.
NOT A GOOD FIT:
- Running untrusted repositories.
- Completely open-ended development tasks.
- Tasks without a reliable verification process.
- Changes that require continuous human direction.
The sample also limits an individual task to three attempts.
This is an important reminder that remote coding agents work best when the task is clearly defined and measurable.
7. The Cost Trap Developers Should Know About
Remote coding agents introduce infrastructure costs in addition to model inference costs.
The AWS sample continues to incur charges while idle through resources such as:
- NAT Gateway.
- VPC interface endpoints.
- AWS WAF.
- Amazon Cognito user pool.
- DNS Firewall.
- Container images.
- Logs and supporting resources.
Another important detail:
The sample configures a default $200 monthly Amazon Bedrock budget that sends email notifications.
This is not a hard spending cap.
It does not stop usage automatically when the budget is exceeded.
Developers should understand the actual pricing of the deployed resources and remove the infrastructure when it is no longer needed.
This is particularly important when experimenting in a personal AWS account.
8. What Does This Mean for the Future of Software Development?
AI coding assistants are moving beyond simple code suggestions.
They can now participate in larger development workflows involving planning, implementation, testing, code review, and Pull Request creation.
Remote execution introduces another possibility: multiple independent coding tasks can run in separate environments without competing for one local machine.
But this does not eliminate the need for software engineering discipline.
Developers still need:
- Clear task definitions.
- Reliable automated tests.
- Secure credential management.
- Repository-level permissions.
- Infrastructure monitoring.
- Human code review.
The future is not simply about letting AI write more code. It is about building systems where AI can perform useful work without losing control over the development process.
My Takeaway
I am currently exploring LLM development, Python, software architecture, and AWS services.
This architecture caught my attention because it connects several areas of engineering:
LLMs, agentic workflows, isolated execution environments, identity management, networking, automated testing, and GitHub integration.
What I find particularly interesting is the separation between performing a coding task and approving its result.
An AI agent can handle implementation and verification, but the final decision about merging the code remains with the developer.
That is a practical balance between automation and accountability.
Question for the AWS Community
Imagine you could delegate three independent development tasks to three remote AI coding agents.
Each agent would work in its own isolated environment and return a Pull Request.
Would you trust this workflow for real development projects, or would you still prefer running coding agents locally?
What would be your biggest concern: code quality, repository security, unexpected costs, or the reliability of automated testing?
I'd especially like to hear from developers experimenting with Claude Code, Amazon Bedrock AgentCore, remote coding agents, or AI-powered development workflows.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article