Skip to content

fix: call initGroupFilesystem after ncl groups create#2610

Open
jrnanocore wants to merge 1 commit into
nanocoai:mainfrom
jrnanocore:fix/init-group-filesystem-on-create
Open

fix: call initGroupFilesystem after ncl groups create#2610
jrnanocore wants to merge 1 commit into
nanocoai:mainfrom
jrnanocore:fix/init-group-filesystem-on-create

Conversation

@jrnanocore
Copy link
Copy Markdown

Problem

ncl groups create inserts the agent_groups row but never calls initGroupFilesystem, so no container_configs row is created. When the host later tries to spawn a container for the new group, it fails with:

Container config not found for agent group: <id>

The host-sweep keeps retrying every 60 seconds but the container never starts.

Fix

Add an optional afterCreate hook to ResourceDef in crud.ts. Resources can use it to run post-insert side-effects without duplicating the generic create logic.

Wire it in the groups resource to call initGroupFilesystem, which:

  • Creates the group directory under groups/<folder>/
  • Creates CLAUDE.local.md
  • Inserts the container_configs row via ensureContainerConfig
  • Creates the .claude-shared/ directory and settings.json

Testing

  1. ncl groups create --name test --folder test
  2. Send a message to the new group
  3. Container spawns successfully (previously: would loop with "Container config not found")

🤖 Generated with Claude Code

`ncl groups create` inserted the `agent_groups` row but never called
`initGroupFilesystem`, so no `container_configs` row was created and the
container failed to spawn with "Container config not found".

Add an optional `afterCreate` hook to `ResourceDef` so resources can run
post-insert side-effects without duplicating the generic create logic.
Wire it in the groups resource to call `initGroupFilesystem`, which
creates the `container_configs` row and sets up the group filesystem.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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