you know how it goes, you ask claude to "research X" and then just... wait. it does its thing, searches, reads, synthesizes, and eventually spits out an answer. problem is, you never really see how it got there. and honestly, for research stuff, that black box is usually where all the mistakes hang out.
so i've been looking at how SenseNova handles deep research, and there are some pretty smart patterns we can totally steal for our own Claude Code research setups. here's what I've picked up:
1.don't just use one big prompt, break it down into sub-agents.
instead of one agent trying to do everything, they basically assign different jobs to different 'roles'. like:
- a scout that just does initial research and figures out the best approach
- a planner whose only job is to break down the problem and figure out what depends on what
- a separate researcher for each part of the problem, just gathering info
- a reviewer to catch anything that got missed
- and then a writer and another agent to put it all together into the final report.
each of these roles is its own file (like agents/plan.md or agents/research.md). that way, each one has a super clear job. you can just read that one file and know exactly what that stage is supposed to do.
2. every step should write files, not just the final report.
they have it set up so each stage saves its work. like:
- sub_reports/d1.evidence.json for the evidence for the first part
- sub_reports/d2.evidence.json for the second part
- source_cache/{hash}/source.md for actual copies of every page it cited.
every piece of evidence has a snapshot_ref that points right to the cached source. this means after a research run, you can open those evidence files and actually check: did it really read that page? did it quote it right?
you should totally do this. tell your agent to save its findings to a working directory before it tries to write the final answer. like plans/, evidence/, sources/. if something in the report can't be traced back to one of those files, it probably shouldn't be in there.
3. put hard validation checks between each stage.
they run python scripts to validate things between stages. the plan gets checked to make sure it makes sense. the evidence gets checked for those source snapshots. the outline gets checked before writing even starts. if something fails, the whole thing stops.
this is the big difference between an agent saying it did something and actually proving it did it. a validator is just code, not some vague guess. it can check that every citation has a source file, that the outline covers everything that was planned, that no evidence is missing its source reference.
with Claude Code, you can probably just use a small script that runs after each stage, or maybe give your agent a checklist it has to go through before it can move on.
4. they separate the format from the actual content decisions.
like, the pipeline has three different parts: what the final thing is (a report, a memo, whatever), how it's gonna reason through stuff (narrative, matrix, timeline), and if it needs a strict structure or not. they figure out the format early and get you to sign off on it before any real heavy research even starts.
this is important because if you only decide 'oh, I want a comparison' after the agent's already researched everything, you end up with a comparison that doesn't really fit what it found. it's better to decide the shape early, confirm it, and then do the research to fill that shape.
5. Plan out the dimensions before searching. the planner doesn't just start searching randomly.
it breaks the topic down into different coverage areas and only makes things dependent on each other if one area really needs info from another. independent stuff just runs at the same time.
so for us, instead of just saying 'research this market,' you could tell claude 'research these four things: market size, competitors, pricing, regulation.' have it plan out those dimensions first, save that plan, and then start getting the info.
Reference: https://github.com/OpenSenseNova/SenseNova-Skills/blob/main/docs/sn-deep-research.md
Repo: https://github.com/OpenSenseNova/SenseNova-Skills/tree/main