buildSystem appends the working-directory anchor to the embedded system prompt so "hier" / "here" resolves to a concrete path.
(projectDir string)
| 1256 | } |
| 1257 | // Router-level failures arrive under any tool name and bypass the per-tool |
| 1258 | // shapes below: truncated/invalid JSON args (the failure that makes a model |
| 1259 | // re-emit the same too-large write for minutes) and a hallucinated tool |
| 1260 | // name. Both must count as failures or the repeated-failure nudge never |
| 1261 | // fires on exactly the loops it was built for. |
| 1262 | t := strings.TrimSpace(result) |
| 1263 | if strings.HasPrefix(t, "(tool arguments were not valid JSON") || strings.HasPrefix(t, "(unknown tool:") { |