Ensure 'main' alias is always stored as 'agent:main:main' to prevent
duplicate entries. Also update loadSessionEntry to check both forms
when looking up entries.
Fixes duplicate main sessions in session store.
The previous prompt was too permissive about skipping announcements.
Updated to strongly encourage announcing results since the requester
is waiting for a response.
- Add 'You MUST announce your result' instruction
- Clarify ANNOUNCE_SKIP is only for complete failures
- Improve guidance on providing useful summaries
The previous immediate probe (timeoutMs: 0) only caught already-completed
runs. Cross-process spawns need to actually wait via agent.wait RPC for
the gateway to signal completion, then trigger the announce flow.
- Rename probeImmediateCompletion to waitForSubagentCompletion
- Use 10 minute wait timeout for agent.wait RPC
- Remove leftover debug console.log statements
- Replace free functions with IncludeProcessor class
- Simplify IncludeResolver interface: { readFile, parseJson }
- Break down loadFile into focused private methods
- Use reduce() for array include merging
- Cleaner separation of concerns
- Move $include resolution to src/config/includes.ts
- Simplify io.ts by importing from includes module
- Cleaner API: resolveConfigIncludes(obj, configPath, resolver?)
- Re-export errors from io.ts for backwards compatibility
- Rename test file to match module name
Adds support for splitting clawdbot.json into multiple files using the
$include directive. This enables:
- Single file includes: { "$include": "./agents.json5" }
- Multiple file merging: { "$include": ["./a.json5", "./b.json5"] }
- Nested includes (up to 10 levels deep)
- Sibling key merging with includes
Features:
- Relative paths resolved from including file
- Absolute paths supported
- Circular include detection
- Clear error messages with resolved paths
Use case: Per-client agent configs for isolated sandboxed environments
(e.g., legal case management with strict data separation).