Skip to content

Land Depot agents CLI 3/6: files and chat in attach (DEP-7264) - #616

Closed
robstolarz wants to merge 16 commits into
rob/depot-agents-cli-land-02-hidefrom
rob/depot-agents-cli-land-03-files
Closed

robstolarz wants to merge 16 commits into
rob/depot-agents-cli-land-02-hidefrom
rob/depot-agents-cli-land-03-files

Conversation

@robstolarz

@robstolarz robstolarz commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Sends files and directories to an agent (session create --file/--stdin-file, /file in attach) and adds an interactive chat mode to attach. This PR lands approved #607 (head 741e8d3) as a --no-ff merge onto rob/depot-agents-cli-land-02-hide, as part of the per-feature landing stack for DEP-7264. Review: git show --remerge-diff cef3d9b shows only what the merge changed beyond #607's approved diff.

Stack

  1. Land Depot agents CLI 1/6: session commands (DEP-7264) #614 lands feat: add depot agent session commands #606
  2. Land Depot agents CLI 2/6: hide depot agent until GA (DEP-7247) #615 lands feat: hide depot agent from root help until GA #611
  3. Land Depot agents CLI 3/6: files and chat in attach (DEP-7264) #616 lands feat: send files to Depot agents and chat in attach #607 ← this PR
  4. Land Depot agents CLI 4/6: agent pull and push (DEP-7264) #617 lands feat: add depot agent pull and push #610
  5. Land Depot agents CLI 5/6: local MCP servers on attach (DEP-7247) #618 lands feat: offer local MCP servers to a Depot agent session on attach (DEP-7247) #609
  6. Land Depot agents CLI 6/6: plugin views (DEP-7248) #619 lands Render plugin views and run their controls from the CLI (DEP-7248) #608

Test plan

  • go build ./... and go test ./... pass at this tip, including TestUploadAttachments* (limits, ignores, symlinks, stdin, unique names), TestAttachQueuesAFileForTheNextMessage, TestAttachCountsQueuedFilesAgainstTheLimit, TestAttachDropsQueuedFilesWhenASendIsRejected, TestAttachDoesNotSendAMessageWhoseFileFailed, TestMediaTypeTrustsTheBytesOverTheName, TestChatModel*, TestUniqueNameFitsTheNameLimit, TestRendererNamesSendersAndAttachments
  • TODO(verify): no automated upload against a deployed API.
Merge resolutions

Clean merge; no conflicts.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NdhqP6oGqJMRJLwBU5Zepm

robstolarz and others added 16 commits October 2, 2026 13:27
The transcript prints above an input line that stays editable while output streams.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
`--file` (repeatable) on `session create` and `session send`, and `/file <path> [message]`
in attach, hash each file locally, upload only the contents Depot does not already store,
and send the attachments with the message. The size shows before upload, and a file over
the server's limit is refused before anything is uploaded.

The transcript names the sender of each user message and queued input, including people
on connected services such as Slack, and lists attached files.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… upload

Directories send the files git would track, so .gitignore applies; --stdin-file
names piped input; media types are sniffed so piped images reach the model as
images. Every path is checked against the server's count, per-file and total
limits before anything uploads. DEP-7247

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…for every hash

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…input by what the message has left

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ashed, and fit names in 255 bytes

Inside a work tree a git failure no longer falls back to a plain walk that would
send ignored files. Each file is read once, so a file that changes mid-attach
cannot upload under the wrong hash. Flattened names keep their tail and extension.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ders

A send that fails after retries leaves attach unable to send while the bad
file stays queued, so the chat drops the queue and says so. Subagent reports
render as "name (subagent)" like other non-user senders.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ent notices

Part of DEP-7247.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NdhqP6oGqJMRJLwBU5Zepm
Linux maps .log to text/x-log; macOS to text/plain. Part of DEP-7247.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NdhqP6oGqJMRJLwBU5Zepm
Matches the API's numbering. Part of DEP-7247.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NdhqP6oGqJMRJLwBU5Zepm
The system MIME table varies by machine and can label TypeScript as
video/mp2t, so the extension is consulted only for bytes the sniffer
cannot place. Part of DEP-7247.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NdhqP6oGqJMRJLwBU5Zepm
A .docx still sniffs as a zip and an .svg or .md as text, so the
extension's type wins when it refines what the bytes say, and is
ignored when it contradicts them. Part of DEP-7247.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NdhqP6oGqJMRJLwBU5Zepm
RTF and other text-based application formats sniff as text, so a text
sniff now keeps the extension's type unless it names binary media.
Part of DEP-7247.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NdhqP6oGqJMRJLwBU5Zepm
Go sniffs any MP4 container as video/mp4, so .m4a audio lost its type.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NdhqP6oGqJMRJLwBU5Zepm
Refs DEP-7264

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NdhqP6oGqJMRJLwBU5Zepm
@linear-code

linear-code Bot commented Oct 3, 2026

Copy link
Copy Markdown

DEP-7264

@robstolarz

Copy link
Copy Markdown
Contributor Author

Superseded by #613 (single cli landing PR)

@robstolarz robstolarz closed this Oct 3, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Risk: medium. Approved. Cursor Bugbot completed successfully with no findings that need human review.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

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