Skip to content

Define run tracking modes (strict-run and follow-descendants) #2

@melonattacker

Description

@melonattacker

Is your feature request related to a problem? Please describe.

logira run currently tracks the executed command and its descendants, but the behavior around long-lived child processes is unclear.

Examples include:

  • agents spawning background processes
  • daemonized children
  • processes that continue running after the parent exits

It is not obvious whether logira should:

  • stop tracking when the parent exits
  • continue tracking descendants
  • or detect and report escaped processes

Clear semantics would help users understand how runs are bounded.

Describe the solution you'd like

Introduce explicit run tracking modes.

strict-run

Default mode for auditing a single command.

Behavior:

  • track the parent command and its descendants
  • close the run when the parent exits
  • allow a short grace period
  • report if descendants remain running

Example:

logira run --mode strict-run -- claude

follow-descendants

Continue tracking descendant processes after the parent exits.

Behavior:

  • keep tracking children until they exit
  • or until a timeout / linger period
  • surface persistent background processes

Example:

logira run --mode follow-descendants --linger 60s -- claude

Describe alternatives you've considered

One option is to keep the current behavior and document it more clearly.

However, different use cases require different run boundaries:

  • auditing a single command
  • tracking agents that spawn background tasks

Explicit modes provide flexibility without complicating the basic workflow.

Additional context

This also prepares the groundwork for service-style monitoring (logira watch) where process lifetimes may not map cleanly to a single command invocation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions