Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/tools/scanAgents/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ const ScanAgentsSchema = z.object({
*/
export async function scanAgentsImpl(input, options) {
const targetPath = input.path || getProjectCwd() || config.cwd || process.cwd();
const resolved = validatePath(targetPath, options.allowedPaths);
// The orchestrator invokes the raw singleton without runtime options, so
// options.allowedPaths is undefined there. Fall back to the live config's
// sandbox allowlist — loadConfig() is cached, so this reflects app mutations.
const allowedPaths = options.allowedPaths || loadConfig().sandbox?.paths || [];
const resolved = validatePath(targetPath, allowedPaths);
if (!resolved.allowed) {
return { ok: false, error: resolved.error };
}
Expand Down
Loading