Skip to content

feat(ssh): add optional on-demand monitoring - #791

Open
JoeZhang-0x000 wants to merge 1 commit into
alphaXiv:mainfrom
JoeZhang-0x000:codex/ssh-on-demand-monitoring
Open

JoeZhang-0x000 wants to merge 1 commit into
alphaXiv:mainfrom
JoeZhang-0x000:codex/ssh-on-demand-monitoring

Conversation

@JoeZhang-0x000

Copy link
Copy Markdown
Contributor

Closes #790

Summary

  • Add optional on-demand monitoring for direct SSH runs, allowing agents to control status refreshes and log collection.
  • Preserve automatic monitoring defaults and configurable intervals.
  • Persist monitoring policy and cancellation intent; handle restart recovery and final log collection.
  • Add saved defaults and explicit UI refresh controls. Keep SSH keepalives while removing periodic helper heartbeats and redundant log writes.

Test plan

  • Rust tests: 1,331 passed, 3 ignored; fmt and Clippy passed.
  • Mock SSH regressions cover idle behavior, cancellation races, recovery, final logs, and container scope.
  • SSH helper tests: 14 passed.
  • UI tests: 438 passed; UI build and style checks passed.

@greptile-apps

greptile-apps Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

Adds optional on-demand monitoring for direct SSH runs while keeping automatic monitoring as the default.

  • Direct SSH runs can keep automatic checks or use a saved interval.
  • Direct SSH runs can wait for an explicit status or log refresh.
  • Run details show cached SSH observations and offer refresh controls.

No actionable issues were found. This review checked code and existing tests; it did not run the test suites.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Submit direct SSH run] --> B[Save monitoring policy]
  B --> C{Monitoring mode}
  C -->|Automatic| D[Supervisor checks status and collects logs]
  C -->|On demand| E[Wait for explicit refresh]
  E --> F[Check status once]
  F --> G{Collect logs requested?}
  G -->|Yes| H[Copy up to 1 MiB within 20 seconds]
  D --> I{Terminal and logs complete?}
  H --> I
  I -->|Yes| J[Queue remote cleanup]
  K[Cancel requested] --> L[Save intent]
  L --> M[Make one bounded control attempt]
Loading

Reviews (1) · Last reviewed commit: "feat(ssh): add optional on-demand monito..." · Reviewed by Greptile

This branch has not been deployed

No deployments
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.

Support agent-scheduled monitoring for direct SSH runs

1 participant