Skip to content

Conversation

@EhabY
Copy link
Collaborator

@EhabY EhabY commented Dec 30, 2025

Summary

  • Clean up old <pid>.json files in the network info directory on monitor start (files older than 1 hour)
  • Search for a new SSH process after 5 consecutive failures to read the network info file (similar to existing stale file behavior)

Details

Network info files (<basePath>/net/<pid>.json) are created by the Coder CLI and persist after processes terminate. This adds automatic cleanup of files not modified in the last hour.

Previously, if the network info file was missing (e.g., deleted or never created), the monitor would log errors indefinitely without attempting to find a new process. Now it behaves consistently with stale file detection - after 5 failures (with delays), it searches for a new SSH process.

Closes #51

- Clean up network info files older than 1 hour when monitoring starts
- Search for new SSH process after 5 consecutive file read failures
@EhabY EhabY force-pushed the delete-old-network-info-files branch from b43d8f1 to dba73e1 Compare December 30, 2025 10:15
@EhabY EhabY requested a review from johnstcn December 30, 2025 16:20
@EhabY EhabY merged commit d18dc18 into coder:main Dec 31, 2025
3 checks passed
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.

Old JSON files are left in net folder of extension

3 participants