Skip to content

Add opt-in isolated ACP runtimes for concurrent root sessions - #160

Closed
Maximooch wants to merge 6 commits into
stack/acp-isolation-basefrom
feat/acp-isolated-runtimes
Closed

Maximooch wants to merge 6 commits into
stack/acp-isolation-basefrom
feat/acp-isolated-runtimes

Conversation

@Maximooch

@Maximooch Maximooch commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

Isolated mode fixes two limitations: root sessions previously shared mutable core state, and process-wide services could route children or permissions across conversations. Set PENGUIN_ACP_ISOLATED_SESSIONS=1 to give each root its own Core, Engine, ConversationManager, ToolManager, model/API state, event buses, MessageBus, child registry, approval/question managers and HTTP pools. The serialized default is unchanged.

Different-root prompts overlap; same-root turns still serialize. Runtime creation is serialized and bounded at 16 roots plus a catalog. Idle close releases runtime resources and retains disk history. Roots with unresolved background processes retain ownership. Native and legacy child tools share the same per-root registry. Capture callbacks and legacy worker threads explicitly preserve their originating context.

The shared in-process Python notebook tool is hidden and rejected in isolated mode because it changes process cwd/stdout and uses a global IPython shell. Agents can run Python through execute_command subprocesses instead. This is cooperative request isolation, not a hostile-code sandbox or cross-process database transaction guarantee.

Validation at head eb86edf: 253 selected tests passed on native Windows Python 3.11.14, no skips; scoped Ruff and diff checks passed. Coverage includes actual Core/Engine construction, real stdio concurrent-prompt barrier, native writes, model/cancel/close/history isolation, native and legacy same-named children, messages and allow/deny routing, native pipe callbacks after parent completion, worker context, bounded cleanup, and existing default/global-service contracts. Providers were deterministic. Both checked-out configurations lacked usable provider credentials; no credentials were copied and no live model request was made. All GitHub CI checks passed on this head across the ACP OS/Python matrix, native processes, storage, and broader contracts; CodeRabbit's automated review was skipped.

Base stack/acp-isolation-base combines draft #159 with latest #146 (f90f5cc2) and #158 (c3475312) follow-ups. No pull requests were merged. The complete feature/limit audit and preceding dependency sequence are in context/tasks/acp.md.

@vercel

vercel Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
penguin Ready Ready Preview Oct 28, 2026 6:46am UTC

@coderabbitai

coderabbitai Bot commented Oct 28, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Maximooch

Copy link
Copy Markdown
Owner Author

Integrated with preserved commit history through #161 (main commit abd8a66). Closing this stacked review after verifying its current head is an ancestor of main.

@Maximooch Maximooch closed this Oct 28, 2026

This branch was successfully deployed

1 active deployment
Preview — eb86edff Deployed Oct 28, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant