Skip to content

feat: Add task management support and diagnostics endpoint#313

Merged
dlorenc merged 1 commit intodlorenc:mainfrom
aronchick:work/cool-koala
Jan 28, 2026
Merged

feat: Add task management support and diagnostics endpoint#313
dlorenc merged 1 commit intodlorenc:mainfrom
aronchick:work/cool-koala

Conversation

@aronchick
Copy link
Copy Markdown
Contributor

Summary

Port changes from aronchick#66 to add task management documentation and a machine-readable diagnostics endpoint.

  • Add docs/TASK_MANAGEMENT.md - comprehensive guide for Claude Code's task management tools
  • Add multiclaude diagnostics command - outputs JSON with system info, capabilities, tool versions
  • Add daemon startup diagnostics logging for monitoring
  • Update supervisor/worker prompts with task management guidance (adapted to new concise style)

Changes

File Description
docs/TASK_MANAGEMENT.md New documentation for TaskCreate/Update/List/Get usage
internal/diagnostics/collector.go New package for machine-readable diagnostics
internal/cli/cli.go Add diagnostics command
internal/daemon/daemon.go Log diagnostics on startup
internal/prompts/supervisor.md Add task management section
internal/templates/agent-templates/worker.md Add task management section

Test plan

  • go build ./... compiles successfully
  • multiclaude diagnostics outputs valid JSON with capabilities detection
  • Task management detection works (Claude 2.x+ → true)
  • Integration test with daemon startup logging

Example output

$ multiclaude diagnostics | jq '.capabilities'
{
  "task_management": true,
  "claude_installed": true,
  "tmux_installed": true,
  "git_installed": true
}

🤖 Generated with Claude Code

@aronchick aronchick marked this pull request as ready for review January 26, 2026 01:21
@aronchick
Copy link
Copy Markdown
Contributor Author

✅ APPROVED FOR MERGE

Merge Queue Evaluation: This PR is approved and ready for upstream maintainer to merge.

Status:

  • ✅ CI: All checks passing
  • ✅ Scope: Matches title - adds task management docs and diagnostics (614 additions, 6 files)
  • ✅ Roadmap: ✅ Supports P1 'Task history' roadmap item
  • ✅ Type: Feature - adds documentation and diagnostics tooling
  • ✅ Size: Moderate and focused (614 additions, 0 deletions, 6 files)
  • ✅ No reviews blocking

What it adds:

  • docs/TASK_MANAGEMENT.md - Guide for Claude Code's TaskCreate/Update/List/Get tools
  • multiclaude diagnostics command - JSON output with system capabilities
  • Task management guidance in supervisor/worker prompts
  • Diagnostics logging on daemon startup

Roadmap alignment: P1 item states "Task history: Track what workers have done and their outcomes" - this adds the task management foundation and documentation.

Upstream maintainer: This PR is ready to merge whenever you're ready.

@dlorenc dlorenc added the multiclaude PRs created by multiclaude workers label Jan 28, 2026
@dlorenc
Copy link
Copy Markdown
Owner

dlorenc commented Jan 28, 2026

Merge Conflicts

This PR now has merge conflicts with main after recent merges. The conflicts are likely in internal/cli/cli.go since several PRs that touched that file were just merged.

Please rebase onto main to resolve the conflicts:

git fetch upstream
git rebase upstream/main
# resolve conflicts
git push --force-with-lease

Once conflicts are resolved and CI passes, this will be ready to merge.

/cc @aronchick

@dlorenc dlorenc added the needs-human-input PR blocked on human decision label Jan 28, 2026
Port changes from #66:

- Add docs/TASK_MANAGEMENT.md with comprehensive guide for Claude Code's
  task management tools (TaskCreate/Update/List/Get)
- Add internal/diagnostics package for machine-readable system diagnostics
- Add 'multiclaude diagnostics' CLI command outputting JSON with:
  * Claude CLI version and capability detection
  * Task management support detection (v2.0+)
  * Environment variables (with sensitive value redaction)
  * System paths and tool versions
  * Daemon status and agent statistics
- Add daemon startup diagnostics logging for monitoring
- Update supervisor and worker prompts with task management guidance
  (adapted to new concise prompt style from dlorenc#302)

The diagnostics endpoint helps operators understand the multiclaude
environment, and task management enables agents to organize complex
multi-step work while maintaining the "focused PRs" principle.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@dlorenc dlorenc merged commit dfad1a5 into dlorenc:main Jan 28, 2026
6 checks passed
Copy link
Copy Markdown
Owner

@dlorenc dlorenc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Review: feat: Add task management support and diagnostics endpoint

Issues Found

1. Bug: Incorrect signal check for process detection (High)

In internal/diagnostics/collector.go:291:

err = process.Signal(os.Signal(nil))

This should use syscall.Signal(0) to match the canonical implementation in the codebase (see internal/daemon/pid.go:72). The os.Signal(nil) approach is semantically incorrect and may cause unreliable daemon status detection.

2. Hardcoded version in daemon (Medium)

In internal/daemon/daemon.go:151:

version := "dev"

This hardcodes "dev" instead of using the actual version. Consider passing version as a parameter to NewDaemon() or using debug.ReadBuildInfo() directly.

3. Missing unit tests (Medium)

The new internal/diagnostics/ package has no test file. The existing internal/bugreport/collector_test.go shows the expected pattern. Tests should cover:

  • Collect() with valid paths
  • detectTaskManagementSupport() version parsing
  • JSON output formatting

4. Potentially non-existent documentation URL (Low)

In docs/TASK_MANAGEMENT.md:167, the URL https://platform.claude.com/docs/en/agent-sdk/todo-tracking may not exist. Verify or remove.

What Looks Good

  • Documentation quality aligns with brownian ratchet philosophy
  • Proper redaction of sensitive environment variables
  • Clean JSON structure with well-designed types
  • Concise prompt updates matching style from #302

🤖 Review by Claude Code

aronchick added a commit to aronchick/multiclaude that referenced this pull request Jan 29, 2026
Port changes from #66:

- Add docs/TASK_MANAGEMENT.md with comprehensive guide for Claude Code's
  task management tools (TaskCreate/Update/List/Get)
- Add internal/diagnostics package for machine-readable system diagnostics
- Add 'multiclaude diagnostics' CLI command outputting JSON with:
  * Claude CLI version and capability detection
  * Task management support detection (v2.0+)
  * Environment variables (with sensitive value redaction)
  * System paths and tool versions
  * Daemon status and agent statistics
- Add daemon startup diagnostics logging for monitoring
- Update supervisor and worker prompts with task management guidance
  (adapted to new concise prompt style from dlorenc#302)

The diagnostics endpoint helps operators understand the multiclaude
environment, and task management enables agents to organize complex
multi-step work while maintaining the "focused PRs" principle.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

multiclaude PRs created by multiclaude workers needs-human-input PR blocked on human decision

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants