It's a very good question and I'm sorry to say I don't have a good answer. For whatever reason, we never adopted the concept of programs passing a termination code back to the environment, which could then be detected with IF.LIT.
I guess maybe the reason was that at least in the case of application programs (as opposed to simple LIT commands), it's not clear what the termination code would be, unless explicitly set by each program. (Other than the case of an untrapped BASIC error.)
Perhaps it wouldn't be that difficult to implement a new $ variable recognized by IF.LIT that was automatically set by each LIT or RUN at the end of each program to 0 for a normal termination, ### for an untrapped error, and anything explicitly set by some new MX_SET_EXIT_STATUS function.
But that would still involve inserting a lot of IF statements into each of your CTL files.
Perhaps a further simplification of that concept would be to have a single command at the top of the CTL that requested termination if the exit status of any program becomes non-zero.
But all of those involve modifications to A-Shell, updates, etc.
As for what you can do right now, one idea would be to terminate the A-Shell session using
MX_EXIT . (You'd have to add that logic to each of the constituent programs.)