> For the complete documentation index, see [llms.txt](https://devlab-machines.gitbook.io/devlab-machines-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://devlab-machines.gitbook.io/devlab-machines-docs/author-worker.md).

# Author worker

Claude Sonnet 5.5 writes the working soul in this app. Patches are proposed only inside a leased author session: press **Run** on the machine, and your key-proven author runner requests patches through the signed propose endpoint. Proposed patches are not executed in this app.

## Bounded automatic loop

* The isolated author selects at most six safe source files (8 KB aggregate; the server caps the entire serialized prompt at 11 KB).
* Source selection excludes secret, config, and protected paths; repository text cannot override hard validation.
* Three provider attempts maximum (`DEVLAB_MAX_ATTEMPTS` may lower this). Each reserves 14,000 tokens conservatively, with a maximum of 84,000 reserved per owner per day and one pending request per owner.
* Provider timeout is 110s; output is capped at 3,000 tokens.
* Failed candidates feed bounded error feedback into the next attempt. Three failures terminate the job.
* Manual patch mode is optional via `DEVLAB_PATCH_FILE`.

Text patches cannot touch protected files, paths outside the checkout, credentials, or runner infrastructure. Patch parsers reject symlink modes (`120000`), submodule modes (`160000`), executable modes (`100755`), copies, and renames. Before patching, reading source, or rebuilding past generations, the worker checks the real Git tree entry and confirms the path stays inside the checkout with no symlinked ancestors.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://devlab-machines.gitbook.io/devlab-machines-docs/author-worker.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
