Inside a Fairlx coding session: sandbox, live preview, pull request
What actually happens between “assign to agent” and “PR ready for review”: the VM, the clone, the health check, the self-healing loop and the Accept gate.
Fairlx Engineering
Engineering
under the hood
Inside a Fairlx coding session

From the outside, a Fairlx coding session looks simple: you assign a work item to the Fairlx Agent, and a while later a pull request appears with a live preview attached. This post covers what happens in between, from the VM that boots to the moment the sandbox is torn down, and the design choices behind each step.
One rule: no code on our host
The constraint that shapes everything else is simple. Git and shell commands never run on the Fairlx host. All code changes happen inside a sandbox that is bound to a single work item. That gives every session a clean boundary. The agent can install packages, run your test suite and start your dev server without any of it touching the service that holds your board, your secrets or other customers’ data.
It also means every session is reproducible. A sandbox starts from your repository and your project’s sandbox settings, not from whatever state a shared build machine happened to be in.
The timeline
Here is the full path of a session, in order.
- Assignment. You assign a work item in a project with a linked GitHub repository to the Fairlx Agent. A session can also start from Agent Home, from
/fairlxin Slack, or over MCP. - A VM for the work item. Fairlx creates an isolated Azure VM for that item, with the project’s secrets injected at creation.
- Clone. The repository is cloned into
/workspace. The token used for the clone is not left in the remote URL. - Install and start. Fairlx detects the package manager and start command, or uses the runtime and prepare script from the project’s sandbox environment, installs dependencies and starts the dev server in the background.
- Health check. Fairlx probes the running app. Only when the check passes is the preview exposed and the link marked shareable.
- Branch. The agent works on a branch under the
fairlx/prefix named for the work item key, never on your default branch. - Plan. The agent investigates and writes an implementation plan that names the repository paths it will change. In Staged mode the plan waits for your Accept.
- Implement and test. The agent edits code, runs commands and browser checks in the sandbox, and fixes what breaks.
- Review. The diff, checks and a walkthrough appear in the Changes tab. A comment on a hunk sends the agent back to work.
- Pull request. The agent pushes the branch and opens a pull request, after your Accept.
- Merge and CI. The merge waits for your Accept. Afterward, Fairlx watches CI on the merge commit.
- Idle and teardown. An idle sandbox suspends after 15 minutes and is deleted after 24 hours idle.
Each session also carries an explicit state. The sequence below is illustrative. It shows the states in the order a typical session moves through them, with a note on what triggers each transition.
queued session created from the board, Agent Home, Slack or MCP
preparing VM created → repo cloned into /workspace → install → dev server started
running health check passed → preview shareable → agent implementing on its fairlx/ branch
awaiting review pull request opened (or branch pushed) → diff in the Changes tab
iterating a hunk comment or @Fairlx mention resumed the agent
merging merge requested → waits for Accept unless Autonomous coding is on
merged merge succeeded on GitHub
terminal states: failed, stoppedWhy the preview waits for a health check
A preview link that loads a blank page or a stack trace is worse than no link at all, especially when you have already pasted it into a channel for a designer. So the URL can be reserved early, but it only becomes shareable after the health check passes. You can view it as a desktop or a phone.
There is one deliberate exception to the “healthy or nothing” rule. If the server is up but the page is showing a compile error, the session stays open, because that is exactly the situation the agent can fix.
The run panel
Every session has a run panel with four tabs:
- Plan shows the implementation plan, the steps completed so far and what is left.
- Changes shows the diff against the base branch, including files that are not committed yet, plus checks and a walkthrough. Click a line in a hunk to comment, and the comment resumes the agent.
- Terminal shows the commands the agent ran in the sandbox and their output.
- Preview shows the running app once it is healthy, with a copyable link.
Self-healing without starting over
Dev servers break in ordinary ways. A font import fails, a build chunk goes missing, a dependency changes shape. The tempting fix is to throw the VM away and start again, but that throws away the agent’s uncommitted work too.
Fairlx does the opposite. When the preview shows a compile or runtime overlay, the agent edits the source in place and Fairlx restarts the dev server. The VM is not wiped, so everything the agent has done so far stays where it is.
Testing inside the box
The agent can run your project’s own commands, such as the test suite, the type checker and the linter, inside the sandbox. It can also run browser checks with Playwright against the live app, from inside the VM, and capture the preview. If a check fails, the agent changes the code and runs it again in the same sandbox, so the feedback loop does not wait on a CI round trip.
Accept gates and draft pull requests
By default a session runs in Staged mode, with four points where it stops and waits for a person:
| Gate | What waits |
|---|---|
| Implementation plan | The plan, with the paths it will change, before any implementation starts. |
| Shell writes | Any sandbox command that is not provably read-only. |
| Open PR | Pushing the branch and opening the pull request. |
| Merge | Merging the pull request on GitHub. |
Turning on Autonomous coding skips these extra Accepts on plan, start, pull request and merge. The approvals model is covered in depth in Staged mode and approvals.
A pull request opened while plan steps remain unfinished is a draft, and its description lists the steps that are not done yet. A later turn that finishes them with passing checks can mark it ready. That keeps partial work visible and reviewable without pretending it is complete.


Quality gates and CI watch
Where a project runs quality gates, delivery passes through stages for lint and format, typecheck, unit tests, integration tests, build, a runtime dry run, security and AI review. Two rules keep the gates useful rather than noisy. Only advisories the change newly introduces fail a stage, so a pre-existing warning in your codebase does not block every pull request. And an amber result never auto-merges. The outcome is posted to GitHub as a fairlx/quality-gates commit status.
After a merge, CI watch follows the CI run on the merge commit and can open a CI fix when something breaks. It is conservative by design. It never auto-fixes a broken base branch, an infrastructure failure, a flaky test or a failure it could not reproduce. Those need a person, and an automated “fix” would only hide the real problem.
Idle, suspend, delete
Sandboxes cost compute, so idle ones do not linger. A sandbox that has been idle for 15 minutes is suspended after its work in progress is committed and pushed, and one idle for 24 hours is deleted. When work resumes, Fairlx recreates it from the pushed branch. Opening the Preview tab counts as use. Sessions that are still queued or preparing are never paused mid-setup.
Sandboxes come in six sizes, S, M, L, XL, 2XL and 3XL, from 0.5 to 8 CPUs. A small static site does not need the same machine as a monorepo with a heavy build.
Secrets
Most apps will not boot without environment variables. Fairlx Secrets live under the project’s Dev Tools tab. Values are encrypted at rest with AES-256-GCM, never shown again after you save them, and injected over TLS into the VM when it is created. Lists show names only. You can import an existing .env file. The same tab holds the sandbox environment: the runtime and a prepare script that runs before the app starts.

Because a sandbox receives every project secret, starting or controlling a session requires permission to edit work items in the project. Viewers can see sessions but cannot start them.
Try it
Coding sessions are part of the Plus plan. Sign in at app.fairlx.com, link a repository, add your secrets under Dev Tools and assign a small bug to the Fairlx Agent. The Coding sessions guide covers setup and troubleshooting in detail.
Try Fairlx with your own backlog
Personal accounts are free with 500 credits a month. Teams start on Plus at $6 per license per month, billed annually, with 6,000 credits per license.


