Skip to content

The agent that grows with you

fix(acp): the gateway viewer does not end daemon-owned sessions at exit

teknium19070fd0c2e7b
diff --git a/acp_adapter/entry.py b/acp_adapter/entry.py
index ed4f02b60a1..35f1bf6a93b 100644
--- a/acp_adapter/entry.py
+++ b/acp_adapter/entry.py
@@ -216,12 +216,8 @@ def main(argv: list[str] | None = None) -> None:
except Exception:
logger.exception("ACP agent crashed")
sys.exit(1)
- finally:
- # The stdio client that drove these conversations is gone. Without an
- # ended_at writer here, source='acp' rows stay open forever and the
- # ended-session guard keeps prune/archive away from them (#118216). A
- # later load/resume reopens the row (acp_adapter.session._restore).
- agent.session_manager.end_all_sessions()
+ # No ended_at stamp here (#118216 is the in-process adapter's): sessions are daemon-owned and
+ # may have other viewers or background work, so the daemon's reset lifecycle ends them.
if __name__ == "__main__":