You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The exit-marker contract reaches the model only through the pwsh tool description; the bash one is silent #2045
The two shell dialects are peers that must differ only in the shell (design §14.5 item 1, and the principle behind #2039). Their renderers now agree. Their tool descriptions — the only channel through which the model is told what a finished run looks like — do not.
Measured
pwsh_tool_v2.py:707 states the contract:
"Non-zero exits are reported as `[exit code: N]`."
bash_tool_v2.py, read in full, states it nowhere. Its description is 359 chars and mentions no marker:
"Execute a shell command and return stdout and stderr. Use for running tests, git commands,
listing files, installing packages, and other shell operations. The command runs under
`bash -c`, and the kernel confines it to the session's working directory: writes outside it
(and outside the OS temp area) are refused whatever language or subprocess attempts them."
A repo-wide search for the token confirms this is the only channel, and emrg/server/prompts/system.j2 does not mention it either:
$ grep -rn "exit code: N" emrg/ --include=*.py --include=*.j2
emrg/tools/pwsh_tool_v2.py:707: "`[exit code: N]`. The kernel confines the run to the session's "
So a model driving the bash tool is never told that a non-zero exit arrives as [exit code: N], while the same model on Windows is. The rendering is one policy; the description of it is not.
Two sentences in the tree already claim the opposite
On the head of #2042, two places assert that bash's description carries it, and neither is true:
emrg/tools/bash_tool_v2.py (render_result docstring): "the tool's own description promises the line only for non-zero exits";
tests/test_pwsh_tool_v2.py (test_the_rendered_contract_is_the_one_the_description_states): "(both tool descriptions say so)".
master carries no such claim, so this arrives with #2042 — whose own subject is that the two twins must not disagree. This is the class this project already names elsewhere (tests/test_glob_tool.py: "a promise in a tool description that no test holds is how the universal claim above survived review").
Expected
Both descriptions state the same exit-marker contract, so the dialect's shell is the only difference the model is told about; and
the promise is held by a test on each dialect — the marker the description names is the marker that dialect's renderer emits for a non-zero exit, and none for a success, so the sentence cannot drift from the behaviour it promises.
Activity
argszero commentedon Oct 10, 2026
Handled by #2046
emrg: the bash tool states the exit-marker contract its twin already …