Skip to content

fix(analytics): add SDK 0.2.x Task tools to plan-activity classifier - #587

Open
bradbrok wants to merge 1 commit into
mainfrom
fix/task-tools-analytics-clean
Open

fix(analytics): add SDK 0.2.x Task tools to plan-activity classifier#587
bradbrok wants to merge 1 commit into
mainfrom
fix/task-tools-analytics-clean

Conversation

@bradbrok

Copy link
Copy Markdown
Owner

Summary

  • Adds TaskCreate, TaskUpdate, TaskGet, TaskList to AnalyticsStore._PLAN_TOOLS so turns from SDK 0.2.82 agents (which use Task tools instead of TodoWrite) continue to classify as "planning" activity.
  • TodoWrite is kept for backward-compatibility with historical analytics events already in the DB.

Why

SDK 0.2.82 (now pinned via #577) replaces TodoWrite with Task tools in headless/SDK sessions. Without this patch, any planning turn from an upgraded agent would fall through to "general" classification, causing the dashboard and burn analytics to misattribute planning work.

Test plan

  • Confirm _PLAN_TOOLS set contains all four Task tool names after merge
  • Smoke: send a turn containing a TaskCreate call through a dev agent and verify the analytics row shows category = "planning"

Generated by Claude Code

@bradbrok
bradbrok force-pushed the fix/task-tools-analytics-clean branch from fa7c95b to 0510b01 Compare May 28, 2026 14:13

Copy link
Copy Markdown
Owner Author

Heartbeat maintenance (2026-05-28): rebased onto current main (8978dfb — 11 commits since PR was opened on 4c3b919).

Rebased cleanly — no conflicts in analytics_store.py. Force-pushed to fix/task-tools-analytics-clean.

Tests: test_analytics_store.py — 15 passed. CI will run the full matrix now.

🤖 Heartbeat maintenance


Generated by Claude Code

@bradbrok
bradbrok force-pushed the fix/task-tools-analytics-clean branch from 0510b01 to 28174a1 Compare May 28, 2026 20:03

Copy link
Copy Markdown
Owner Author

Heartbeat maintenance (2026-05-28 ~18:30 UTC): rebased onto current main (52b00ac — Opus 4.8 registration). The Build (linux/arm64) failure on the previous run is unrelated to this 1-line Python change (no Docker layers touched); rebase triggers a fresh CI run to clear it.

🤖 Heartbeat maintenance


Generated by Claude Code

@bradbrok
bradbrok force-pushed the fix/task-tools-analytics-clean branch from 28174a1 to d2eb878 Compare May 30, 2026 04:03

Copy link
Copy Markdown
Owner Author

Heartbeat maintenance (2026-05-30): rebased onto current main (c98b9db — 6 commits since last rebase on 52b00ac, including isolated-tenant flag, per-agent signing keys, shared-SSE key binding, and context-nudge soft-watermark). Rebased cleanly — no conflicts in analytics_store.py. Force-pushed to fix/task-tools-analytics-clean.

🤖 Heartbeat maintenance


Generated by Claude Code

TaskCreate/TaskUpdate/TaskGet/TaskList replace TodoWrite in SDK 0.2.82
headless/SDK sessions. Add them to _PLAN_TOOLS so turns using the new
Task API continue to classify as "planning". TodoWrite kept for
backward-compatibility with historical analytics events.
@bradbrok
bradbrok force-pushed the fix/task-tools-analytics-clean branch from d2eb878 to f31cffa Compare May 31, 2026 14:10

Copy link
Copy Markdown
Owner Author

Heartbeat maintenance (2026-05-31): rebased onto current main (ec39201 — 9 commits since last rebase on c98b9db, including isolation_mode/provisioning seam, per-agent signing key fix, CommandRunner/UnixUserProvisioner, live token analytics, and ultracode effort tier). Rebased cleanly — no conflicts in analytics_store.py. Force-pushed to fix/task-tools-analytics-clean.

Tests: test_analytics_store.py — 15 passed. CI will run the full matrix now.

🤖 Heartbeat maintenance


Generated by Claude Code

bradbrok commented Jun 4, 2026

Copy link
Copy Markdown
Owner Author

Heartbeat maintenance (2026-06-04): main has moved 4 commits since last rebase on ec39201 — PRs #671#674 (security: API auth hardening, path-traversal containment, SQLite owner-only perms, self-update target verification). None of these touch analytics_store.py, so mergeable_state remains clean — GitHub can merge without a rebase if approved.

Tests: test_analytics_store.py — 15 passed. test_stop_failure_hook.py — 22 passed (both from local suite on current main).

Force-push from this environment is blocked (proxy 403), so no rebase commit here.

🤖 Heartbeat maintenance


Generated by Claude Code

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants