Keep ACP responsive with lazy Honcho tools memory#19102
Open
wo-o wants to merge 2 commits into
Open
Conversation
Honcho tools-only lazy initialization avoided expensive context reads during ACP startup, but it also skipped completed-turn and explicit memory-write mirroring. Initialize the Honcho session inside background write paths, skip nonessential tools-mode context/config reads, and dedupe exact adjacent syncs so ACP sessions can keep Honcho enabled without launch stalls or duplicate memory rows.\n\nACP permission approval also accepts the newer allow_permanent argument and both snake/camel option id spellings so schema drift does not crash approval callbacks.\n\nConstraint: ACP clients need first prompt latency bounded while preserving durable Honcho observation.\nRejected: Disable Honcho in ACP profiles | fixes launch but loses required memory behavior.\nRejected: Keep tools-only writes lazy until first tool call | drops normal conversation turns.\nConfidence: high\nScope-risk: moderate\nDirective: Do not reintroduce synchronous context/dialectic reads on tools-only ACP startup without latency E2E tests.\nTested: uv run --extra dev --extra honcho --extra acp python -m pytest tests/honcho_plugin/test_session.py tests/acp/test_server.py -q\nTested: uv run --extra dev --extra honcho --extra acp python -m py_compile acp_adapter/permissions.py plugins/memory/honcho/__init__.py plugins/memory/honcho/session.py\nTested: remote ACP E2E initialize/session/new/load/prompt with Honcho enabled; DB messages and message_embeddings synced once each; no SIGABRT/EOF/errors\nNot-tested: full repository test suite
Zed treats streamed chunks as incomplete until session/prompt returns, so ACP must not run auxiliary title generation before committing the final assistant message. Move the final message update onto the hot path and defer auto-title generation to a daemon thread so a slow title LLM cannot hide completed answers from the editor UI.\n\nConstraint: ACP clients need the session/prompt response to finalize a visible turn\nRejected: Disable title generation entirely | preserves useful titles as best-effort background work\nConfidence: high\nScope-risk: narrow\nDirective: Do not place auxiliary LLM calls before ACP final message update or prompt response\nTested: python3 -m py_compile acp_adapter/server.py\nTested: Live ACP finalization smoke test returned final JSON-RPC response in 2689ms\nNot-tested: Full upstream CI
Author
|
Follow-up ACP finalization fix pushed in |
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.
Summary
allow_permanent,option_id/optionId)Why
ACP/Zed sessions need Honcho memory enabled, but eager/hybrid Honcho paths can block startup/first prompts. The existing tools-only lazy path avoided the latency, but normal completed turns were not written until a tool initialized the session. This change preserves the low-latency tools-only path while ensuring Honcho still observes the conversation.
Verification
uv run --extra dev --extra honcho --extra acp python -m pytest tests/honcho_plugin/test_session.py tests/acp/test_server.py -q→ 171 passeduv run --extra dev --extra honcho --extra acp python -m py_compile acp_adapter/permissions.py plugins/memory/honcho/__init__.py plugins/memory/honcho/session.pymessageshad one user row and one assistant row for the unique E2E markermessage_embeddingshad both rows insyncedstateNotes
The manual E2E was run against a self-hosted Honcho stack with deriver/api/redis/postgres healthy.