Background acp connection discussion
Maintainers usually reply within 1 day
@mscolnick is already working on this.
Since Sep 21, 2026.
Assessment
This issue has not been assessed yet.
Description
Would you be open to separating acp connection lifetime from the agent panel visibility? I’d like to agree on it before preparing a PR.
Use case
We already have marimo pair, but acp is a bit broader and allows more use cases.
More generally, hiding the agent panel should not have to cause abandoning any acp in-flight request.
This concerns the existing in-editor acp experience only.
Current implementation
- Both panel areas wrap their content in
LazyActivity, switching it to hidden when the panel is closed or another panel is selected. LazyActivityuses React Activity, whose hidden mode cleans up effects.- The installed
[email protected]hook callsdisconnect()in its effect cleanup, including whenautoConnectis false. Managing connections manually inAgentPaneltherefore does not prevent this nested cleanup.
So hiding the panel disconnects the client even though the notebook remains open. Whether the adapter also stops its work depends on the adapter.
Proposed boundary
For an active acp connection:
- Closing the panel or switching to Variables/Files should not disconnect it. An in-flight response could continue updating its session state.
- Reopening would show that same session without reconnecting or replaying the prompt.
- Explicit Disconnect and actual notebook teardown would still release the client connection. Stop would retain its existing cancellation behavior.
- Unopened agents would remain lazy; unrelated panels would keep their current Activity behavior.
I would avoid changing every panel to stay mounted. A possible implementation is a single acp connection owner outside the visibility-controlled subtree.
Permission requests must remain explicit: either pending permission should reopen the panel or show an indicator.
I can follow up with a controlled-transport browser reproduction and tests covering hide/show during streaming, cancellation, pending permissions, explicit disconnect, notebook teardown, and moving the AI panel between sidebar and developer areas without creating duplicate connection owners.
Related
- open ACP proxy work in #10693
- Dominant language
- Python
- Stars
- 22.9k
- Forks
- 1.3k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 380
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from marimo-team/marimo
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
marimo-team/marimo#12027 ·
Maintainers usually reply within 1 day
-
"Clamp all outputs" leaves cells without output marked `expand_output: true`Possibly taken @marthacryan claimed this 12 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
marimo-team/marimo#11768 · 1 assignee ·
Maintainers usually reply within 1 day
-
Cell referencing a variable from a "cancelled" cell runs and raises NameError instead of being blockedMay be free again @dmadisetti claimed this 33 days ago, and no pull request is open. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
marimo-team/marimo#11307 · 1 assignee ·
Maintainers usually reply within 1 day
-
molab
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
marimo-team/marimo#11298 · 1 comment ·
Maintainers usually reply within 1 day
-
Theme change does not affect terminal colorsMay be free again @CloudCorpRecords claimed this 36 days ago, and no pull request is open. Openneeds discussion
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
marimo-team/marimo#11244 · 4 comments ·
Maintainers usually reply within 1 day
All issues in marimo-team/marimo
Similar issues
-
run_gate loads a custom tasks file from outside the working directoryPossibly taken @Ru0k3 claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
MakazhanAlpamys/Soup#3189 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
nautechsystems/nautilus_trader#5741 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
huggingface/datasets#9128 ·
Maintainers usually reply within 1 day