Problem
The COMSOL skill/driver guidance currently makes visual_mode=shared-desktop sound like the default attach path for any live GUI collaboration. That is correct when the agent should create/manage the visible COMSOL Desktop client, but it is misleading when the user has already started comsolmphserver and opened the target .mph in an existing comsol.exe mphclient -host ... -port ... Desktop.
In that case, running:
sim connect --solver comsol --ui-mode gui `
--driver-option attach_only=true `
--driver-option port=2036 `
--driver-option visual_mode=shared-desktop
can launch an additional COMSOL Desktop client, trigger a "server in use" / connection popup, or create extra sidecar model tags. The desired operation for inspection is only to attach the agent/API client to the already-running server and inspect the existing model tags.
Observed session
Workflow used:
- User starts
comsolmphserver on port 2036.
- User opens
comsol.exe mphclient -host localhost -port 2036.
- User opens
双饼_屏蔽电流计算.mph in that GUI.
- Agent tries to inspect tags with
visual_mode=shared-desktop.
Observed effects:
- An extra
ComsolUI process appeared.
- The GUI showed a server/client conflict popup.
- Earlier attempts created sidecar tags such as
Model1/Model3.
- After cleanup, the correct state was obtained by using an existing session/no-new-GUI attach: one model tag (
Model2) with label 双饼_屏蔽电流计算.mph, comp1, physics mfh/cc, and studies std1/std3.
Proposal
Documentation / skill routing
Clarify the routing rule:
- Use
visual_mode=shared-desktop when the agent should launch/manage the visible COMSOL Desktop client.
- If the human already has a server-backed GUI open (
comsol.exe mphclient -host ... -port ...) with the target model loaded, first attach without launching a new GUI:
sim connect --solver comsol --ui-mode no_gui `
--driver-option attach_only=true `
--driver-option port=2036
Then inspect:
sim inspect session.health
sim exec "_result = {'tags': [str(t) for t in list(ModelUtil.tags())], 'bound': str(model.tag()), 'label': str(model.label())}"
Driver/CLI behavior
Consider one of these improvements:
- Add an explicit
visual_mode=existing-desktop or desktop_attach=existing mode that attaches to the server/API without launching a new mphclient, but still reports observed COMSOL windows.
- When
attach_only=true and a matching COMSOL Desktop/mphclient window is already present for the target port, warn before launching a second Desktop client.
- Split health semantics so
model_builder_live=true does not imply the driver should always create a new visible client. It should distinguish:
desktop_client_owner=plugin
desktop_client_owner=user
desktop_observed=true/false
- Add a tag-inspection command/path that is explicitly no-GUI and safe for existing human-owned GUI sessions.
Why this matters
This is a common collaborative workflow: the user wants to own the COMSOL GUI and open the model manually, while the agent only attaches to the same server for structured inspection/mutations. Launching an additional Desktop client is surprising and can disturb the GUI/session state.
Problem
The COMSOL skill/driver guidance currently makes
visual_mode=shared-desktopsound like the default attach path for any live GUI collaboration. That is correct when the agent should create/manage the visible COMSOL Desktop client, but it is misleading when the user has already startedcomsolmphserverand opened the target.mphin an existingcomsol.exe mphclient -host ... -port ...Desktop.In that case, running:
can launch an additional COMSOL Desktop client, trigger a "server in use" / connection popup, or create extra sidecar model tags. The desired operation for inspection is only to attach the agent/API client to the already-running server and inspect the existing model tags.
Observed session
Workflow used:
comsolmphserveron port2036.comsol.exe mphclient -host localhost -port 2036.双饼_屏蔽电流计算.mphin that GUI.visual_mode=shared-desktop.Observed effects:
ComsolUIprocess appeared.Model1/Model3.Model2) with label双饼_屏蔽电流计算.mph,comp1, physicsmfh/cc, and studiesstd1/std3.Proposal
Documentation / skill routing
Clarify the routing rule:
visual_mode=shared-desktopwhen the agent should launch/manage the visible COMSOL Desktop client.comsol.exe mphclient -host ... -port ...) with the target model loaded, first attach without launching a new GUI:Then inspect:
sim inspect session.health sim exec "_result = {'tags': [str(t) for t in list(ModelUtil.tags())], 'bound': str(model.tag()), 'label': str(model.label())}"Driver/CLI behavior
Consider one of these improvements:
visual_mode=existing-desktopordesktop_attach=existingmode that attaches to the server/API without launching a newmphclient, but still reports observed COMSOL windows.attach_only=trueand a matching COMSOL Desktop/mphclient window is already present for the target port, warn before launching a second Desktop client.model_builder_live=truedoes not imply the driver should always create a new visible client. It should distinguish:desktop_client_owner=plugindesktop_client_owner=userdesktop_observed=true/falseWhy this matters
This is a common collaborative workflow: the user wants to own the COMSOL GUI and open the model manually, while the agent only attaches to the same server for structured inspection/mutations. Launching an additional Desktop client is surprising and can disturb the GUI/session state.