Skip to content

Agent: include provider/model (and claude-sdk runtime) in embedded lifecycle logs#112

Merged
dgarson merged 1 commit intodgarson/forkfrom
codex/add-logging-for-model-and-runtime-details
Feb 23, 2026
Merged

Agent: include provider/model (and claude-sdk runtime) in embedded lifecycle logs#112
dgarson merged 1 commit intodgarson/forkfrom
codex/add-logging-for-model-and-runtime-details

Conversation

@dgarson
Copy link
Owner

@dgarson dgarson commented Feb 23, 2026

Motivation

  • Ensure embedded agent lifecycle debug logs always include the model and provider context so operator logs show what model/provider were used for a run, and log the runtime label when the runtime is claude-sdk.

Description

  • Add optional provider, model, and runtime fields to SubscribeEmbeddedPiSessionParams so subscribing handlers can access run context (src/agents/pi-embedded-subscribe.types.ts).
  • Update lifecycle handlers to append a formatted context string (provider, model, and runtime when runtime === "claude-sdk") to embedded run agent start and embedded run agent end debug logs (src/agents/pi-embedded-subscribe.handlers.lifecycle.ts).
  • Wire the embedded runner to pass provider, modelId, and a runtime label into subscribeEmbeddedPiSession so the lifecycle logger receives the values at run time (src/agents/pi-embedded-runner/run/attempt.ts).

Testing

  • Ran the repository format check pnpm -s check, which initially reported formatting issues; then fixed formatting with pnpm -s oxfmt --write and verified formatting with pnpm -s oxfmt --check, which succeeded.
  • Attempted to run the related e2e test with pnpm -s vitest run src/agents/pi-embedded-subscribe.lifecycle-billing-error.e2e.test.ts, but the repository Vitest config excludes *.e2e.test.ts files so that invocation did not execute (no test files found in the configured include patterns).

Codex Task

@dgarson dgarson changed the base branch from main to dgarson/fork February 23, 2026 19:25
@dgarson dgarson merged commit ddbfc71 into dgarson/fork Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant