feat: Add task management support and diagnostics endpoint#313
feat: Add task management support and diagnostics endpoint#313dlorenc merged 1 commit intodlorenc:mainfrom
Conversation
✅ APPROVED FOR MERGEMerge Queue Evaluation: This PR is approved and ready for upstream maintainer to merge. Status:
What it adds:
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. |
Merge ConflictsThis PR now has merge conflicts with main after recent merges. The conflicts are likely in Please rebase onto main to resolve the conflicts: git fetch upstream
git rebase upstream/main
# resolve conflicts
git push --force-with-leaseOnce conflicts are resolved and CI passes, this will be ready to merge. /cc @aronchick |
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>
e13ab73 to
3681221
Compare
dlorenc
left a comment
There was a problem hiding this comment.
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 pathsdetectTaskManagementSupport()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
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>
Summary
Port changes from aronchick#66 to add task management documentation and a machine-readable diagnostics endpoint.
docs/TASK_MANAGEMENT.md- comprehensive guide for Claude Code's task management toolsmulticlaude diagnosticscommand - outputs JSON with system info, capabilities, tool versionsChanges
docs/TASK_MANAGEMENT.mdinternal/diagnostics/collector.gointernal/cli/cli.godiagnosticscommandinternal/daemon/daemon.gointernal/prompts/supervisor.mdinternal/templates/agent-templates/worker.mdTest plan
go build ./...compiles successfullymulticlaude diagnosticsoutputs valid JSON with capabilities detectionExample output
🤖 Generated with Claude Code