[FEATURE] SessionStart hook in Managed Agents
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
I couldn’t find anywhere else to submit a feature request specifically for the new Managed Agents, so I figured this would be as good a place as any. Please redirect me if there’s a better venue.
I often have a large number of files that I need to mount in a new session. Uploading each file individually and mounting individually in a new session is tedious. The current best solution is to package the files into a ZIP, mount that ZIP as one file, and then unzip at the start of the session.
However, the only way to unzip at the start of the session is to include instructions in the system prompt and rely on the agent following those instructions.
Proposed Solution
It would be useful to provide a cloudinit script, or a SessionStart hook like https://github.com/anthropics/claude-code/issues/4318 for a new session. This would provide a better guarantee for starting state in the container over agent instructions.
Alternative Solutions
The best alternative is to just rely on instructions in the system prompt and trust that the agent will follow them.
Priority
High - Significant impact on productivity
Feature Category
API and model interactions
Use Case Example
I have a directory of thousands of files, and I need the agent to browse the files to find what’s most relevant for the task (i.e., agentic retrieval), read the files, and conduct web research to support further analysis.
Additional Context
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗