Conversation
…admap Add two proposed architecture notes (English and Chinese): - a detailed six-phase plan that moves turn execution and ACP process ownership onto daemon → session-resource → turn Effect scopes, with typed stop reasons, bounded drains, a shared process-tree primitive, and the invariants each phase must preserve; - a roadmap ranking the remaining lifecycle-fragile areas (dispatch, CLI connectivity/presence, renderer workspace runtime, data plane, runtime install/auth, worktrees, orchestration, Electron/supervisor) with target designs, prerequisites, and fixes that need not wait for Effect. Model: claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…k decision Restructure both proposed notes around a strict bottom-up layering rule (L0 platform → L1 OS leaf → L2 state/cloud → L3 ACP connection → L4 session resource → L5 turn → L6 entry adapters): a layer is done only when all of its dependencies are Effect services, our own Promise modules are rewritten rather than wrapped, and only real third-party I/O boundaries are wrapped once. Record the decisions that loro-repo and streams-crdt move to an Effect core with both an Effect entry and a Promise facade, after the Flock persistence migration lands, with Lody's L2 proceeding behind a temporary LoroRepo Layer. Replace the turn note's phases with layered PRs, PR1 being L0 plus a complete L1 ProcessService for every ACP-related process. Model: claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Model: claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
zxch3n
marked this pull request as ready for review
September 27, 2026 15:02
This was referenced Sep 27, 2026
Model: claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issue
Refs #429
Stack
mainMerge in order; after each merge retarget the next PR to
main.Problem / pressure
Turn execution and ACP process shutdown produced the densest run of lifecycle defects in the last two months. Examples: #571, #618, #740, #817, #595 and #759, and the still-open #429. Each was fixed locally, but the shared root cause remains: resource and wait lifetimes are not bound to an owner. They are held together instead by ~15 boolean flags, a dozen per-session registries and five different kill implementations. The team plans to migrate lifecycle-fragile code onto Effect TS and needs an evidence-backed plan and a priority order first.
Summary
Documentation only: two proposed architecture notes, each in English and Chinese.
2026-09-27-effect-lifecycle-migration-roadmapsets the migration rule, the Loro stack decision, and the order:RcMap), SessionHistory (interpreter ofHistoryActionvalues), SessionPresence (lease), and CloudPort.LoroRepoLayer.2026-09-27-effect-turn-execution-and-acp-process-ownershipcovers the turn and ACP process layers:No code changes. Nothing has been implemented or measured, and both notes say so.
Visual explanation
flowchart TD D["DaemonRuntime (ManagedRuntime + root Scope)"] --> R["SessionResource scope: AgentProcess, ACP connection, terminals, sandbox"] R --> T["Turn scope: presence, replay suppression, update target, registration"] T --> W["rawWork: raw prompt / steer / set_config_option"] T --> A["ancillary: yielded-turn finalization"] R -.exited Deferred.-> TBefore / after
.agents/notes/proposed/architecture/Test plan
pnpm run docs check. The new notes produce no errors. The remaining errors were already there: broken links into uninitialized ACP submodules, and older notes with no translation.pnpm check/pnpm formatwere not run: no source changes, and this checkout has nonode_modules.Context handoff
The Lody team asked for an analysis of which modules most need an Effect-based lifecycle refactor, then for a detailed plan for turn execution and ACP shutdown plus a proposed note for the rest.
🤖 Generated with Claude Code