`write` through a dangling symlink always fails with `file_changed_since_read`
Writing to a path that is a symlink to a file that doesn't exist yet never succeeds, and the error tells the agent to re-read and retry, which can't help.
Repro (v0.68.0 binary):
mkdir -p root/inside && ln -s inside/newfile.txt root/dang
{"id":"0","command":"configure","harness":"opencode","project_root":"<abs>/root"}
{"id":"1","command":"tool_call","name":"write","args":{"path":"dang","content":"x\n"}}
Result: code: file_changed_since_read, "…/dang changed on disk after this call read it; nothing was written. Read the file again and retry." The raw write command gives the same. A symlink to an existing file writes fine, and so does a plain new path.
Cause (v0.68.1, crates/aft/src/edit/mutation.rs:168-171): for a target that was read as missing, check accepts only symlink_metadata(path) returning NotFound. A dangling link has symlink metadata (the link itself exists), so the check always reports a change, even though nothing changed between the read and the write.
Suggested fix: make the missing-file check consistent with how the target was read as missing — e.g. treat "the link exists and its target still doesn't" as unchanged, or decide up front whether writing through a dangling link is allowed and return a specific error if not.
Thanks, @null-axiom. Confirmed: the stale-read check sees the link itself, while the write path expects nothing there, so the error can never clear and retrying doesn't help. In the next release, AFT refuses this case with its own error that names the dangling link and says to write to the target path instead. Creating the target through the link would need the link's target checked against the project's path rules first, so we're not adding that now.