Skip to content

Reduce attach_file friction for screenshot handoff between sessions#148

Merged
Aaronontheweb merged 2 commits into
devfrom
feature/attach-file-session-copy-hardening
Mar 5, 2026
Merged

Reduce attach_file friction for screenshot handoff between sessions#148
Aaronontheweb merged 2 commits into
devfrom
feature/attach-file-session-copy-hardening

Conversation

@Aaronontheweb

Copy link
Copy Markdown
Collaborator

Why

Agent logs show repeated attach_file failures when the model tries to attach screenshots generated in a previous session directory. The tool currently rejects all paths outside the current session, forcing awkward manual copy steps.

What changed

  • Keep strict default-deny behavior for arbitrary filesystem paths.
  • Allow attach_file to import files from sibling Netclaw session roots (.../sessions/* and .../netclaw-sessions/*) by copying them into the current session's attachments/ folder first.
  • Continue rejecting paths outside recognized Netclaw session roots and reject symlink escapes.
  • Update tool description text so agents understand cross-session handoff behavior.
  • Add tests for:
    • sibling-session copy-and-attach success
    • symlink escape from sibling session rejection

Validation

  • dotnet test --filter FullyQualifiedName~AttachFileToolTests
  • dotnet test --filter FullyQualifiedName~SlackFileFlowIntegrationTests
  • dotnet test --nologo
  • dotnet slopwatch analyze

Observed regression evidence

From sys76-3 daemon logs:

  • Error: File path must be within the session directory ... for attach_file calls that referenced prior session screenshot paths.
  • Follow-up calls succeeded only after explicitly copying the same files into the current session directory.

@Aaronontheweb Aaronontheweb merged commit 22b14ed into dev Mar 5, 2026
4 checks passed
@Aaronontheweb Aaronontheweb deleted the feature/attach-file-session-copy-hardening branch March 5, 2026 14:10
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.

1 participant