Repository navigation
Description
What happened
dev@57940a813, 2026-09-09. Three doors onto one seam — the context chooser — disagree
about the same stated law, and one of them leaves a person with no door at all.
1. A bare /attach over --host is refused with a sentence about folders. Driving
the real binary as a --host session and typing /attach with nothing after it:
· choosing a folder is not available over --host yet — the folders here are this machine's, not the ones the conversation is on.
That is an answer about FOLDERS, for a command about FILES, on a road where files are
fully supported: /attach over --host sends the bytes and the engine writes them into
the far session's attachments/ (the Attaching files page says so in as many words, and
docs/remote-access-testing.md §3.0 records it verified). The sheet the command wants to
open would be listing exactly the right machine's disk — this one. And #657 deleted the old
/attach takes a path · try /attach server.log refusal on the grounds that "somebody who
typed the word without the path is somebody who does not know the path", so over --host
that person now has no door whatsoever.
2. /attach <a directory> over --host is not refused. Three lines later in the same
transcript, on the same connection:
· choosing a folder is not available over --host yet — the folders here are this machine's, not the ones the conversation is on.
· folder · ~/here/adir
The second line is THIS machine's local path registered as a scoped reference on a
conversation that is on the other machine — a directory the far engine has never seen, now
carried into every later model request. Whichever answer is right, both cannot be.
3. Outside a project, the chooser opens inside ~/.aforge. In a plain directory that
is not a project, /folder draws:
╭─ add context ────────────────────── ~/.aforge/v3/projects/-tmp-plaindir/<id>/work ╮
│ ~ › .aforge › v3 › projects › -tmp-plaindir › <id> › work │
│ work/ nothing below here nothing below here │
│ meta.json │
│ presence.json │
│ transcript.jso… │
│ add this folder · ~/.aforge/v3/projects/-tmp-plaindir/<id>/work │
hello.txt, in the directory the terminal is standing in, is nowhere on the sheet, and the
action row offers to make aforge's own bookkeeping the thing this conversation is about.
The manual states the ladder as "a folder this conversation has already been given, the
folder this window is working in, your home directory" (choosing-a-folder.md) — the code
does not do that, because an owned conversation's workspace IS the state directory
(Options.Owned, tui3.go).
Replication
Deterministic (no model). In internal/tui3, the package's own labs reach all three in
under a second:
// 1. a bare /attach over a connection. fileLab's second argument is the host.
a, _, _ := fileLab(t, "devbox", nil)
a.openContextPick("", false) // what a bare /attach does (app.go, case "attach")
// TODAY: a.folder.open is false and lastNote(t, a) is folderRemoteWord.
// 2. /attach handed a directory over the same connection.
a, _, dir := fileLab(t, "devbox", nil)
os.Mkdir(filepath.Join(dir, "adir"), 0o755)
a.attachFilePath(filepath.Join(dir, "adir"))
// TODAY: the fake agent's ReferPlace was called with a local path; the note is `folder · …`.
// 3. the chooser on a conversation whose workspace is its own work/.
a, _, root := modalLab(t)
a.owned = true // what a session opened outside a project is
settleFolder(t, a, a.openFolderPick(""))
// TODAY: a.folder.cols.dir is the workspace — aforge's own state — rather than the
// directory the window is working in.Field (real models). No key needed; nothing here reaches a model.
make build
mkdir -p /tmp/plaindir && cd /tmp/plaindir && echo hello > hello.txt
bin/aforge chat --no-host --yolo # type /folder — case 3For 1 and 2, any second machine, or your own over ssh
(docs/remote-access-testing.md §3.0): bin/aforge chat --host localhost:<empty dir>,
then /attach, then /attach <any directory on this machine>. On a box with no sshd, an
ssh shim on PATH that execs the last argument locally puts the surface in exactly the
same state — Host set, a second process, a real pipe — and draws the same two lines.
Where
openContextPickininternal/tui3/folderplace.go— thea.hosted()refusal stands
ahead of thefoldersintent check, so it fires for both doors. The function's own
comment states the law it breaks: "the intent decides exactly one thing — WHETHER A
FOLDER DOOR IS REQUIRED TO OPEN AT ALL".folderConfirmininternal/tui3/folderact.go— the sheet's action row asks
canReferPlaceand nothing about the connection (searchAND A FOLDER CANNOT BE OFFERED).attachFilePathininternal/tui3/attach.go—info.IsDir()goes straight to
referPlacewith no hosted guard (searchA FOLDER USED TO BE A REFUSAL AND IS NOW THE DOOR).contextStartininternal/tui3/folderplace.go— the second rung isa.pathRoot(),
which on an owned conversation is~/.aforge/v3/projects/<encoded>/<id>/work.
The fix
- A bare
/attachover--hostopens the sheet, on this machine's disk, exactly as it
does locally. Files travel; that is the point of/attachover a connection. /folderover--hostkeeps its refusal, unchanged and to the letter:
choosing a folder is not available over --host yet — the folders here are this machine's, not the ones the conversation is on.- A folder confirmed on that sheet over
--host—alt+mthenenter, or the action
row — says that same one sentence and registers nothing, with the marks still in the
person's hands, the way the no-door refusal already behaves. /attach <a directory>over--hostsays that same one sentence and registers nothing.
One seam, one sentence, three doors.- The chooser never opens inside
~/.aforge. On a conversation that owns its workspace the
ladder skips that rung and lands on the directory this window is working in, which is
what the manual has said all along.
Acceptance
- e2e: driving the real binary as a
--hostsession, a bare/attachdraws the
add contextsheet with the breadcrumb on a directory of THIS machine, and the
transcript gains nochoosing a folder is not available over --host yetline. - e2e: on the same session
/attach <a directory on this machine>writes
choosing a folder is not available over --host yet — the folders here are this machine's, not the ones the conversation is on.
and nofolder · <path>line; andbin/aforge chat --no-hoststarted in a plain
directory draws the sheet with that directory's own name on the breadcrumb and its file
on the rows, nevermeta.json/presence.json/transcript.jsonl. - Unit:
internal/tui3— the hosted refusal is asked only under folder intent
(openContextPick(query, false)opens on a hosted app); every road ontoreferPlace
goes through one hosted check;contextStarton an owned conversation returns the
window's own directory. - The manual pages that cover this quote the new wording (
internal/manual/chat/
choosing-a-folder.md,attaching-files.md,running-on-another-machine.md), and the
change entry'sinvalidatesnames what people believed before.
Activity
chat: one sentence for every road onto a folder, and a chooser that o…