fix: agent session needs cwd sandboxing, system prompt, and tool restrictions #64
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Pi SDK agent sessions inherit the gateway process cwd (
apps/gateway) and have full filesystem access via built-in tools (read, bash, edit, write). The agent identifies as 'Claude Code' with no Mosaic-specific system prompt.Observed behavior
Required changes
createAgentSessionshould use a configurable/sandboxed cwd (not the gateway's own directory)References
apps/gateway/src/agent/agent.service.ts—createAgentSession({ tools: [] })currently passes empty tools array but Pi SDK adds defaultsAgentOptionssupportstools,systemPrompt, and working directory configFound by
End-to-end testing of communication spine