mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-24 16:54:43 +00:00
fix(computer_use): only disable agent cursor after session handshake
Guard the post-start set_agent_cursor_enabled on _session._started so call_tool cannot re-enter session.start() (matches the start_session lifecycle guard).
This commit is contained in:
parent
f957fe3760
commit
cdc123ec2f
1 changed files with 4 additions and 2 deletions
|
|
@ -1505,8 +1505,10 @@ class CuaDriverBackend(ComputerUseBackend):
|
|||
|
||||
# Belt-and-suspenders when --no-overlay is unsupported or ignored:
|
||||
# hide the agent cursor overlay via the session API so macOS idle
|
||||
# redraw loops cannot keep burning CPU after the first action.
|
||||
if _cua_no_overlay():
|
||||
# redraw loops cannot keep burning CPU after the first action. Only
|
||||
# once the handshake flipped `_started` — otherwise call_tool would
|
||||
# re-enter session.start() (see _LIFECYCLE_CALLS).
|
||||
if _cua_no_overlay() and self._session._started:
|
||||
try:
|
||||
self.set_agent_cursor_enabled(False, cursor_id=self._session_id)
|
||||
except Exception as e:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue