con un clic
research
// Run a Parallax multi-agent research session. Handles pre-checks, builds the binary, and executes the research with sensible defaults.
// Run a Parallax multi-agent research session. Handles pre-checks, builds the binary, and executes the research with sensible defaults.
| name | research |
| description | Run a Parallax multi-agent research session. Handles pre-checks, builds the binary, and executes the research with sensible defaults. |
You are launching a Parallax multi-agent research session. The user's request is: $ARGUMENTS
Run ALL of these checks before proceeding. If any fail, stop and tell the user how to fix it.
Check that these are set (or configured in ~/.config/parallax/config.toml):
echo "S2_ACCESS_TOKEN: ${S2_ACCESS_TOKEN:+SET}"
echo "PARALLAX_BASIN: ${PARALLAX_BASIN:+SET}"
echo "PARALLAX_MODEL: ${PARALLAX_MODEL:+SET}"
S2_ACCESS_TOKEN - REQUIRED. Without this, Parallax cannot connect to S2 streams.PARALLAX_BASIN - REQUIRED (unless --basin is passed). The S2 basin for storing research streams.PARALLAX_MODEL - Optional model override for local Claude backend.claude and/or codex) must be installed for whichever planner/agent backend the run uses.If any are missing, tell the user:
Missing: S2_ACCESS_TOKEN
Set it with: export S2_ACCESS_TOKEN="your-token"
Or add to ~/.config/parallax/config.toml under [s2] access_token = "..."
ls -la ./target/release/parallax 2>/dev/null
If the binary doesn't exist or is older than any src/*.rs file, rebuild:
cargo build --release 2>&1
If the build fails, show the errors and stop.
# Make sure no existing parallax research processes are running
pgrep -af "parallax research" || true
If there are existing parallax research processes, WARN the user:
There's already a parallax research process running (PID XXXX). Running another one simultaneously can spawn many agent processes and may be expensive. Kill it first with
kill <pid>or wait for it to finish.
From the user's $ARGUMENTS, determine:
If the user only provided a bare question with no flags, use sensible defaults and ASK if they want to customize anything before launching.
Before launching, calculate and display estimates:
| Parameter | Value | Estimated Impact |
|---|---|---|
| Groups | N | N streams created |
| Agents/group | M | N*M total agent processes |
| Max messages | X | Up to NMX total model turns |
| Timeout | T min | Hard stop after T minutes |
Run the research in the background so the user can continue working:
./target/release/parallax research \
"<question>" \
[--hint "<hint>"] \
-g <groups> \
-n <agents_per_group> \
--max-messages <max_messages> \
[--max-dynamic-streams <N>] \
--max-phase-transitions <max_phase_transitions> \
[--timeout <timeout_minutes>] \
[--agent <claude|codex>] \
[--planner-agent <claude|codex>] \
[--model <model>] \
2>&1
Run this as a background task and periodically check on progress by tailing the output.
When the research completes:
━━━━ separator lines.md file in the project root. Name it based on the topic (kebab-case, e.g., kubernetes-migration-analysis.md)/research "What are the best practices for Rust error handling?" --groups 3 --agents 2 --timeout 10
/research "Compare Kafka vs S2 vs Redpanda for event streaming" --hint "Create pro/con groups for each technology plus a neutral evaluation group" --groups 6 --agents 3 --timeout 30
/research "Traditional cooking techniques by continent" --hint "Create pairs of groups per continent: research (claude) + fact-check (codex)" --groups 12 --agents 2 --timeout 30
| Error | Cause | Fix |
|---|---|---|
Planner error: No valid JSON found | Strategy too complex for token limit | Reduce groups or simplify hint |
S2 connection failed | Missing/invalid S2_ACCESS_TOKEN | Check token: echo $S2_ACCESS_TOKEN |
Basin not found | Basin doesn't exist | Run parallax init <basin-name> first |
Failed to run claude | Claude CLI not installed/in PATH | Install Claude Code CLI: npm install -g @anthropic-ai/claude-code |
| Process hangs with no output | Local planner CLI is slow or waiting on auth | Run claude or codex directly and verify it's authenticated; retry with --planner-agent |
Codex CLI not found | Hint requested codex agents but codex isn't installed | Install codex or remove codex agent references from hint |
claude CLI process with tool access.claude by default, switch with --planner-agent codex).--timeout flag is a wall-clock safety net - always set one to prevent runaway sessionsparallax watch to see events.Ctrl+C, terminate/quit/stop signals) trigger coordinated cleanup of spawned agent process groups.