Skip to main content

Hosted Coding Agents: From Repository to Reviewable Pull Request

· 6 min read
SchemaBounce

A hosted coding agent needs more than a place to run the model. It needs a repository, an execution environment, a way to check the work, and a controlled path for getting the result back into Git.

Moving the process into a container doesn't settle those questions. It makes the boundaries easier to define, provided you actually define them.

The useful output is a reviewable change with evidence, not a transcript saying the agent finished.

A session should have a narrow job​

A hosted coding session typically starts with a repository and a task. The environment is provisioned, the repository is cloned, and the coding agent works on a branch.

From there it can inspect code, edit files, and run the commands allowed by its execution policy. The result might be a patch, commits on a branch, or a pull request after the required approval.

The distinction matters. Making edits isn't the same as pushing a branch. Pushing isn't the same as opening a pull request. A pull request isn't a merge.

If your task board collapses all of those into "done," people will eventually review a status message instead of the code.

What the hosted environment provides​

SchemaBounce's coding-agent documentation describes short-lived coding sessions in an isolated, per-workspace environment. Sessions are time-boxed and metered, and their activity is visible while they run.

The documented Claude Code path runs the actual CLI rather than asking a general chat agent to imitate it. The platform also documents hosted Codex sessions. Runtime choice and billing are separate configuration concerns; don't infer either from the words "hosted agent."

The execution environment and the surrounding agent platform also do different jobs. A business agent can identify a task and request code work. The coding session handles repository work. The result returns as something a person can inspect.

The MCP integration docs describe tools available to the surrounding agents and external clients. Connecting an MCP server isn't itself the same as provisioning a coding sandbox.

For the broader split between model and execution infrastructure, see the agent harness explainer. The platform selection guide puts code sessions alongside the rest of the runtime; the orchestration comparison covers the surrounding application-level choices.

Choose the session type before provisioning​

Not every coding-related request should run a full change-and-push pipeline.

The documented session types distinguish:

TypeIntended result
codeRepository changes, with the applicable setup, pipeline, checks, and reviews
read_onlyInvestigation or verification that changes no files and never pushes
contentDocumentation or copy changes, with checks selected for the changed content

Use investigation for a question that needs evidence but no patch. Don't make the agent edit a file just to demonstrate that it did work.

For a real change, checks should fit the repository and the patch. A documentation edit and an API behavior change don't need identical validation. That doesn't mean relevant checks are optional because the task sounds small.

Write a brief that survives the handoff​

A useful task tells the coding session what behavior to change, where the relevant area is, and how to know the work is acceptable.

For example:

Add pagination to the existing issue-list endpoint using the API's current conventions. Preserve the existing response fields. Add tests for the first page, the final page, and an invalid cursor. Run the relevant test suite and report the commands and results. Do not merge the change.

That's illustrative task wording, not a claim about an endpoint in a particular repository.

Before handing over real file paths, inspect the repository. A precise-looking path that doesn't exist is worse than a clear description of the area to investigate.

Keep constraints close to the requested behavior: compatibility, scope, relevant checks, and whether planning needs review before editing. "Improve the backend" leaves all of that for the agent to guess.

Put approvals at the actual boundary​

The documented default requires human approval for agent-initiated pushes and pull requests. The environment also distinguishes commands allowed inside the working directory from sensitive actions that require review.

A session waiting on a person isn't the same as a failed session. Nor is a human saying "looks fine" in an unrelated message proof that the queued command was approved. Use the platform's actual approval flow.

The human-in-the-loop guide covers why the approval has to bind to the action being executed.

Sandboxing isn't a blanket claim that the agent cannot reach anything else. Repository credentials, network access, mounted data, and approved commands still define its real authority. Review those boundaries instead of treating "container" as a complete security argument.

Review the failure as well as the patch​

A test failure, a rejected push, a dependency-install error, and an expired approval need different responses.

Read the recorded failure first. If a resumable checkpoint exists, continuing the same session preserves its work and context. Starting again from scratch can lose the useful investigation while repeating the expensive parts.

Retries also need care around Git operations. A lost response after a push doesn't prove the branch wasn't pushed. Check the result before repeating an external operation.

At handoff, inspect the diff, the checks that actually ran, the checks that didn't, and the branch or pull request link. Keep unsupported claims out of the task summary. "Tests passed" should name successful test execution, not the agent's intention to run them.

A completed coding session can hand the work to review without declaring the ticket finished. That separation gives the next person a concrete change to accept, reject, or send back with a smaller follow-up task.

Written with AI assistance. Publication requires human approval.