Skip to content

feat: add durable session automations and MCP skills - #1952

Draft
wibus-wee wants to merge 4 commits into
mainfrom
lody/session-continuation-design
Draft

wibus-wee wants to merge 4 commits into
mainfrom
lody/session-continuation-design

Conversation

@wibus-wee

@wibus-wee wibus-wee commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Problem

A Session needs to retain entrusted work while its Agent is idle or interrupted by a provider limit. Recurring schedules do not represent arbitrary wait conditions or preserve the identity of the interrupted conversation.

Changes

  • Add durable, Session-bound JavaScript waits through lody automation and the lody_automation MCP tool. A condition reads scoped observations via ctx.read(...), returns false to keep waiting, or returns { resumeText, payload? } to continue the registering Session.
  • Store waits, observations, action receipts and stable continuation identities in a machine-local SQLite ledger. Native Effect owns scheduling and reconciliation; Session and Inbox retain admission, queueing, cancellation and execution.
  • Evaluate conditions with @opencode/codemode 2.2.0 and Effect 4.0.2. Reads are restricted to Host-owned, Session-scoped capabilities; evaluation has time, read-count, concurrency and result-size limits.
  • Reuse PR polling for CI observations and revalidate source evidence before continuation. Add opt-in Session policies for quota recovery, idle compaction and archive after merge, preserving Stop, release and unfinished-tool boundaries.
  • Publish Automations guidance through the existing MCP Skills catalog, with schemas and runnable examples. Withhold automation startup, control and retries for encrypted workspaces.
  • Add a developer-flagged Electron Session continuation note and settings, connected to the local Host control endpoint. Retire the old Claude quota-continue shortcut; existing scheduled messages remain unchanged.
flowchart TD
    A[Session: CLI, MCP or local Electron] --> B[Scoped local control]
    B --> C[Machine-local automation ledger]
    D[PR and Session observations] --> C
    C --> E[Effect runtime and CodeMode]
    E --> F{Condition ready?}
    F -->|false| C
    F -->|resume result| G[Persist receipt and continuation identity]
    G --> H[Recheck authority and source evidence]
    H --> I[Session admission and Inbox]
    I --> J[Continue the registering Session]
    K[Opt-in Session policies] --> G
Loading

Validation

  • Targeted automation, Session authority, workspace control and MCP Skills suites: 38 tests passed using an isolated dependency overlay.
  • Session continuation state, note, settings and local data-adapter suites: 21 tests passed using the same checkout's source and an isolated dependency overlay.
  • Synthetic Host acceptance exercised control commands, CodeMode condition execution and scoped Session reads, SQLite persistence across Workspace restart, settings persistence, wait deduplication and cancellation, and cross-Session rejection. Session owners were synthetic; this did not exercise a real Agent delivery.
  • Storybook browser checks covered the waiting detail, settings switch and unavailable-provider state, plus waiting, queued, stopped, failed, offline and unknown-delivery presentations.
  • The current checkout could not build the desktop application: ACP submodule dependencies were missing and the installed Node 26.11.1 is below the repository's 26.12.1 minimum for Node 26. Full pnpm check and a current production build are not claimed as passing.

Scope and limits

Automation storage and execution are local to the Host. The Electron bridge supports the local machine only; Web and remote-machine control are not connected. Real provider quota recovery, delivery to a live Agent, automatic MCP Skill selection and all-platform packaging remain unverified by these synthetic tests. Codex high-load retry has not been migrated to the new automation policy. Existing quota-continue scheduled messages are not automatically removed and can overlap with recovery. Architecture notes remain proposed.

Persist scoped JavaScript waits and Session policy receipts, reuse existing
Session/Inbox execution, and publish progressive guidance over standard MCP.

Model: gpt-6
Retain encrypted workspace isolation and split runtime build entries.
Keep failure-finalization evidence separate from successful completion
publication, with coverage at the Fleet and Session execution boundaries.

Model: gpt-6
@wibus-wee
wibus-wee marked this pull request as draft October 27, 2026 14:52

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant