Skip to content

docs(design): agent mounts, one derived durable folder per agent#5215

Draft
mmabrouk wants to merge 1 commit into
big-agentsfrom
docs/agent-mounts-plan
Draft

docs(design): agent mounts, one derived durable folder per agent#5215
mmabrouk wants to merge 1 commit into
big-agentsfrom
docs/agent-mounts-plan

Conversation

@mmabrouk

Copy link
Copy Markdown
Member

Today an agent has no storage of its own: every run's files live in the session's mount (or an ephemeral temp dir for sessionless runs) and are invisible to the agent's other conversations. After this project, every agent has one durable folder, mounted into all of its runs next to the session cwd, browsable from the frontend.

This PR is the design workspace, no code. It captures the mechanism JP settled in his voice note (2026-07-11) plus the review that sharpened it:

  • Identity by reserved slug, not schema. Same trick session mounts already use: the slug is minted deterministically (__ag__agent__<artifact_id>__default), upserted on the existing unique(project_id, slug) constraint, session_id stays NULL. No migration, no new column, no uniqueness machinery.
  • No wire change. The runner already receives runContext.workflow.artifact.id; it signs the agent mount best-effort and mounts it at <cwd>-agent, local and Daytona, exposing the path via one env var.
  • Two thin endpoints mirror the session shape: POST /mounts/agents/sign (runner) and POST /mounts/agents/query (frontend lookup; read never creates). The frontend reuses the existing mount file browser.
  • Deliberate limitations (no reverse lookup machinery, no FK/cascade, shared-prefix last-writer-wins) are documented in context.md with the graduation path if they ever start to matter.

How to review: plan.md is the document to comment on; it ends with six open questions (slug shape, endpoint placement, mount point constant, query semantics, frontend slice ownership, run-type coverage). context.md holds the why and the rejected alternatives; research.md the code facts with file:line pointers.

Depends on nothing; builds on the transcript-mounts pattern from #5197 (applied to the tree, unmerged), so the runner slice tracks that PR's final shape.

https://claude.ai/code/session_01QHXdTFZjipBCPX3PkeWbh6

Design workspace for agent-scoped mounts: identity minted into the reserved
mount slug from the workflow artifact id (JP's mechanism), no schema change,
no wire change, no configuration. Context, research with code pointers,
decisions D1-D4, four slices, six open questions for review.

Claude-Session: https://claude.ai/code/session_01QHXdTFZjipBCPX3PkeWbh6
@vercel

vercel Bot commented Jul 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agenta-documentation Ready Ready Preview, Comment Jul 10, 2026 11:24pm

Request Review

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e6f94aad-b9e1-4f2d-900b-c97e56d3a5a1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/agent-mounts-plan

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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