Skip to content

Fix/tool failure log session prefix v2#111

Merged
dgarson merged 3 commits intodgarson/forkfrom
fix/tool-failure-log-session-prefix-v2
Feb 24, 2026
Merged

Fix/tool failure log session prefix v2#111
dgarson merged 3 commits intodgarson/forkfrom
fix/tool-failure-log-session-prefix-v2

Conversation

@dgarson
Copy link
Owner

@dgarson dgarson commented Feb 23, 2026

Summary

Describe the problem and fix in 2–5 bullets:

  • Problem:
  • Why it matters:
  • What changed:
  • What did NOT change (scope boundary):

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

  • Closes #
  • Related #

User-visible / Behavior Changes

List user-visible changes (including defaults/config).
If none, write None.

Security Impact (required)

  • New permissions/capabilities? (Yes/No)
  • Secrets/tokens handling changed? (Yes/No)
  • New/changed network calls? (Yes/No)
  • Command/tool execution surface changed? (Yes/No)
  • Data access scope changed? (Yes/No)
  • If any Yes, explain risk + mitigation:

Repro + Verification

Environment

  • OS:
  • Runtime/container:
  • Model/provider:
  • Integration/channel (if any):
  • Relevant config (redacted):

Steps

Expected

Actual

Evidence

Attach at least one:

  • Failing test/log before + passing after
  • Trace/log snippets
  • Screenshot/recording
  • Perf numbers (if relevant)

Human Verification (required)

What you personally verified (not just CI), and how:

  • Verified scenarios:
  • Edge cases checked:
  • What you did not verify:

Compatibility / Migration

  • Backward compatible? (Yes/No)
  • Config/env changes? (Yes/No)
  • Migration needed? (Yes/No)
  • If yes, exact upgrade steps:

Failure Recovery (if this breaks)

  • How to disable/revert this change quickly:
  • Files/config to restore:
  • Known bad symptoms reviewers should watch for:

Risks and Mitigations

List only real risks for this PR. Add/remove entries as needed. If none, write None.

  • Risk:
    • Mitigation:

dgarson and others added 3 commits February 23, 2026 10:51
All tool execution failure log lines now include [sessionKey] prefix
for easier per-session filtering in logs.

- pi-tool-definition-adapter: thread sessionKey through splitSdkTools
  -> toToolDefinitions; prefix [tools] <name> failed, stack trace,
  and after_tool_call hook failure logs
- tool-split: splitSdkTools now accepts and forwards sessionKey
- attempt.ts / compact.ts: pass params.sessionKey to splitSdkTools
- pi-embedded-subscribe.handlers: prefix tool_execution_start/end
  handler failed logs with ctx.params.sessionKey
- pi-embedded-subscribe.handlers.types: add sessionKey to
  ToolHandlerParams pick so it is available in ToolHandlerContext
- pi-embedded-subscribe.handlers.tools: prefix after_tool_call hook
  failed with ctx.params.sessionKey
- pi-tools.before-tool-call: prefix tool loop outcome tracking and
  before_tool_call hook failed with args.ctx?.sessionKey
- plugins/tools: prefix plugin tool failed with
  params.context.sessionKey
Resolves conflicts between fix/tool-failure-log-session-prefix-v2 and
origin/dgarson/fork:

- tool-split.ts: pass sessionKey as { sessionKey } object to match the
  fork's ToolCompatibilityOptions signature
- pi-tool-definition-adapter.ts: keep fork's ToolCompatibilityOptions
  param, buildRepairFailureResult, toRecord, toolCallId deduplication,
  and tool-call validation; restore HEAD's sessionPrefix derived from
  compatibility?.sessionKey so all failure log lines retain the
  [sessionKey] prefix introduced by this branch

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Stages and commits the full body of working-tree changes that were
present but uncommitted in this branch: source files, docs, extensions,
iOS/macOS app updates, new Swift exec-approval files, icon asset
refresh, agent-runtime review docs, new web-next prototype views,
updated apps/web pages and components, coverage tests, UI changes,
and vitest/build config updates.

Also adds apps/web-next/ and apps/web/src/ui-refs/ to .oxlintrc.json
ignorePatterns (prototype/reference code) and fixes no-unused-vars
lint errors in production apps/web/ files to pass pre-commit checks.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@dgarson dgarson merged commit 88fb71a into dgarson/fork Feb 24, 2026
1 of 3 checks passed
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.

1 participant