Hosted Development Sessions
A hosted session gives an app a temporary workspace, source editor, preview and agent chat. Each session belongs to an app, variant and initiating developer account. Its Git branch holds saved source; its runtime holds files and running processes that can disappear when the session ends.
Use manual development for direct editing and chat, or generate from an approved app plan for structured agent execution. Previewing, committing, merging, building and publishing are separate delivery steps.
Restricted system session inspection
System Coding Agent Dev Sessions (/system/dev-sessions) inspects sessions across teams. It inherits system-host super-admin/two-factor, authenticated/verified account, team-context and password-confirmation gates. The controller relies on those route gates rather than per-session ownership policies. System inspection is separate from the original developer's app/variant workflow; owner emails, source/tool transcript content and runtime addresses belong in private diagnostics. Deployed permitted/denied access remains acceptance work.
Locate sessions and compare counters
The list defaults to Created descending and 25 rows (validated range 1–100). Search matches app slug, pod name, plugin name and owner name/email, not transcript text. Status/team/mode filters are supported by the handler, but current page configuration does not establish a visible control for every filter. Team filtering uses the app relationship, not arbitrary selected navigation context. Keep session ID, app/team/owner and requested filters with diagnostic evidence; a fallback app slug or missing relationship is not proof of complete ownership data.
Global cards count active rows with provisioning/running status, sessions created today, failed rows created today and stored estimated cost for rows created today. They are independent of the filtered table. The model's single-session active check additionally includes cloning and installing, so the card is not a complete count of every model-active session. AJAX table responses do not refresh card statistics. Reload the full page and compare the same population/window before interpreting a discrepancy.
Inspect saved state and runtime evidence
Detail tabs are Overview, Agent transcript and Status history. They show saved identity, mode/status, runtime/PR addresses, resource/token/cost counters, dates and logged transitions. The handler can fetch orchestrator state only for a model-active session with a pod name and an available orchestrator; current tabs do not render that returned state. A saved Running status or preview URL is therefore not a live health/availability receipt. Check the actual owning workflow and authorized runtime evidence before diagnosing cleanup or starting replacement work.
The transcript is saved webhook-captured agent output displayed as text, not a complete terminal/filesystem history or executable instruction. Empty transcript can reflect manual work or sessions preceding capture; it does not establish that nothing ran. A status history and estimated cost are stored observations, not successful release, preserved source or a settled invoice. Missing values formatted as zero do not prove no provider activity. Avoid publishing transcripts, runtime URLs or unredacted status messages.
Understand registered intervention limits
Current index/detail configuration provides inspection tabs and row navigation, without a visible termination, bulk termination or team-limits control. Registered server actions are restricted operator capabilities, not a reason to construct requests from a public guide. Have an authorized platform operator review the exact target and recovery implications before intervening. Detailed runtime/provider/worker procedures remain private.
Single termination first requires the model-active state, writes admin_terminated and a reason log, then attempts an orchestrator stop when a pod and orchestrator are available. Stop-call exceptions are logged and swallowed before broadcasting/responding. “Session terminated successfully” does not prove the runtime stopped, credentials were revoked, source was archived or all resource usage ceased. The client stop helper revokes preview credentials after a successful stop call or a specifically confirmed absent pod; a skipped/failed call is different. Compare local and runtime outcomes through the operator's recovery process before retrying or starting replacement work.
Bulk termination accepts up to 100 existing IDs but processes only provisioning/running rows, unlike the broader single-session active check. Its response separates terminated, failed and skipped IDs; stopped-provider failures can still be classified as locally terminated. An exception after a local update can also leave partial effects. Reconcile every requested ID and actual runtime state rather than treating the aggregate success message as complete cleanup.
Keep limits, statistics and recovery distinct
The team-limits handler accepts concurrency, starts per hour, minutes per day and a dollar budget, within bounded numeric ranges. It writes supplied non-null values to dedicated team columns; omitted/null values are retained, not cleared. This save does not prove admission behavior, reset spent usage, stop existing work or establish provider billing. Keep spend/capacity changes under the authorized operator process and verify actual enforcement separately.
The statistics endpoint defaults to a seven-day creation window, supports 24-hour/7-day/30-day/90-day windows and groups by day/status/mode/team, with at most twenty team groups. It aggregates stored seconds, CPU seconds, memory MB-seconds, tokens, requests and estimated cost; these are not distinct people, full infrastructure metering or invoices. Endpoint availability does not establish a visible chart in the current index.
The controller also contains archive/resume methods, but the reviewed system route group does not register them. Do not infer working system archive/resume buttons from returned eligibility/archive fields or source method names. Use the supported owner workflow described below for committed-source recovery, and retain exact session/branch/variant/status evidence for the operator when local state and runtime disagree. Never claim that inspection or termination alone preserved uncommitted files.
Before starting
Sign into the Developer Hub, select the owning team and open the app. You need permission to manage that app, an initialized repository and available hosted-session capacity. A visible app or variant does not establish that repository initialization finished. Wait through pending/initializing states; report failed initialization before repeatedly starting sessions.
Manual editing does not require an approved plan. Inline agent chat still uses the team's effective credits/unlimited entitlement; resolve the displayed credit requirement before asking it to perform work.
The platform admits one active hosted session per app across its variants and owners. Provisioning, cloning, installing, running and stopping sessions consume capacity. An expired or stuck session may still need cleanup before another start is admitted. Team capacity is separate; the current default is three concurrent sessions, with team/environment overrides.
Select the intended variant before starting. A new session starts from its production branch, normally main for the default variant or variant/{name} for another edition, and creates dev/session-{id}. It does not include unmerged changes from other branches.
Review Code → Pull Requests for required work first. Manual start can warn about open PRs into the selected branch, but discovery is best effort. Approved-plan generation currently bypasses that warning. Merge any source the new work must depend on before starting.
Start manual work or plan execution
- Open the app's Code tab and choose Start Coding Session.
- Select Variant when the picker is present; a single-variant app selects its default automatically.
- Choose Get to building for the IDE and inline agent chat, or Plan with the agent first to enter planning. The agent's name can vary by environment.
- For planning, inspect and approve the saved plan, then generate from it. A chat message saying “approved” is not the saved approval record.
- Wait for provisioning, cloning and installation to finish. A created session record is not a ready preview.
- Use Open session on Code to return to active work.
If an active session belongs to someone else, coordinate with that developer. Another variant does not provide a parallel workspace for the same app. If branch creation or runtime startup cannot be confirmed, inspect the returned session and error before trying again.
The recommended AI workflow is approval through the planning page. The lower-level preview start accepts nonempty plan text with narrower checks; it does not provide all the planner's contract/grounding checks. A running AI session alone is not evidence that its plan passed that review.
Edit, preview and inspect execution
Save editor changes before checking the preview or running commands. Use chat for changes and explanations, and inspect command/task output for the actual result. A completed task indicator records execution progress; it does not establish that the app passes CI or works with installed project permissions.
| Persistence stage | What it establishes |
|---|---|
| Text in the browser editor | An edit that may still need saving |
| File saved in the workspace | Runtime-local source that can be lost with the runtime |
| Confirmed pushed commit | A Git checkpoint on the session branch |
| Merged production source | Source included in the variant's trunk |
| Successful CI artifact | A packaged build of a recorded commit |
| Published version | A release snapshot available for installation |
The preview uses development source. Test its layout/interactions, then separately build and test the installed release with real configuration, bindings and allowed/excluded attendees.
File tabs, Save and external edits
In Code mode, open a file from the tree. Its tab tracks the browser buffer; a dirty dot means it differs from the last loaded/saved text. Select a tab to change the active file. Save or Cmd/Ctrl+S writes the active dirty file through the workspace gateway. It does not save every open file, commit Git, publish a version or confirm the preview has reloaded. Stop typing in that buffer while Save is pending. The reviewed handlers can mark text entered during an in-flight save as clean even though the request sent the earlier contents. A cleared dirty dot therefore does not prove those later edits reached the gateway. Preserve your text, wait for the save to finish, then reopen/check the workspace file and reconcile any difference before relying on it as a checkpoint. Preserve your text if Save failed appears.
Closing a dirty file tab asks Discard unsaved changes?. Choose Keep editing to retain it, or Discard to close without saving that buffer. Closing the active tab selects the last remaining tab. This confirmation applies to the file-tab close control; do not assume it protects browser-window closure, navigation, runtime loss or every recovery path.
The main session editor listens for external file-change/add events. A clean open buffer can reload from the gateway; a dirty buffer instead warns that the file changed outside the editor. Copy your unsaved text, inspect the updated workspace file and reconcile the difference before saving. Saving an older buffer can overwrite another editor or agent’s work; the warning is not an automatic merge or an ownership lock. A Commit checkpoints workspace files, so save every intended browser edit before using it.
To inspect fresh workspace contents without losing your only local copy:
- Copy the full text of every buffer you need into a separate local text file, named with its repository path. Open that independent copy and verify it contains the intended edits before discarding or reloading anything. A tab label, dirty dot or clipboard-only copy is not a durable backup.
- Wait for any pending Save to finish. Close the file tab in the editor you are using; if prompted, choose Discard only after verifying the independent copy. This discards the browser buffer, not the workspace file.
- Open the file again from the file tree. Opening an already-open path merely selects its existing buffer; closing it first is what makes this action request fresh gateway contents.
- Compare the freshly loaded text with your independent copy, reconcile intentional changes, and Save while keeping that buffer unchanged until completion. Repeat the fresh read if the result was uncertain. Then use Commit and verify its acknowledged branch/commit before relying on Git recovery.
If the gateway cannot read the file, keep the independent copy and resolve connection recovery before discarding more state. An authorized colleague with repository access can help inspect saved references; do not assume a local clone is already configured or share session credentials to obtain one.
Pop out the editor safely
On supported desktop layouts, Open editor in a separate window opens the same session’s file editor and gateway. Focus editor window returns focus to it. A blocked popup or unavailable route produces an error; inspect that result instead of starting another session. The pop-out control is hidden on the reviewed mobile layout.
Save and preserve all intended browser text before opening the popup, closing it or leaving the main session. The popup’s cross-window messages carry the active path and open-tab paths, not unsaved contents. Its tabs/buffers are separate local state; matching filenames in the main window do not prove text was transferred or saved. After returning, reopen the intended file from the gateway and verify its content rather than trusting a mirrored tab label. The main session closes its popup when the main page unmounts; the popup’s reviewed cleanup disconnects the gateway and does not itself save every buffer.
If external edits or a reconnect make two versions uncertain, preserve your local text, inspect the gateway file and last confirmed Git checkpoint, and reconcile once before saving/committing. These controls do not create a new runtime or release; session access and gateway connectivity remain required.
Pause and resume agent execution
The execution pane offers Pause while executing and Resume while paused. Pause is best effort between tasks or commands; an already-running command may continue. Pausing execution keeps the workspace and its lifetime limits active.
An observed session can remain running after plan completion for follow-up chat. The completion handler can archive an unobserved session instead. Automatic archival saves work and stops the runtime; it does not open a PR or publish a release. Inspect the actual session, branch and PR result rather than assuming completed execution merged its source.
Execution Resume continues a paused plan in the same runtime. Resume session after archival creates a new runtime; these controls have different effects.
Commit checkpoints
In the session toolbar, choose Commit. On desktop it may appear as an icon with the Commit tooltip. Confirm the reported commit and branch before relying on the save. Commit keeps the workspace open and does not create a PR.
The browser retains an operation identity for an uncertain manual commit and retries that identity. A missing or malformed receipt is not a confirmed checkpoint. After the first request finishes, retry with Commit in that same browser/session; the handler reuses the stored identity. Do not clear browser session storage or switch browsers to retry an uncertain checkpoint. Keep the original browser/session recovery state until the hub confirms the outcome; inspect Git and saved recovery references when a request fails.
Leaving or reloading a running manual session makes a best-effort checkpoint request only when the interface considers it safe. Pending coding/chat work or unresolved commit recovery can prevent it. AI-assisted sessions do not use this exit checkpoint. Leaving the page does not archive the runtime; a browser-exit request does not substitute for an explicit confirmed commit.
End a session
Choose End session in Code or the session toolbar. The dialog separates saving source from opening and merging a PR.
| Choice | Expected result |
|---|---|
| Commit & close with PR unchecked | Saves source on the session branch, then closes the runtime |
| Open a PR without auto-merge | Saves source and opens/reconciles a PR back to the selected variant branch |
| Open a PR and auto-merge | Attempts to merge that PR into the selected trunk; inspect the actual merge result |
| Abandon session | Closes without committing the working tree or opening a PR |
PR and auto-merge choices default to off. Auto-merge has an effect only with the PR option enabled. The dialog can label the target “default branch”; the stored session base branch determines the actual target, including a non-default variant's trunk. Check it before merging.
Normal closure checks for existing unique commits, even when the final working tree is clean. A confirmed empty branch can be removed. A saved branch, PR creation and runtime termination can have separate outcomes; an HTTP error does not prove none happened.
If PR creation is uncertain, the response can report that work is saved and ask you to retry closing. Retain the saved branch and use that retry so the platform can reconcile an existing PR. A confirmed PR can remain open if auto-merge fails. Verify its merged state and the production-branch build before publication.
Abandon discards unsaved work
Abandon does not create an abandoned/ backup or checkpoint the workspace. For anything you need to keep, verify a pushed Git checkpoint on a retained reference or an independent local export before choosing it. File Save alone leaves data only in the runtime and is insufficient.
While the runtime is present, the current implementation retains the original session-branch reference. When the runtime is already gone, the abandon path can delete that branch and clear its recovery reference without checking for unique commits. Do not rely on Abandon to preserve previously pushed work in that case. Preserve the needed commit under another retained Git reference or export the required source before discarding the session; recording only a branch name is insufficient if that branch is deleted. use normal saved-work recovery when you want to retain it.
Archive and continue saved work
The platform also has a commit-and-archive operation that checkpoints source and stops the runtime without a PR. Automatic lifecycle archival may use a separate archive/... branch; explicit checkpoint closure normally retains the session branch. Use the actual saved branch in the recovery record.
The current Code/session toolbar primarily exposes End session, with no separate Commit and archive button. Normal Commit & close is not necessarily resumable: resume accepts archived/expired sessions with a retained branch, rather than every completed/stopped/failed record.
To continue a normally closed, unmerged change, inspect its saved branch in Code → Files/Commits and its PR in Pull Requests. With local repository access, fetch and check out that branch to continue editing and push further commits. If you want a fresh hosted session, first review/merge the saved work into the intended production branch, then start from that trunk. The new-session variant picker does not select an arbitrary old session branch.
When an eligible archived session is offered in Code, choose Resume session. A recoverable expired session can offer the same action on its session page. Resume requires:
- The original owner and permission to manage the app.
- An archived/expired record with a retained branch and no recorded replacement session.
- Available repository/runtime services, app capacity and team capacity.
- A session inside the retention window, currently 30 days by default and environment-controlled.
Resume creates a new session ID/runtime from the saved branch. It retains the original variant/base branch and does not rebase onto newer trunk work. The new session is manual, with no old plan document; it does not automatically rerun the previous agent task list. Review restored source and current trunk before continuing or merging.
Failed resume can leave a replacement provisioning record. Check both records before trying again. A button or eligibility flag does not establish that the saved Git branch still exists or provisioning will succeed.
Heartbeats, expiry and runtime loss
The hub sends an immediate heartbeat and periodic heartbeats while the relevant interface is visible. Current defaults are a five-minute interval, a 60-minute idle window and a 12-hour maximum lifetime. Hidden tabs pause periodic heartbeats; returning attempts renewal. Deployments can override these values, so use the displayed expiry.
A heartbeat renews active work up to its hard lifetime cap. It cannot revive terminal/expired sessions or guarantee an unreachable runtime renewed its own lease. A 409 response stops renewal; temporary coordinator failure can retry later. Paused execution still needs an active session.
At develop commit 25e1564 (reviewed 2026-10-19), Session expiring soon cannot be dismissed with Escape, a backdrop click or a close icon. Choose Stay logged in to request an extension or End session to enter the supported closing workflow. At Session at maximum runtime, extending is unavailable: preserve a confirmed checkpoint, end the session and start fresh work through the supported recovery path. The button click itself is not proof that renewal, a commit or runtime termination succeeded. Confirm the returned state; deployed behavior can differ by version.
Expiry cleanup attempts a checkpoint before termination. It depends on the scheduler and runtime/Git availability. If the runtime disappeared, only source actually pushed to a saved Git reference can be restored. Browser-unsaved text and uncommitted files are not recoverable merely because a session record exists.
Reconnect the original workspace
An expired session whose original runtime is still present can offer Reconnect workspace in the session page's preview/empty-state controls. This differs from Resume session: reconnect keeps the same session ID and runtime, while saved-branch resume creates a new manual session. The UI prioritizes its saved-session Resume path for ordinary archived/expired records; the reconnect action is offered for an eligible in-place recovery state. Use the action actually shown, not a hand-edited status or an assumed button on every expired record.
| Control | Intended continuation | Persistence limit |
|---|---|---|
| Execution Resume | Continue a paused plan in the current active runtime | Does not renew beyond lifetime limits or prove a checkpoint |
| Reconnect workspace | Explicitly renew the confirmed original expired runtime | Does not create a new coding turn, commit source, make a PR or remove the original hard cap |
| Resume session | Start a replacement runtime from retained saved source | Restores committed branch contents, not a lost working tree |
Before reconnecting, preserve unsaved browser text and record the session, branch and last confirmed commit. Choose Reconnect workspace once and wait for the result. The client first reads recovery information; opening the page or reading that snapshot does not itself request lease renewal. It uses the observed original coding-turn identity, or an explicitly empty journal, rather than inventing a new prompt. Do not submit the same agent task again just because recovery is pending.
The server rechecks the original owner and App/team, session/runtime identity, expiry, original hard cap, current App/team capacity, pending callbacks and coding/closure journal state. A button is only a candidate for those checks. A closed admission journal, unsettled operations, inconsistent turn counts, changed runtime/lease or missing original workspace can prevent reconnection. Another developer's App-management permission does not grant this ownership.
Success requires an acknowledgement for the same session/runtime, running status and a future expiry; the hub then reloads the session view. Confirm the displayed session/expiry, restored editor/preview and original task state. Reconnection alone is not a Git checkpoint or proof that a running task completed. Save and verify a commit before relying on restored work.
If the message says reconnection or its acknowledgement could not be confirmed, keep the session and recovery references. The runtime-side renewal and portal-side record update are separate operations, so a failed response does not establish that neither happened. First use the independent-copy procedure above for all browser text. Reload the session page only after preserving those copies, inspect the refreshed session/status and actual expiry, and reconcile them before retrying; do not replace, abandon or resubmit the original task to clear the message. For an original runtime that cannot be recovered or a reached hard cap, preserve available source and use eligible saved-branch resume or platform-assisted recovery. A new session cannot reconstruct uncommitted files from a lost runtime.
For an authorized UI/API integration, the route family beneath /{team}/developer/apps/{app}/preview-session/{session} includes:
| Request | Contract |
|---|---|
GET /recovery-state | Owner-scoped observation; returns a recovery snapshot or an unavailable response; does not request renewal |
POST /reconnect | Owner/App-update scoped explicit recovery; requires the turn_id key, containing the observed lowercase UUID or JSON null for a confirmed empty journal |
Let the current recovery UI obtain and check the snapshot; do not cache or fabricate a turn ID. The server rechecks it before requesting renewal. Validation failures require refreshed/correct state; 409 identifies an eligibility/conflict condition, and 503 can mean coordination or acknowledgement is unconfirmed. Neither is permission to discard the workspace. These routes use the signed-in platform session, not a public attendee/project API key.
Logs and task credentials after recovery
The session connects workspace logs/task credentials when readiness or preview URL changes, rather than reauthorizing on every unchanged status poll. Losing readiness disconnects that workspace log connection; returning to readiness can reconnect it. If task credentials fail, use the task pane's retry affordance when offered, and inspect the displayed error before opening another runtime. Credential retry is not lease renewal, a task rerun or a Git save. Keep tokens out of logs/screenshots/support reports and confirm the original session recovered before continuing commands.
Permissions and recovery
Owner checks protect heartbeat, recovery-state/reconnect, commit, close/archive, execution control/credentials and resume. General app management does not transfer that ownership. The separate Stop endpoint currently checks app management and team/app membership without the same initiating-owner check; stopping another developer's runtime is not a handoff or a save.
| Symptom | Next step |
|---|---|
| Repository not ready | Wait for initialization; report failed state and app identity |
| Active session/capacity conflict | Return to the owner/session; inspect stopping/expired recovery before replacing it |
| Provisioning stuck | Retain session ID/status/error; ask an administrator to reconcile the runtime |
| Commit response uncertain | Preserve the operation, inspect Git/recovery references and retry the same operation |
| Saved work but PR unconfirmed | Retry closure; inspect the recorded PR/branch before making another PR |
| Cleanup unconfirmed/stopping | Retain the recovery record and retry the indicated closure when available |
| Expired runtime | Distinguish original-workspace reconnect from saved-branch resume; inspect what remains in the runtime and what actually reached Git |
| Reconnection unconfirmed | Preserve the session/turn/branch; refresh actual status/expiry and reconcile before retrying or replacing |
| Task credentials unavailable after recovery | Use the offered credential retry and confirm session/readiness; do not rerun a task to repair authorization |
| Planned agent failure/credit halt | Inspect output and the originating plan's failure; use its retry/revision flow |
| Manual inline-chat failure/credit halt | Preserve/checkpoint source, inspect the chat error, resolve credits/service availability and retry through chat when enabled; there may be no planning record |
| Resume produces no usable preview | Inspect the new provisioning record before another resume |
For support, include app, variant, session ID, production/session/recovery branches, saved commit, PR URL, status and displayed error. Keep credentials and private source out of public reports. Detailed cleanup procedures belong in operator runbooks.
Deliver the change
Review Code → Files, Commits and Pull Requests, merge intended source into the production branch, inspect CI and verification, publish the release and test its project installation. Continue with Git and builds and variants and releases.