Repository navigation
client: the local route's Core lives in its own module; Qt never imports it - #2108
Merged
Merged
Conversation
…rts it toad.client.connection held LocalCoreConnection, LocalObserving and LocalAnsweringReads beside the remote connection, so every Qt start imported agent_comms.comms.Comms (and LocalCoreAccess, LocalRouteObservation) although Qt only ever builds ProcessRemoteCoreConnection. They move to toad.client.local_connection with the launch's connection choice (select_connection), imported by the TUI's app and cli only. Opening a selected route is the connection's: LocalCoreConnection.open_selected builds Comms; CoordinationAccess no longer names Comms. The remote connection refuses it as its route_selection already does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RnH6dT7wdh7i4tjJZQdFu3
trissim
marked this pull request as ready for review
November 18, 2026 07:32
trissim
added a commit
that referenced
this pull request
Nov 18, 2026
…ntry only After #2108 the local route lives in toad.client.local_connection. It is this machine's own bus, the one connection agents start under: its LocalCoreConnection carries SpawnsAgentProcesses and reads a chosen bus with select_connection. toad.qt.main (the desktop entry, after its first frame) selects the connection and hands it to client_start.serve_launch, so the shared Qt modules and Android's start never import it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RnH6dT7wdh7i4tjJZQdFu3
trissim
added a commit
that referenced
this pull request
Nov 18, 2026
…s it starts none (#2111) * Qt starts ACP agents through the shared AgentConversation chain AgentConversation owns attach/resume/start; AgentTurnEvents owns the agent-event handlers both Conversation and QtConversation inherit; SessionTitles/FirstPromptTitle own titling for MainScreen and the Qt ACP view. Agent spawning moves to OperationalSessionSources.spawn_agent behind AgentProcesses (Android: NoAgentProcesses refuses). Qt gets a QtSurfaceBinding (tool/terminal live blocks, permission asks through QtQuestion), and --agent on toad.qt.main attaches a launch binding. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RnH6dT7wdh7i4tjJZQdFu3 * Qt agents run under the local Core connection; failures in Qt workers surface The connection owns whether agents spawn (LocalCoreConnection does, a UI profile does not), and toad.qt.main / qt_drive select their connection as the TUI does. AgentBinding.launched resolves -a for both. Qt's run_worker shows a failed worker instead of holding it unread, call_later awaits a coroutine callback, notify is shared InputAttention, a closed Qt view retires its agent surface, and the scripted peer gains a terminal step for one FULL_TURN that the TUI test and the Qt drive both send. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RnH6dT7wdh7i4tjJZQdFu3 * Qt live tool and terminal rows draw as history's tool rows; Qt views close as Textual's A live tool call is a QtToolTranscriptFragment (AgentActivityPresentation.tool: title, status, details behind the disclosure), a terminal the same with its output open; no row_markdown copies in tool_output. Qt's workspace finish closes a view's receivers and history reads before deleting it, as Textual's teardown does; QtConversation owns the history retirement. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RnH6dT7wdh7i4tjJZQdFu3 * Qt launch selects its Core as Toad's does: client_start.serve_launch, -a, chosen buses toad.qt.main (now split, client_start loading after the first frame) selects its connection with CoreConnection.select and attaches -a through AgentBinding.launched; a chosen bus is read by the connection the window runs on (CoreConnection.chosen), so a local desktop window switches buses as Textual does and Android keeps decoding in place. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RnH6dT7wdh7i4tjJZQdFu3 * Qt finish leaves closing a view's receivers to SessionEntry.forget detach already closes them (forget -> close_core_events); a second close unsubscribed the activity rows twice. The history's reads end there now that QtConversation.close_core_events retires the history for every Qt conversation, thread views included. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RnH6dT7wdh7i4tjJZQdFu3 * Desktop Qt selects its local bus through local_connection, from the entry only After #2108 the local route lives in toad.client.local_connection. It is this machine's own bus, the one connection agents start under: its LocalCoreConnection carries SpawnsAgentProcesses and reads a chosen bus with select_connection. toad.qt.main (the desktop entry, after its first frame) selects the connection and hands it to client_start.serve_launch, so the shared Qt modules and Android's start never import it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RnH6dT7wdh7i4tjJZQdFu3 --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
What
toad.client.connectionheldLocalCoreConnection,LocalObservingandLocalAnsweringReadsnext to the remote connection. Because of that, every Qt start importedagent_comms.comms.Comms, along withLocalCoreAccess,LocalRouteObservation,RootRuntimeandLaunchRuntime, even though Qt only ever buildsProcessRemoteCoreConnection.toad.client.local_connection, together with the launch's connection choice (select_connection, formerlyCoreConnection.select). Only the TUI imports this module (toad.app,toad.cli).LocalCoreConnection.open_selected(access, selected)buildsComms, andCoordinationAccessno longer namesComms.CoreConnection.open_selectedis abstract. The remote connection refuses it withRemoteRouteNotSelectable, the same way itsroute_selectionalready does.Measured
python -X importtime -c 'import toad.qt.main', interpreter from~/.local/bin/toad,PYTHONPATH=<agent-comms main>/src:<toad>/src:On its own this PR gains nothing measurable. Qt still reaches
Commsthrough agent-comms' own client chain (transport.remote_core → transport.mcp → transport.connector_caller → comms, andui_model.observation → team.team_heartbeat → ...). Those chains get cut in the companion agent-comms PR. This PR is the toad half: without it, removing them in agent-comms would still leave Qt loading Core through toad.Checks
tools/qt_inherit_ratchet.py: shared-looking modules loading Textual UI 11 (baseline 11), toad.qt→widgets imports 0 (0), bare Qt classes 21 (21), parallel copies 0 (0)tools/shadow_check.py: empty methods shadowing real ones 0 (baseline 0)tools/android/check.sh: rc=0, function-local imports reaching an unshipped package 15 (baseline 15), and "shipped app ran every view kind and bound key on a scratch bus"tests/guardsplus the touched test files: the same failures as main in this environment (7 guards, 13 textual), and no new ones🤖 Generated with Claude Code
https://claude.ai/code/session_01RnH6dT7wdh7i4tjJZQdFu3