Skip to content

Conversation

@penberg
Copy link
Collaborator

@penberg penberg commented Dec 22, 2025

Previously, AgentFSOptions::resolve() checked if a path exists before checking .agentfs/{id}.db. This caused issues when a directory existed with the same name as an agent - the directory would be selected and fail with "I/O error: is a directory".

Now the resolution order is:

  1. :memory: -> ephemeral
  2. Valid agent ID with existing .agentfs/{id}.db -> use agent
  3. Existing file path -> use direct path

This ensures agents in .agentfs/ always take precedence over files/directories in the current directory.

Previously, AgentFSOptions::resolve() checked if a path exists before
checking .agentfs/{id}.db. This caused issues when a directory existed
with the same name as an agent - the directory would be selected and
fail with "I/O error: is a directory".

Now the resolution order is:
1. :memory: -> ephemeral
2. Valid agent ID with existing .agentfs/{id}.db -> use agent
3. Existing file path -> use direct path

This ensures agents in .agentfs/ always take precedence over
files/directories in the current directory.
@penberg penberg merged commit 874d953 into main Dec 22, 2025
33 checks passed
@penberg penberg deleted the fix-agentfs-lookup branch December 22, 2025 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants