Skip to content

Report remote session discovery and notification submission failures - #7

Open
willsqow wants to merge 1 commit into
zis3c:mainfrom
willsqow:fix/remote-session-diagnostics
Open

willsqow wants to merge 1 commit into
zis3c:mainfrom
willsqow:fix/remote-session-diagnostics

Conversation

@willsqow

@willsqow willsqow commented Oct 6, 2026 •

Copy link
Copy Markdown

In a Remote SSH workspace outside a recognized home layout, such as /data/alice/project, session discovery can construct /.codex/sessions. An invalid configured path can also cause discovery to fall back to unrelated local sessions. Directory and session read errors are currently swallowed, making missing completion notifications difficult to diagnose.

Require an explicit absolute remote remoteSessionsPath when the home cannot be inferred, and keep remote workspaces from silently switching to local monitoring. Add bounded, throttled metadata diagnostics for remote directory/stat/read failures and deduplication, format diagnostic arrays and objects as JSON, and report OS notification submission status. On Windows, make toast submission failures observable and bound the helper execution to 10 seconds.

Diagnostic records exclude transcript and notification bodies. They contain paths and session identifiers, so users should redact them before sharing. submitted means the OS call succeeded, not that Windows displayed a banner.

Validation:

  • Existing event parsing and toast focus tests pass.
  • Added runtime tests cover normal and custom remote roots, invalid paths, no local fallback, discovery through a mocked remote filesystem, error throttling/bounds and private-body exclusion, notification submission failures, and main-session classification.
  • A mocked two-window test verifies exactly three notifications for three successive turns.
  • A read-only check of a real Linux Codex environment confirmed the expected top-level VS Code source metadata and task_complete events, alongside filtered guardian metadata.
  • In an isolated real VS Code extension host running the combined private build, three synthetic session completion events resulted in three successful Windows Toast API submissions. Actual Remote SSH transport, visible banner display and reconnect validation remain pending.

Explicit paths retain priority; no machine-specific directory is hardcoded. This PR is independent of the optional foreground-notification feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant