Version / branch / commit
zero dev (75a78e7) main
OS and environment
linux / tmux / go 1.26.4
Steps to reproduce
-
Start a run where the model is pushed to implement a multi-file change (plan → implement).
-
Observe (or force) tool calls of the form:
{"name": "write_stdin", "arguments": {"session_id": 1, "chars": "..."}}
without a preceding live exec_command session.
-
Confirm:
- Error:
Unknown exec session_id 1.
- Subsequent calls with
2, 3, … continue failing.
- Same-error stop may be delayed until the numeric ID stabilizes.
Unit-level coverage already exists for unknown IDs (internal/tools/exec_command_test.go). What’s missing is:
- guardrail signature stability across changing IDs, and/or
- stronger model-facing error text / tests that the stop fires within a small bound when only the id digits change.
Expected behavior
write_stdin is only used with a session_id previously returned by a still-running exec_command.
- Real exec session IDs start at 1000 (not 1).
- On unknown/missing sessions, the model should stop and choose a different approach (e.g. start
exec_command, or use write_file / edit_file / apply_patch for file edits) rather than invent sequential IDs.
- The repeated-failure guardrail should stop this thrash early even when the numeric ID changes each attempt.
Actual behavior
Example pattern:
I have enough context; expanding the sketch into a full implementation plan.
• Sent input
Error: Unknown exec session_id 1.
• Sent input
Error: Unknown exec session_id 2.
• Sent input
Error: Unknown exec session_id 3.
…
• Sent input
Error: Unknown exec session_id 7.
Later: retries continue (reported up to ~id 150, then restart / halt), ending with the 6× same-error stop on write_stdin.
Relevant logs, screenshots, or error messages
- Wastes turns/tokens and user time.
- Masks real blockers (e.g. missing write tools, permission mode, plan-only constraints).
- User-visible failure mode looks like broken patch/write tooling.
- Guardrail eventually stops the run, but often only after many useless tool calls.
Version / branch / commit
zero dev (75a78e7) main
OS and environment
linux / tmux / go 1.26.4
Steps to reproduce
Start a run where the model is pushed to implement a multi-file change (plan → implement).
Observe (or force) tool calls of the form:
{"name": "write_stdin", "arguments": {"session_id": 1, "chars": "..."}}without a preceding live
exec_commandsession.Confirm:
Unknown exec session_id 1.2,3, … continue failing.Unit-level coverage already exists for unknown IDs (
internal/tools/exec_command_test.go). What’s missing is:Expected behavior
write_stdinis only used with asession_idpreviously returned by a still-runningexec_command.exec_command, or usewrite_file/edit_file/apply_patchfor file edits) rather than invent sequential IDs.Actual behavior
Example pattern:
Later: retries continue (reported up to ~id 150, then restart / halt), ending with the 6× same-error stop on
write_stdin.Relevant logs, screenshots, or error messages