Skip to content

Bug: ShellTracker incorrectly reports short-lived commands as still running #379

Closed
@bhouston

Description

@bhouston

Bug Description

There appears to be a bug in the ShellTracker where short-lived shell commands that complete in sync mode are still being reported as running in the status updates.

Observed Behavior

The periodic status messages report a large number of shells in the "running" status, even though these were short-lived commands that have already completed.

Expected Behavior

Once a shell command completes, regardless of whether it runs in sync or async mode, it should be properly marked as completed in the ShellTracker.

Potential Root Cause

The issue may be related to how process completion is handled for commands that don't enter async mode. It appears that the shell status isn't being properly updated for commands that complete within the timeout period.

Steps to Reproduce

  1. Run multiple short-lived shell commands
  2. Observe status updates showing these commands as still running

Impact

This causes confusion as the status updates show many "running" shell processes that are actually completed, making it difficult to track which processes are genuinely still running.

Proposed Investigation

  1. Add tests that specifically verify shell status tracking for sync-mode commands
  2. Examine the shellStart implementation to ensure status is properly updated for both sync and async execution paths

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions