[Bug]: File path resolution failure in Docker-on-Windows environment
What happened?
When an agent running inside a Docker container generates a file tag like file:/ductor/agents/bot/workspace/output.md, the host bot (running on Windows) fails to locate the file, resulting in a [File not found: output.md] message.
This occurs because the host interprets the path /ductor/ as a root-relative path on the current Windows drive (e.g., C:\ductor...) instead of mapping it back to the host's actual DUCTOR_HOME directory (e.g., C:\Users\Name.ductor...).
The similar problem in windows-docker env: #9
Steps to Reproduce
- Let a bot generate a file and send it to you
- you will see [File not found: output.md]
Expected Behavior
The host bot should automatically recognize the /ductor/ mount prefix in file tags and resolve it to the host's DUCTOR_HOME path before attempting to send the file.
Operating System
Windows
Environment
Docker
Which LLM provider?
Gemini
ductor version
0.12.0
/diagnose output
Proposed Solution:
1. Update Path Normalization: In ductor_bot/files/tags.py, update _normalize_windows_tag_path to detect the /ductor/ prefix and replace it with the host's absolute DUCTOR_HOME path.
2. Improve Error Messaging: In ductor_bot/bot/sender.py, update the send_file function to include the attempted absolute path in the [File not found] error message to simplify debugging of path mismatches.
Relevant log output
LLM self-diagnosis (optional)
ductor_bot/cli/base.py
_CONTAINER_DUCTOR_MOUNT = "/ductor"
def _to_container_path(host_path: Path, main_home: Path) -> str: rel = host_path.relative_to(main_home) if str(rel) == ".": return _CONTAINER_DUCTOR_MOUNT return f"{_CONTAINER_DUCTOR_MOUNT}/{rel.as_posix()}"
Above is the code, however, there should be a function _from_container_path to handle the files returrn from docker.
Additional context
No response
Before submitting
- [x] I have searched existing issues for duplicates.
- [x] I am running the latest version.
Fixed in commit 1f58919 — _resolve_container_path() in files/tags.py now translates /ductor/... container paths back to the host DUCTOR_HOME. This was also addressed in PR #37 by @liuh886, which we ported into the restructured codebase. Will be included in v0.14.0.