Skip to content

Sub-agent creation blocked by ClaudeDirectoryNotTrustedError — trust dialog not shown during mind setup #974

@joshalbrecht

Description

@joshalbrecht

Summary

When a fresh Mind deployment tries to create its first working sub-agent via create_working_agent.sh, the mng create command fails because the project directory has never been trusted by Claude Code. The trust dialog was never shown or accepted during setup, but the mind appears to start and run normally — the error only surfaces on the first sub-agent creation attempt.

Steps to reproduce

  1. Deploy a fresh Mind (onboarding event fires, thinking agent starts running)
  2. Attempt to create a working sub-agent via create_working_agent.sh
  3. Observe failure

Error

ClaudeDirectoryNotTrustedError: Source directory /mng-state/volumes/vol-7057b1b71d4342ec82dcd31f63405773/projects/agent-a924f885fb5b462f94d385a19fa6697a is not trusted by Claude Code.
Run `mng create` interactively (without --no-connect) to be prompted, or run Claude Code manually in /mng-state/volumes/vol-7057b1b71d4342ec82dcd31f63405773/projects/agent-a924f885fb5b462f94d385a19fa6697a and accept the trust dialog.

Expected behavior

The trust dialog should either be:

  • Automatically accepted/configured during mind provisioning/startup, OR
  • Surfaced to the user as a required setup step before the mind starts processing events

Actual behavior

The mind starts running and processes events normally, but cannot create any sub-agents. This is a silent failure — nothing during onboarding indicated that directory trust was a required prerequisite.

Context

  • Fresh mind deployment (onboarding event just fired for the first time)
  • Thinking agent is running correctly in the directory
  • Issue only surfaces when trying to create the first sub-agent
  • Mind directory: /mng-state/volumes/vol-7057b1b71d4342ec82dcd31f63405773/projects/agent-a924f885fb5b462f94d385a19fa6697a

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions