Duck’s DEV Community article “Your agent remembers things that never happened” traces two bugs in the context passed to coding agents. In one, the prompt identifies a shell different from the one the tool uses. In the other, a conversation transcript keeps the arguments originally proposed by the model even though a hook changes them before execution. The original report is at https://dev.to/kidkender/your-agent-remembers-things-that-never-happened-53bg.
Keep the shell description tied to execution
Duck describes starting nanocoder under a Windows environment such as Git Bash, where the environment can advertise a Bash shell. In the code discussed in the article, prompt construction checked that setting first, while the Windows tool ran commands through ComSpec. The model could then write a command that used Bash variable syntax and receive the variable name as literal text. The proposed change gives the Windows shell selection priority when building the prompt.
The regression test belongs at the boundary the model sees. A test that checks only the child process can confirm the executor is working while missing the incorrect prompt. Duck describes testing with an environment that advertises Bash and checking the prompt produced for the Windows path.
Replay the arguments the tool received
The crewAI example starts with a request for a 35-minute meeting. A hook rounds the duration to 45 minutes before the reservation tool runs. During that turn, the tool uses the effective value. If the conversation is restarted using the saved messages, the old transcript can still show 35 minutes because the assistant’s tool call was recorded before the hook ran.
Duck describes updating the reported arguments for changed calls in the sequential and parallel paths covered by the patch. The article identifies separate paths outside its scope. A regression test checks that a modified call reflects the effective value and that another call in the same batch retains its original arguments. The test catches a discrepancy that a tool success check alone would miss.
Which part of your agent’s context would you compare against execution first: the environment described in the prompt, the arguments in a saved transcript, or the tool result shown after an error?