mirror of
https://github.com/l0ng-ai/tty7.git
synced 2026-09-22 16:02:24 +00:00
The field was listed in `run`'s JSON and nowhere explained, on the surface agents parse. It says whether the server managed to read a status before it stopped waiting; when it did not, `run` exits 1 as a stand-in and says so on stderr, and the flag is the only way to tell that 1 from a real one. A command killed by a signal also comes back as `exit: 1` -- not the 128+N a shell reports -- and with `exit_code_known: true`, because a status really was read. The two are byte-identical in the JSON, so an agent cannot tell a command the OOM killer took from one that exited 1 by itself, and it should not be left to find that out the hard way. That last part is a limitation rather than a choice: the pty crate keeps the signal in a private field with no accessor, and hands back a placeholder code of 1 in its place. `success()` cannot separate the two either, since it is false for both. Reporting the real 128+N needs the child reaped directly -- which the daemon already does for adopted panes, where it gets this right. Found by running the commands, not by reading them.