Skip to content

run and diff use different directoriesΒ #321

@Fryuni

Description

@Fryuni

agentfs run uses sessions on ~/.agentfs/run/<id>/delta.db while agentfs diff looks for sessions on .agentfs/<id>.db (relative to current directory).

This makes the command suggested at the end of agentfs run fail.

Minimal reproduction transcript:

[lotus@lotus-notebook:/tmp/tmp.BvYnMXM3yR]$ agentfs -V
agentfs 0.6.2

[lotus@lotus-notebook:/tmp/tmp.BvYnMXM3yR]$ agentfs run bash
Welcome to AgentFS!

The following directories are writable:

  - /tmp/tmp.BvYnMXM3yR (copy-on-write)
  - /home/lotus/{.cache, .claude, .codex, .gemini, .local, .npm}

πŸ”’ Everything else is read-only.

To join this session from another terminal:

  agentfs run --session 6754c191-24c4-4d8e-aac2-f49a469036bc <command>


[lotus@lotus-notebook:/tmp/tmp.BvYnMXM3yR]$ touch foo.txt

[lotus@lotus-notebook:/tmp/tmp.BvYnMXM3yR]$
exit

Session: 6754c191-24c4-4d8e-aac2-f49a469036bc

To resume this session:
  agentfs run --session 6754c191-24c4-4d8e-aac2-f49a469036bc

To see what changed:
  agentfs diff 6754c191-24c4-4d8e-aac2-f49a469036bc

[lotus@lotus-notebook:/tmp/tmp.BvYnMXM3yR]$ agentfs diff 6754c191-24c4-4d8e-aac2-f49a469036bc
Error: agent '6754c191-24c4-4d8e-aac2-f49a469036bc' not found at '.agentfs/6754c191-24c4-4d8e-aac2-f49a469036bc.db'

[lotus@lotus-notebook:/tmp/tmp.BvYnMXM3yR]$ ls -la ~/.agentfs
total 20
drwxr-xr-x   3 lotus users  4096 Feb 28 12:44 .
drwx------ 123 lotus users 12288 Feb 28 12:44 ..
drwxr-xr-x   4 lotus users  4096 Feb 28 12:52 run

[lotus@lotus-notebook:/tmp/tmp.BvYnMXM3yR]$ ls -la ~/.agentfs/run
total 16
drwxr-xr-x 4 lotus users 4096 Feb 28 12:52 .
drwxr-xr-x 3 lotus users 4096 Feb 28 12:44 ..
drwxr-xr-x 2 lotus users 4096 Feb 28 12:53 6754c191-24c4-4d8e-aac2-f49a469036bc

[lotus@lotus-notebook:/tmp/tmp.BvYnMXM3yR]$ ls -la ~/.agentfs/run/6754c191-24c4-4d8e-aac2-f49a469036bc/
total 228
drwxr-xr-x 2 lotus users   4096 Feb 28 12:53 .
drwxr-xr-x 5 lotus users   4096 Feb 28 12:59 ..
-rw-r--r-- 1 lotus users     19 Feb 28 12:52 base_path
-rw-r--r-- 1 lotus users   4096 Feb 28 12:52 delta.db
-rw-r--r-- 1 lotus users 214272 Feb 28 12:53 delta.db-wal

[lotus@lotus-notebook:/tmp/tmp.BvYnMXM3yR]$ cp ~/.agentfs/run/6754c191-24c4-4d8e-aac2-f49a469036bc/delta.db .agentfs/6754c191-24c4-4d8e-aac2-f49a469036bc.db

[lotus@lotus-notebook:/tmp/tmp.BvYnMXM3yR]$ agentfs diff 6754c191-24c4-4d8e-aac2-f49a469036bc
Using agent: 6754c191-24c4-4d8e-aac2-f49a469036bc
No diff (non-overlay filesystem)

When I copied the file it at least recognized it, but then it shows no diff, so there is another problem there. If I join the session again the changes are there.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions