Skip to content

Add configurable parallel agent mode for cost-conscious users #68

Closed

Description

@admarble

Problem

Sub-agents provide faster execution through parallelization but consume more tokens. Not all users are on unlimited plans (Claude Max, Enterprise). Currently, skills like /qa may spawn parallel agents without user control.

Example from session:

  • /qa 7 50 spawned 2 parallel agents
  • Each agent independently fetched issues, read files, ran checks
  • ~2x token usage vs sequential execution
  • ~50% faster wall-clock time

Proposed Solution

1. Global Configuration

Add to .sequant/settings.json:

{
  "agents": {
    "parallel": false,       // Default: sequential (cost-optimized)
    "model": "haiku"         // Default model for sub-agents (cheapest)
  }
}

2. Per-Invocation Override

/qa 7 50              # Uses global setting
/qa 7 50 --parallel   # Force parallel (faster)
/qa 7 50 --sequential # Force sequential (cheaper)

3. Model Tier Selection

Task Type Recommended Model Rationale
Quality checks (lint, type) haiku Mechanical, low complexity
Code review sonnet Needs judgment
Complex analysis opus Requires deep reasoning

Acceptance Criteria

  • Add agents.parallel setting to .sequant/settings.json schema
  • Default to false (sequential) for cost optimization
  • Add --parallel / --sequential flags to multi-issue skills (/qa, /merger)
  • Document token usage trade-offs in README or docs
  • Skills respect global setting unless overridden

Affected Skills

  • /qa - Can review multiple issues
  • /merger - Can merge multiple issues
  • /fullsolve - Orchestrates multiple phases
  • Any skill using Task tool with multiple agents

Trade-off Documentation

Add to docs:

## Cost vs Speed Trade-offs

| Mode | Token Usage | Speed | Best For |
|------|-------------|-------|----------|
| Sequential | 1x (baseline) | Slower | Limited API plans, single issues |
| Parallel | ~2x per agent | ~50% faster | Unlimited plans, batch operations |

**Default:** Sequential (cost-optimized)
**Override:** `--parallel` flag or `agents.parallel: true` in settings

Priority

Medium - important for accessibility and cost management

Activity

  1. admarble commented on Jan 11, 2026

    @admarble
    ContributorAuthor

    Planning Complete - /spec Analysis

    Acceptance Criteria (Verified)

    AC Description Verification Test Scenario
    AC-1 Add agents.parallel to settings schema Unit Test Load settings with/without agents section
    AC-2 Default to false (sequential) Unit Test Verify default when section missing
    AC-3 Add --parallel/--sequential flags Integration Test Invoke skills with flags, verify agent spawn behavior
    AC-4 Document trade-offs Manual Review Check docs for cost/speed guidance
    AC-5 Skills respect global setting Integration Test Setting + flag override combinations

    Implementation Plan

    Phase 1: Settings Schema (~15 lines)

    • Add AgentsSettings interface to src/lib/settings.ts
    • Add DEFAULT_AGENTS_SETTINGS = { parallel: false }
    • Update merge logic in getSettings()

    Phase 2: Environment Bridge (~20 lines)

    • Add --parallel/--sequential flags to src/commands/run.ts
    • Set SEQUANT_AGENTS_PARALLEL env var for skills
    • Priority: CLI flag > env var > settings > default

    Phase 3: Skill Updates (documentation changes)

    • Update /qa, /spec, /exec SKILL.md files
    • Add conditional: check SEQUANT_AGENTS_PARALLEL before parallel spawn
    • If false, spawn agents sequentially

    Phase 4: Documentation

    • Add cost vs speed table to README
    • Document configuration options

    Key Decisions

    Decision Choice Rationale
    Default mode Sequential (false) Cost-optimized for non-unlimited plans
    Model selection Defer Current haiku default is already optimal
    Scope All agent-spawning skills Consistent behavior

    Assumptions Validated ✓

    • Settings merge handles nested objects (confirmed in getSettings())
    • Skills read orchestration env vars (confirmed in SKILL.md docs)
    • No in-flight work conflicts

    Recommended Workflow

    exec → qa
    

    Quality loop disabled - straightforward configuration change.


    🤖 Generated by /spec | Ready for /exec 68

  2. added
    enhancement
    planned
    on Jan 11, 2026
  3. added a commit that references this issue on Jan 11, 2026
  4. admarble commented on Jan 11, 2026

    @admarble
    ContributorAuthor

    /fullsolve Complete

    Issue: #68
    Status: READY_FOR_MERGE

    Summary

    • AC: 5/5 met
    • Tests: 314/314 passed
    • Build: ✅ Succeeded
    • QA: All checks passed

    AC Coverage

    AC Description Status
    AC-1 Add agents.parallel setting to schema ✅ MET
    AC-2 Default to false (sequential) ✅ MET
    AC-3 Add --parallel/--sequential flags to skills ✅ MET
    AC-4 Document token usage trade-offs ✅ MET
    AC-5 Skills respect global setting unless overridden ✅ MET

    Key Changes

    • Added AgentSettings interface with parallel and model options
    • Updated /qa, /merger, /fullsolve skills with execution mode logic
    • Added comprehensive documentation in README

    Quality Metrics

    Metric Value
    Type issues 0
    Deleted tests 0
    Files changed 5
    Lines added +165
    Lines deleted -3

    Iterations

    • Test loop: 0 (all passed first try)
    • QA loop: 0 (all checks passed first try)

    PR: #73


    Ready for human review and merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementplanned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions