Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion agent/google_oauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@

TOKEN_REQUEST_TIMEOUT_SECONDS = 20.0
CALLBACK_WAIT_SECONDS = 300
LOCK_TIMEOUT_SECONDS = 30.0
LOCK_TIMEOUT_SECONDS = 5.0

# Headless env detection
_HEADLESS_ENV_VARS = ("SSH_CONNECTION", "SSH_CLIENT", "SSH_TTY", "HERMES_HEADLESS")
Expand Down
8 changes: 4 additions & 4 deletions gateway/platforms/whatsapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,16 +296,16 @@ def __init__(self, config: PlatformConfig):
# WhatsApp often delivers multiple messages in rapid succession
# (e.g. forwarded batches, paste-splits) — without debounce each
# message triggers a separate agent invocation, wasting tokens and
# flooding the user with reply fragments. Default 5s delay /
# 10s split delay are conservative for WhatsApp's delivery cadence.
# flooding the user with reply fragments. Default 1s delay /
# 3s split delay are conservative for WhatsApp's delivery cadence.
# Tunable via config.yaml under
# ``gateway.platforms.whatsapp.extra.text_batch_delay_seconds`` /
# ``text_batch_split_delay_seconds``.
self._text_batch_delay_seconds = self._coerce_float_extra(
"text_batch_delay_seconds", 5.0
"text_batch_delay_seconds", 1.0
)
self._text_batch_split_delay_seconds = self._coerce_float_extra(
"text_batch_split_delay_seconds", 10.0
"text_batch_split_delay_seconds", 3.0
)
self._pending_text_batches: Dict[str, MessageEvent] = {}
self._pending_text_batch_tasks: Dict[str, asyncio.Task] = {}
Expand Down
9 changes: 8 additions & 1 deletion hermes_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,14 @@ def _open(self):
return stream

def doRollover(self):
super().doRollover()
try:
super().doRollover()
except PermissionError:
# Windows: another process may hold a lock on the log file,
# causing rename/delete to fail with PermissionError. Rather
# than crashing the process, skip rotation — the existing file
# remains open and logging continues uninterrupted.
return
self._chmod_if_managed()
# Our own rollover writes a new baseFilename; refresh the snapshot
# so the next emit doesn't mistake it for external rotation.
Expand Down
Loading