Background agents run remotely and can install packages or use network access depending on the environment. Treat the remote environment as a separate trust surface.
1. Choose an asynchronous-friendly task
Pick work with a clear done condition: add tests, implement one endpoint, migrate one component or investigate one bug. Avoid tasks that require constant product decisions.
2. Prepare the repository state
Push or expose the exact branch and files the agent needs. Remove accidental secrets and make setup/test commands reproducible.
3. Write acceptance criteria
State files or behaviors in scope, what must not change, tests to run and the expected deliverable. Remote time is wasted when the success condition is vague.
4. Limit credentials and network assumptions
Give only environment variables or external access that the task requires. Assume a remote agent may encounter untrusted web content or dependencies.
5. Review like an external contribution
Inspect commits/diff, run checks locally, review dependency changes and confirm no credentials or unrelated files were introduced before merging.
Work on this as a background task. Scope is limited to [files/feature]. Do not change dependencies unless required. Run [tests]. Return a branch/diff with a short risk note and list every external resource or environment variable used.
Sending an open-ended rewrite; exposing full production credentials; assuming remote package installation is harmless; merging because the agent says tests passed without reproducing them.
Finish check
The remote task produced a narrow, reviewable change with reproducible checks and no unexplained credential, dependency or scope expansion.