Tasks, Verification, Live View & Takeover
The Task Loop and Checkpoints (I1)
In Mycelis Roleplay, a deterministic C# host process — the Supervisor — drives every task. The LLM thinks per scene, but never owns state:
- The Supervisor loads the next pending scene from the database (local SQLite synced with PostgreSQL on the Hub).
Policyvalidates preconditions and remaining budget.- The brain runs a tool-use loop (
ToolUseLoop) through the local MCP Gateway. - The Verifier evaluates the scene's deterministic postcondition (Invariant I2).
- Budget spend and a checkpoint are persisted before the next scene starts.
If a machine crashes or an installer triggers a reboot, the Supervisor resumes from the exact last checkpoint.
Reliability & Performance Inside ToolUseLoop
- Parallel read-only tools: Purely read-only tool calls (reading files, listing directories, searching, inspecting status) execute concurrently within a turn. Mutating tools execute sequentially.
- Loop-Guard: If the model invokes the exact same tool with identical arguments three times in a row and fails, the Loop-Guard breaks the cycle and feeds back a structured error.
- Structured compaction: Once a long-running scene crosses
compactAtTokens(default80,000), older rounds are summarized cleanly — preserving failed approaches so the model does not repeat them — while keeping the most recentkeepRecentRounds(default4) verbatim. Oversized tool outputs are stored under.mycelis/outputs/.
Machine Verification — All 9 Postconditions (I2)
A scene completes only when the Verifier confirms at least one machine-checked postcondition. On the CLI, pass them via --expect (multiple --expect flags on a --step are AND-combined); in the Cockpit, the planner generates them automatically:
| Kind | CLI Syntax (--expect ...) |
Verifies |
|---|---|---|
| File exists | file-exists:/path/to/file |
File exists on disk |
| File missing | file-missing:/path/to/file |
File does not exist |
| File contains | file-contains:/path/to/file::TEXT |
File exists and contains TEXT |
| Process running | process-running:nginx |
At least one matching process is active |
| Process stopped | process-stopped:nginx |
No matching process is running |
| Exit code | exit-code:0 |
Last command exit code equals N |
| HTTP status | http-status:200::https://example.org/health |
HTTP GET returns status N |
| Platform value | platform-value:KEY::NAME::EXPECTED |
OS value (e.g. Registry/system property) matches |
| UI element | ui-element:WINDOW::ELEMENT::PROPERTY::EXPECTED |
Accessibility element in window has expected state |
Parts inside
--expectare separated by::so colons in Windows paths (C:\...) or URLs (https://...) remain unambiguous.
Needs You (Approvals & Questions)
Under Roleplay → Needs you (/dashboard/roleplay/approvals), the Cockpit collects everything waiting for human input:
- Souffleur approvals: Any tool call marked
approval: requiredby Workspace Rules or the Job Blueprint (package installs, system dialogs, creating schedules, deleting files underC:/Users/**). - Plan approvals: When
planApproval: required, the pre-explored step plan waits here before execution begins. - Questions (
agent_ask/ escalations): Clarifying questions from an employee or steps that reachedhumanon the escalation ladder. - Notifications: The topbar bell and optional browser/OS desktop notifications alert you immediately.
Live View & Real-Time Intervention
Open Live on any connected computer (/dashboard/roleplay/devices/{DeviceId}/live).
Visibility and Privacy Guarantees
- On-demand streaming: When nobody is watching, zero screen frames leave the device. When the fleet overview is open, only low-frequency thumbnails (every 5 seconds) are requested.
- Mandatory on-device indicator: Whenever someone watches or takes over, any device with a screen displays a persistent, non-dismissible indicator window or tray badge.
- Secret field redaction: With
redactSecretFields: true(default), password fields flagged by accessibility APIs are blacked out before leaving the device. - Headless servers: Devices without a screen (
screen: none) display a live terminal/log stream alongside the action timeline.
Five Real-Time Controls
Every action — shell command or GUI click — is announced before execution (ActionAnnounced, with a target bounding box overlay for UI actions) and recorded upon completion (ActionCompleted). You can intervene at any moment:
| Control | Effect |
|---|---|
| Pause / Resume | Pauses right before the next action. On resume, the Supervisor re-evaluates the current scene rather than resuming blindly. |
| Cancel action | Terminates only the currently running action/process tree while letting the task continue and choose an alternative approach. |
Step mode (off · ui · all) |
Holds every (UI) action until you click Continue or Reject. Ideal when supervising sensitive workflows for the first time. |
| Take over | Pauses the actor and forwards your mouse and keyboard directly to the remote desktop. Clicking Hand back triggers a fresh scene evaluation. |
| Emergency stop | Immediately aborts a single task, all tasks on a device, or the entire fleet. |
Viewing screens and taking control require dedicated workspace permissions (
ViewDeviceScreenandControlDevice) and are recorded with user, start time, and end time in the immutable Audit log.
Delegation, Subtasks & the Mission Tree
Employees collaborate without bypassing governance:
- Local subtasks (
subtask_spawn): An employee can spin up parallel subtasks on the same computer (e.g., inspecting multiple repositories simultaneously). - Asking colleagues (
agent_ask): An employee can query another role in the workspace when permitted by Workspace Rules. - Requesting an actor (
request_actor): When a capability or OS family is missing locally (e.g., a Linux worker needs a Windows desktop), the actor requests help from the Hub (Invariant I5). The Hub routes the subtask to an existing computer or provisions a child actor via Foundry or Mycelis Cloud.
By Invariant I4, child tasks only receive a share (subtaskShare or childInheritance.maxShare < 1.0) of the parent's remaining budget, keeping the entire delegation tree capped by the root budget. Inspect the full parent-child hierarchy at any time in the Mission Tree (/dashboard/roleplay/missions/{MissionId}).
Next steps
- Skills, Memory & Self-Learning — how employees retain facts and synthesize reusable skills
- Triggers, Event Watchers, Duties & Playbooks — moving from ad-hoc tasks to event-driven operations
- CLI Reference —
pause,resume,step-mode,watch, andstopfrom the terminal
