-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
component:typesTypeScript interfaces (src/types/)TypeScript interfaces (src/types/)effort:medium1-4 hours1-4 hoursenhancementNew feature or requestNew feature or requestperformancePerformance and efficiency improvementsPerformance and efficiency improvementspriority:mediumShould be addressedShould be addressedscope:hooksHook evaluation (Phase 2)Hook evaluation (Phase 2)sdk:agentClaude Agent SDK usage (Stage 3)Claude Agent SDK usage (Stage 3)stage:executionStage 3: Agent SDK execution with tool captureStage 3: Agent SDK execution with tool capturestatus:analyzedIssue has been analyzed by ClaudeIssue has been analyzed by Claude
Description
Parent Issue
Sub-issue of #344 (Leverage Additional SDK v0.2.25 Capabilities)
Feature Type
SDK integration (Agent SDK)
Problem or Need
Session timing currently relies on manual Date.now() calls (agent-executor.ts:226, session-batching.ts:703). This doesn't distinguish between session startup time (subprocess spawn + plugin load + MCP initialization) and actual execution time. This gap makes it harder to diagnose performance issues in session batching.
Proposed Solution
Implement SDK v0.2.25 SessionStart and SessionEnd hooks to track session lifecycle events.
Benefits:
- Accurate timing for session startup vs execution
- Better diagnostics for session batching performance
- Helps identify slow plugin/MCP initialization
Implementation approach:
- Add
SessionStartandSessionEndhook types tohooks-factory.ts - Follow existing
HookCallbackMatcherpattern - Capture timing data for diagnostics
- Useful for session batching metrics
Files Affected
src/stages/3-execution/hooks-factory.ts— New hook typessrc/stages/3-execution/sdk-client.ts— QueryOptions hooks, new input typessrc/types/transcript.ts— New capture types
Risk Assessment
Low risk — Purely observational hooks. No changes to execution behavior.
Priority Rationale
Medium value for diagnostics. Primarily useful for session batching metrics and debugging.
🤖 Created with Claude Code
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
component:typesTypeScript interfaces (src/types/)TypeScript interfaces (src/types/)effort:medium1-4 hours1-4 hoursenhancementNew feature or requestNew feature or requestperformancePerformance and efficiency improvementsPerformance and efficiency improvementspriority:mediumShould be addressedShould be addressedscope:hooksHook evaluation (Phase 2)Hook evaluation (Phase 2)sdk:agentClaude Agent SDK usage (Stage 3)Claude Agent SDK usage (Stage 3)stage:executionStage 3: Agent SDK execution with tool captureStage 3: Agent SDK execution with tool capturestatus:analyzedIssue has been analyzed by ClaudeIssue has been analyzed by Claude