Fix/tool failure log session prefix v2#111
Merged
dgarson merged 3 commits intodgarson/forkfrom Feb 24, 2026
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Describe the problem and fix in 2–5 bullets:
Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
List user-visible changes (including defaults/config).
If none, write
None.Security Impact (required)
Yes/No)Yes/No)Yes/No)Yes/No)Yes/No)Yes, explain risk + mitigation:Repro + Verification
Environment
Steps
Expected
Actual
Evidence
Attach at least one:
Human Verification (required)
What you personally verified (not just CI), and how:
Compatibility / Migration
Yes/No)Yes/No)Yes/No)Failure Recovery (if this breaks)
Risks and Mitigations
List only real risks for this PR. Add/remove entries as needed. If none, write
None.