Skip to content

feat(coding-agent): instrument active runtime - #95

Merged
Pepps233 merged 2 commits into
feat/harness-trace-foundationfrom
feat/runtime-telemetry-instrumentation
Aug 23, 2026
Merged

Pepps233 merged 2 commits into
feat/harness-trace-foundationfrom
feat/runtime-telemetry-instrumentation

Conversation

@Pepps233

@Pepps233 Pepps233 commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds optional in-memory telemetry across active agent and coding-agent execution, including provider requests, tools, retries, extension hooks, terminals, artifacts, and subagents.

Keeps telemetry disabled by default through the shared no-op context and does not add trace-file persistence or codecs.

Reasoning

Facts are emitted by the lowest-level runtime owner so ordering and outcomes reflect actual execution.

Stable invocation, request, operation, and child-agent identifiers plus explicit parent contexts preserve hierarchy without global mutable trace state.

Subagents inherit the exact activated harness snapshot from their parent.

Changes

  • Add typed schemas for agent runs, turns, provider requests, tools, session operations, retries, extension hooks, terminal work, artifacts, and subagent lifecycle.
  • Propagate optional telemetry contexts through Agent, AgentSession, SDK services, runtime replacements, extension dispatch, compaction, branch summaries, and child sessions.
  • Record safe outcomes and usage metadata without prompts, tool arguments, command text, response text, or artifact content.
  • Add focused in-memory tests for successful, failed, retried, compacted, aborted, and child-agent runs.

Testing

  • npm run check
  • node ../../node_modules/vitest/dist/cli.js --run test/agent.test.ts test/harness/telemetry.test.ts from packages/agent
  • node ../../node_modules/vitest/dist/cli.js --run test/suite/runtime-telemetry.test.ts test/extensions-runner.test.ts test/subagent-controller.test.ts test/suite/subagent-services.test.ts test/suite/agent-session-retry-events.test.ts test/suite/agent-session-compaction.test.ts test/suite/regressions/6647-compaction-retries-transient-stream-drop.test.ts from packages/coding-agent
  • node ../../node_modules/vitest/dist/cli.js --run test/suite/agent-session-runtime.test.ts from packages/coding-agent

- Emits nested run, turn, request, and tool facts from their low-level owners
- Preserves disabled-telemetry behavior through the shared no-op context
- Propagates telemetry and exact harness snapshots across sessions and child agents
- Records operations, retries, hooks, summaries, terminal work, artifacts, and subagent lifecycle facts
- Covers successful, failed, retried, compacted, aborted, and child-agent runs in memory
@Pepps233 Pepps233 self-assigned this Aug 19, 2026
@Pepps233
Pepps233 requested a review from Issacboy123 August 19, 2026 01:49
@Pepps233
Pepps233 marked this pull request as ready for review August 19, 2026 05:24
@Pepps233
Pepps233 merged commit 07cdfc3 into main Aug 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant