S286 287 Session Summary

Documentation for Sessions

Sessions 286-287: Computer Use Infrastructure Fixes & Vitto Vault

Date: March 30, 2026 Branch: session-280-290 Status: Complete — Ready for Production


What This Session Accomplished (Plain Language)

This session fixed critical server problems that were preventing Computer Use from working, then built an entirely new system called Vitto Vault that lets users save their login credentials securely so they never have to re-enter passwords when running Computer Use tasks.


Timeline of Changes

Phase 1: Emergency Infrastructure Fixes (Session 286)

1.1 Server Crash Fix (Hetzner AX102)

Problem: When a user tried to run a Computer Use task (e.g., "Send an email via Gmail"), the server crashed with a "502 Bad Gateway" error. The task failed immediately with zero steps completed.

Root Cause: The Firecracker software (which creates virtual computers for browser automation) was never installed on our AX102 server. When the system tried to start a virtual machine, it couldn't find the program and crashed the entire server process. The server auto-restarted, but crashed again on the next attempt.

Fix:

Impact: Computer Use tasks can now run successfully on both Hetzner servers.

1.2 Dashboard Display Bug

Problem: The server dashboard showed disk usage as "7.4 TB" and "1754 TB" for our Hetzner servers — impossibly large numbers.

Root Cause: A formatting function had the wrong unit labels. It was showing gigabytes but labeling them as terabytes (off by 1000x).

Fix: Corrected the unit labels in the display code. Now shows accurate values: 7.4 GB used out of 1754 GB total.

Impact: Operations team can now trust the dashboard numbers.

1.3 Deploy Script Fix

Problem: Running yarn sandbox:deploy:all to deploy updates to both servers failed with an error about "unbound variable."

Root Cause: A bash script variable wasn't initialized when no arguments were passed.

Fix: Added a safety check for the empty variable.

Impact: Fleet deployment works reliably with zero arguments.


Phase 2: Vitto Vault System (Session 287)

2.1 The Problem It Solves

Every time a user wanted to run a Computer Use task (like sending an email), they had to manually type their email address and password. This happened every single session because credentials were stored in memory and lost when the server restarted.

2.2 What Was Built

Vault Crypto Library (@libs-api/vault-crypto)

Vault Database

Vault Backend Service

Vault Page (/space/{spaceSlug}/vault)

Account Picker Component (ggs-account-picker)

Computer Use Integration

2.3 Settings Integration

2.4 Cross-App Navigation


Phase 3: Computer Use Improvements

3.1 Gmail Profile Update

3.2 Two-Factor Authentication (2FA) Handling

3.3 Validation Fix


Architecture Summary

User → Vault Page (save credentials once)
         ↓
User → Computer Use → AccountPicker (auto-selects saved account)
         ↓
ComputerUseSupervisor → VaultAccountService (resolves credentials from vault)
         ↓
Backend-AI-API → Firecracker VM → Chrome → Task Execution

What's Next (Session 288+)

OAuth-First Intelligent Task Execution

Instead of always launching a browser VM ($2-5, 30-120 seconds), the system will automatically pick the cheapest/fastest path:

  1. API Execution ($0, 0.1 seconds) — Use OAuth tokens to call Gmail/Calendar/GitHub APIs directly
  2. Persistent VM Session ($0.50, 15 seconds) — Restore a saved browser session (already logged in)
  3. Fresh Browser ($2-5, 120 seconds) — Current behavior, only when needed

Vault-Driven Profiles

Persistent VM Onboarding


Files Created/Modified

New Files

File Purpose
libs/libs-api/vault-crypto/ Shared AES-256-GCM encryption library
APIs/backend-vitto-api/src/app/security/schemas/vault-account.schema.ts MongoDB schema for vault accounts
APIs/backend-vitto-api/src/app/security/vault-account.service.ts Vault CRUD + credential resolution
APIs/backend-vitto-api/src/app/security/vault.controller.ts REST API endpoints
libs/libs-ux/ux-account-picker/ Reusable account selector component
libs/libs-ai/vitto-hub/src/lib/components/vault-page/ Vault management page
docs/superpowers/specs/2026-03-30-vitto-vault-credential-management-design.md Vault system design spec
docs/superpowers/specs/2026-03-30-oauth-first-task-execution-design.md OAuth execution spec (for S288)
docs/superpowers/specs/2026-03-30-vault-driven-computer-use-profiles-design.md Profile intelligence spec (for S289)
docs/superpowers/plans/2026-03-30-vitto-vault-credential-management.md Implementation plan

Modified Files

File Change
APIs/sandbox-orchestrator/src/app/sandbox/firecracker.service.ts Crash guard + spawn error handling
apps/gograb-dev/.../hetzner-servers.component.ts Fixed byte formatting
deployment/sandbox-orchestrator/deploy-orchestrator-all.sh Fixed unbound variable
APIs/backend-vitto-api/src/app/security/security.module.ts Registered vault schema + service
APIs/backend-vitto-api/src/app/engine/computer-use-supervisor.service.ts Vault credential resolution
libs/libs-ai/vitto-core/src/lib/services/vitto-api.service.ts Vault API methods
libs/libs-ai/vitto-hub/src/lib/components/computer-use-panel/ AccountPicker integration
libs/libs-ai/vitto-hub/src/lib/routes/vitto-hub.routes.ts Vault route
apps/gograb-space/src/app/app.routes.ts Vault route at app level
libs/libs-foundational/api-config/src/lib/environment-presets.ts Cross-app URL constants
APIs/backend-ai-api/.../computer-use-loop.service.ts 2FA prompt improvements
APIs/backend-ai-api/.../profiles/gmail/gmail.prompts.ts 2FA + email label fixes
libs/libs-structural/space-settings-lib/ Vault tab in Space Settings
libs/libs-ui/auth-ui/.../user-preferences/ Vault link in User Preferences

Security Notes