Configure This Environment
Configure this environment has an agent finish setting up a Draft environment. It works in the Draft until the image builds, the app answers at its primary Launch URL and the tests pass (a Draft with no tests is verified without them), or until it reaches one of the budgets you set. You review what it changed and set the environment Active yourself.
It is for Drafts, typically one made with Generate from repository, when what CoderFlow detected isn't enough on its own: a runtime version to install, a start command to correct, a test that needs a setting.
Where to start it
All three open the same panel. Opening the panel starts nothing.
- In Finish setup, a generated Draft's setup has a Configure this environment step. See Finish setup.
- On the Overview tab, a Draft shows a Configure this environment card to the people who manage it.
- A link to
index.html?env=<environment>&template=configure-this-environmentopens the panel for that Draft on the Environments page.
It is offered only to people who have every permission a run needs on the Draft: managing it and its details (environments:manage, environments:view_details), its files (environments:files), building it (environments:build), and creating and running tasks in it (tasks:create, tasks:execute). It is never offered on an Active environment. A Draft whose configuration hasn't been generated yet gets Generate configuration first.
Before you launch
The panel checks whether the agent can run and shows what the run will use. Nothing is started until you click Launch.
- Builds — how many image builds the agent may start, from 1 to 5. A build past this budget is refused.
- Time (minutes) — how long the run may take, from 5 to 60 minutes, counted from when its runtime starts being prepared (time waiting in the queue isn't counted). It stops at this deadline; shutting down can take a little longer.
- Tokens — from 25,000 to 1,000,000 (250,000 by default). The run stops after reported non-cached usage reaches this many tokens. Cache reads aren't counted. Usage is reported after it's spent, so the final count can be somewhat higher than the budget: it isn't a hard spending cap.
Changing a budget updates the panel. It also shows:
- Estimate — a rough range of non-cached tokens and the expected minutes of work. The cost isn't estimated, because CoderFlow doesn't know the provider's price.
- Runs on — the CoderFlow base image, so the agent can start before the Draft's own image builds.
- Verification — to check its work, CoderFlow starts one extra verification container at a time from the Draft's configuration.
- Tests it must pass — the tests the run is judged by.
- It can't run yet — what prevents a run, each on its own line. Launch stays off until they are resolved. For example:
- The server's MCP Server is turned off. The agent changes the Draft through it, and it is off by default: a Server Admin turns it on under Settings → Integrations → MCP Server (see Enable the MCP Server). The panel links there for Server Admins.
- The CoderFlow base image isn't built yet.
- A run is already going in this Draft.
- Another environment uses the Draft's Docker image name.
- The default agent is neither Claude nor Codex.
- CoderFlow couldn't inspect something the run needs.
- Warnings — things to check before launching.
The preview is valid for five minutes. If it has expired, or something changed, Launch checks again first and asks you to review the new preview. If CoderFlow can't confirm whether the run started when you click Launch (no answer, or a server error), the button becomes Launch again: it repeats that same launch with the same budgets, even after you close and reopen the panel, so it can't start a second run. If CoderFlow answers that it can't tell whether the run started, the panel offers no further launch; the run's state shows under Latest run. If Configure this environment isn't available on your server, the panel says so and nothing can be launched.
What the agent may change
The agent works only on its own Draft environment, with the access of the person who launched it:
- May: change the Draft's configuration fields and files (pre-clone instructions, the start command, ports, Launch URLs, tests and the other settings on the environment tabs), start a build and read its output, start the app server, and run a named test.
- May not: change another environment, set the Draft Active, enter or copy credentials, or change secrets' values. There is no
sudoin task containers, so runtime changes go into the pre-clone instructions and are checked by rebuilding.
Its changes stay in the Draft and are attributed to you, the person who launched it.
The result
After Launch, the panel links to the run's task, and the Overview card shows the latest run:
- Queued, Running, Checking its work in a separate verification container while it works.
- Finished when the image built, the app answered and every test passed.
- Verified without tests when the image built and the app answered, and the Draft has no tests. Its Finish setup step then reads Done: verified without tests.
- Stopped before finishing, with the reason: it used all its builds, reached its time budget, stopped after reported non-cached usage reached its token budget, its work didn't pass the verification check, or access to the Draft changed.
- Can't tell when CoderFlow can't read the run's state. Open the task to see what happened.
A Draft with no detected tests can be verified without tests: the run then succeeds when the image builds and the app answers. If the agent finds a test suite CoderFlow missed, it adds it as a named test, which must then pass, and it never adds a placeholder test.
The latest run also shows the builds it used, the non-cached tokens reported so far ("can't tell yet" until the agent reports usage), and whether its result has been written to the task's outputs. CoderFlow keeps a limited number of finished runs' records; for an older run the panel says the run's record is no longer kept, while its task and its outputs remain.
The task holds the configuration changes, the build log, the test output and a screenshot of the running app. Review them on the Draft's tabs.
Set the environment Active yourself
The agent never activates the environment. When you are satisfied, open the Draft's Overview tab, set Status to Active, and click Save. Until then it stays a Draft, visible only to the people who manage it. To keep the changes, commit them to the setup repository as for any other environment change.
For lessons from ordinary tasks after setup, configure Retrospectives in the Lessons tab. Setup tasks themselves do not get retrospectives.