Skip to content

feat: Claude Code Tasks integration for cross-session coordination #8

@ArvorCo

Description

@ArvorCo

Context

Anthropic just announced Claude Code's upgrade from Todos to Tasks - a new primitive for tracking work across sessions and subagents.

Key capabilities:

  • File-based persistence: Tasks stored in ~/.claude/tasks
  • Cross-session sharing: Multiple Claude instances share via CLAUDE_CODE_TASK_LIST_ID env var
  • Dependencies: Tasks can depend on each other
  • Works with claude -p: The flag Relentless already uses!

The Problem We're Solving

When Claude runs long features in a single session, context compacting kicks in and Claude loses track of:

  • Earlier decisions and why they were made
  • The overall plan structure
  • Dependencies between tasks

Relentless already solves this by running each story in a fresh session with focused context extraction - only the relevant portions of spec/plan/tasks.

With Tasks integration, we can bridge both worlds.

Proposed Features

1. Bidirectional Sync (Tasks ↔ PRD)

PRD → Tasks: Convert user stories to Claude Tasks

relentless run --feature auth --tasks
# Sets CLAUDE_CODE_TASK_LIST_ID=relentless-auth
# Claude sees and updates shared task list

Tasks → PRD: Import Claude's natural planning

# User plans with Claude naturally
CLAUDE_CODE_TASK_LIST_ID=my-feature claude
> 'Help me plan adding auth to this app'
> Claude creates tasks with dependencies

# Convert to PRD for structured execution
relentless tasks import my-feature
# Creates features/my-feature/prd.json

# Run with Relentless (focused context, no compacting!)
relentless run --feature my-feature

2. Parallel Story Execution

Run independent stories simultaneously:

relentless run --feature auth --parallel 3

All instances share the same TaskList for coordination.

3. relentless tasks Command

  • relentless tasks list -f <feature> - Show tasks
  • relentless tasks sync -f <feature> - Sync PRD ↔ Tasks
  • relentless tasks import <id> - Import Claude Tasks to PRD
  • relentless tasks clear -f <feature> - Clear TaskList

The Context Challenge

When running multiple sessions, what context do we pass?

  • Too much → Claude compacts and loses details
  • Too little → Claude lacks understanding

Our approach:

  1. Parse ~/.claude/tasks/ to understand task structure
  2. Convert to prd.json with dependencies preserved
  3. Relentless extracts only relevant context per story (already implemented!)
  4. Each Claude invocation gets focused context, not the whole plan

Implementation Plan

  1. Test spike: Understand ~/.claude/tasks/ file format
  2. Add env var: Pass CLAUDE_CODE_TASK_LIST_ID to Claude adapter
  3. Tasks module: Read/write/sync task files programmatically
  4. Import command: Convert Tasks → PRD format
  5. Parallel runner: Execute independent stories simultaneously

Research Questions

  • What's the file format in ~/.claude/tasks/?
  • Can we read/write these files programmatically?
  • How do dependencies work in Claude Tasks?
  • Does context compacting affect task visibility?

Building in the open with the Claude Code ecosystem

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions