🐛 [Bug]: Recrawl does not respect configured depth - increments depth by 1
Archon Version
latest
Bug Severity
🟡 Medium - Affects functionality
Bug Description
Recrawl does not respect configured depth - increments depth by 1
Description
When performing a recrawl operation on an existing crawl, the system is not respecting the originally configured depth setting. Instead, it appears to be incrementing the depth by 1.
Steps to Reproduce
- Create a crawl with Depth = 1
- Perform a recrawl operation on the same crawl
- Observe that the recrawl uses Depth = 2 instead of the configured Depth = 1
Expected Behavior
- Recrawl should use the same depth configuration as the original crawl
- If original crawl has Depth = 1, recrawl should also use Depth = 1
Actual Behavior
- Recrawl increments the depth by 1
- Original crawl Depth = 1 → Recrawl uses Depth = 2
Priority
Medium - Doesn't break functionality but causes unexpected behavior and potentially unnecessary resource usage
Questions to Investigate
- [ ] Does this happen consistently at all depth levels (2, 3, etc.)?
- [ ] Is the depth being incremented by exactly 1 each time, or is there another pattern?
- [ ] Does this affect all types of recrawls or only specific configurations?
Steps to Reproduce
see above
Expected Behavior
see above
Actual Behavior
see above
Error Details (if any)
Affected Component
🔍 Knowledge Base / RAG
Browser & OS
Chrome
Additional Context
No response
Service Status (check all that are working)
- [ ] 🖥️ Frontend UI (http://localhost:3737)
- [x] ⚙️ Main Server (http://localhost:8181)
- [ ] 🔗 MCP Service (localhost:8051)
- [ ] 🤖 Agents Service (http://localhost:8052)
- [ ] 💾 Supabase Database (connected)
Diagnosis
- The UI retry/recrawl flow was rebuilding the crawl request without guaranteeing the original `max_depth` was preserved. That caused recrawls to run using an incremented or default depth rather than the originally configured depth.
Fix
- Preserve the original crawl parameters when retrying and explicitly set `max_depth` from the saved `originalCrawlParams` so it isn't changed by the retry logic.
A fix, perhaps: archon-ui-main/src/pages/KnowledgeBasePage.tsx
Line 662: // Ensure we use the original max_depth exactly as configured const crawlParams = { ...progressItem.originalCrawlParams, max_depth: progressItem.originalCrawlParams.max_depth ?? 1, };
Thanks for this @miskaone!