Hello oarteam,
As I can see in IO.pm, new jobs are created with "hold" state first (why not using special state?), then they are updated to "waiting" state.
It seems that oarstat is not aware of this "trick", and can lead to strange behavior in some cases when oarstat is called in this very short time event (hold->waiting). (State transition HOLD->WAITING with some workflow framework like NextFlow can stop script execution with an error).
Could you please confirm the behavior?