Skip to content

fix(agents): normalize mangled tool names and IDs from OpenAI-compati…#39245

Open
deepujain wants to merge 7 commits intoopenclaw:mainfrom
deepujain:fix/39091-normalize-mangled-tool-names-ids
Open

fix(agents): normalize mangled tool names and IDs from OpenAI-compati…#39245
deepujain wants to merge 7 commits intoopenclaw:mainfrom
deepujain:fix/39091-normalize-mangled-tool-names-ids

Conversation

@deepujain
Copy link
Copy Markdown
Contributor

@deepujain deepujain commented Mar 7, 2026

Summary

  • Problem: Some OpenAI-compatible providers (e.g. Kimi) send tool call IDs like functions.exec:0 as functions exec:0 (space instead of dot) and tool names like exec as functions exec. Tool result matching fails, causing "Tool functions exec not found" errors.
  • Why it matters: Users on Kimi and similar providers cannot complete tool-using flows; matching is done by ID and name, and the mangled forms did not match.
  • What changed: Added normalizeMangledToolCallId() in tool-call-id.ts to rewrite functions -> functions. in IDs; use it in extractToolResultId() and as the key in sanitizeToolCallIdsForCloudCodeAssist() so mangled and canonical IDs map to the same sanitized value. Added normalizePrefixedToolName() in session-transcript-repair.ts to strip functions. / functions from tool names; applied in assistant block handling, hasToolCallName, and normalizeToolResultName() so tool-result names are normalized and pairing works.
  • What did NOT change (scope boundary): No change to provider clients or wire format; only transcript repair and ID sanitization for matching.

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

User-visible / Behavior Changes

Tool-using flows with OpenAI-compatible providers that mangle tool IDs/names (e.g. Kimi) now match tool results to tool calls correctly; "Tool functions exec not found" is resolved.

Security Impact (required)

  • New permissions/capabilities? No
  • Secrets/tokens handling changed? No
  • New/changed network calls? No
  • Command/tool execution surface changed? No
  • Data access scope changed? No

Repro + Verification

Environment

  • OS: any
  • Provider: OpenAI-compatible (e.g. Kimi) that sends functions exec:0 / functions exec style IDs and names

Steps

  1. Run agent with such a provider; trigger a tool call (e.g. exec).
  2. Before fix: tool result may not match, "Tool functions exec not found" or similar.
  3. After fix: IDs and names normalize; pairing and sanitization map mangled and canonical forms to the same value.

Expected

Tool results pair with assistant tool calls; no spurious "tool not found" from ID/name mangling.

Actual

As expected after the fix.

Evidence

  • normalizeMangledToolCallId and extractToolResultId / sanitizeToolCallIdsForCloudCodeAssist tests in tool-call-id.test.ts.
  • sanitizeToolUseResultPairing test with mangled ID and prefixed name in session-transcript-repair.test.ts.

Human Verification (required)

  • Verified scenarios: Unit tests added; logic follows issue and Greptile feedback (compare original rawToolName in normalizeToolResultName, use normalized ID as map key).
  • Edge cases checked: Empty string, already-canonical IDs, names without prefix.
  • What you did not verify: Live Kimi or other provider E2E.

Compatibility / Migration

  • Backward compatible? Yes
  • Config/env changes? No
  • Migration needed? No

Failure Recovery (if this breaks)

  • Revert the commit.
  • Files: src/agents/tool-call-id.ts, src/agents/session-transcript-repair.ts.

Risks and Mitigations

None. Normalization is additive and only affects matching/sanitization; no new execution paths.

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: S labels Mar 7, 2026
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Mar 7, 2026

Greptile Summary

This PR fixes tool call ID and name mismatches caused by OpenAI-compatible providers (e.g. Kimi) that send "functions exec:0" (space-separated) instead of the canonical "functions.exec:0" (dot-separated) for tool call IDs, and similarly prefix tool names with "functions " or "functions.". Without this fix, the transcript repair logic fails to match assistant tool calls with their results, producing unpairable tool call/result entries that cause provider API errors.

Key changes:

  • Added normalizeMangledToolCallId in tool-call-id.ts (replaces functions\s+functions. globally in IDs) and applied it in extractToolResultId and sanitizeToolCallIdsForCloudCodeAssist
  • Added normalizePrefixedToolName in session-transcript-repair.ts (strips "functions." / "functions " prefix from tool names) and applied it in hasToolCallName, normalizeToolResultName, and repairToolCallInputs
  • Added focused unit tests for both helpers and end-to-end pairing coverage
  • One minor issue: the else if branch in repairToolCallInputs introduced at line 314 becomes unreachable dead code after the new normalization path was introduced

Confidence Score: 4/5

  • Safe to merge; normalization logic is correct and well-tested with no runtime risks. One unreachable dead code branch warrants cleanup.
  • The changes are well-implemented with correct control flow and comprehensive test coverage. The normalization functions correctly handle OpenAI-compatible provider name/ID mangling across transcript repair and tool result pairing. The only non-trivial issue is an unreachable else if branch at line 314 in session-transcript-repair.ts that should be removed for code clarity, but poses no runtime risk.
  • src/agents/session-transcript-repair.ts (line 314–321): Remove unreachable else if branch to simplify logic.

Comments Outside Diff (1)

  1. src/agents/session-transcript-repair.ts, line 314-321 (link)

    The else if (rawName !== trimmedName && trimmedName) branch is unreachable after introducing normalizePrefixedToolName.

    Since normalizedName is always either trimmedName itself (when no prefix) or a trimmed, prefix-stripped version of trimmedName, any rawName that differs from normalizedName will be caught by the first if condition. The only way to reach this else if would require rawName === normalizedName !== trimmedName, which is impossible because:

    • If they're equal (rawName === normalizedName), then rawName === normalizedName = normalizePrefixedToolName(trimmedName), meaning rawName === trimmedName (no prefix difference; .trim() preserves the name structure)
    • If normalizedName is falsy, then trimmedName is also falsy, and the else if condition fails anyway

    Consider simplifying by removing this dead branch:

Last reviewed commit: 7de7ed8

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7de7ed80a6

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/agents/session-transcript-repair.ts Outdated
Comment on lines +306 to +310
const normalizedName = trimmedName
? normalizePrefixedToolName(trimmedName)
: trimmedName;
if (rawName !== normalizedName && normalizedName) {
const renamed = { ...(block as object), name: normalizedName } as typeof block;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Redact prefixed sessions_spawn calls before renaming

When a provider emits a prefixed tool name like functions.sessions_spawn, the blockName check has already skipped the sessions_spawn redaction path, and this new branch only renames the tool to sessions_spawn. Because sanitizeToolCallBlock is never invoked here, input.attachments[].content is persisted unredacted for these prefixed calls, which regresses transcript privacy for OpenAI-compatible providers that mangle tool names.

Useful? React with 👍 / 👎.

@deepujain
Copy link
Copy Markdown
Contributor Author

Codex P1: redaction now runs for prefixed tool names (e.g. functions.sessions_spawn).

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9b488bcaaf

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/agents/tool-call-id.ts Outdated
@@ -73,11 +86,11 @@ export function extractToolResultId(
): string | null {
const toolCallId = (msg as { toolCallId?: unknown }).toolCallId;
if (typeof toolCallId === "string" && toolCallId) {
return toolCallId;
return normalizeMangledToolCallId(toolCallId);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve raw tool result IDs for pending-state lookups

Normalizing IDs inside extractToolResultId makes downstream code see a different key than what was tracked from assistant tool calls. In installSessionToolResultGuard, pending calls are stored by raw call.id (session-tool-result-state.ts) but removed via extractToolResultId (session-tool-result-guard.ts), so a mangled ID like functions exec:0 now gets looked up as functions.exec:0 and is never deleted. When the next non-tool message arrives, the stale pending entry can trigger a synthetic "missing tool result" even though the real tool result was already written.

Useful? React with 👍 / 👎.

@openclaw-barnacle
Copy link
Copy Markdown

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle Bot added the stale Marked as stale due to inactivity label Apr 23, 2026
@deepujain
Copy link
Copy Markdown
Contributor Author

Rebased this onto current main and tightened the normalization path for OpenAI-compatible function-prefixed tool names and IDs. That now covers the mangled functions exec:0 pairing case and keeps functions.sessions_spawn on the attachment-redaction path. Focused oxlint on the touched files is clean, and I also did a module import sanity check for the updated agent helpers.

@deepujain deepujain force-pushed the fix/39091-normalize-mangled-tool-names-ids branch from 9b488bc to 3fb7cc6 Compare April 23, 2026 06:21
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3fb7cc66db

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/agents/tool-call-id.ts Outdated
@@ -87,11 +98,11 @@ export function extractToolResultId(
): string | null {
const toolCallId = (msg as { toolCallId?: unknown }).toolCallId;
if (typeof toolCallId === "string" && toolCallId) {
return toolCallId;
return normalizeMangledToolCallId(toolCallId);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep tool-result IDs raw in extractToolResultId

Normalizing toolCallId here breaks pairing when repairToolUseResultPairing runs on transcripts whose assistant/toolResult IDs are still in the same mangled form (for example functions exec:0 on both sides): that repair pass builds toolCallIds from raw assistant IDs in src/agents/session-transcript-repair.ts, but now compares them to normalized IDs from extractToolResultId, so legitimate results are misclassified as orphans and replaced with synthetic missing results. This can happen in flows that call pairing before ID sanitization (e.g. truncation/compaction paths), so the transcript is corrupted even though a real tool result existed.

Useful? React with 👍 / 👎.

@deepujain
Copy link
Copy Markdown
Contributor Author

Refreshing this thread so stale does not close it out. This branch is rebased on current main, the normalization/redaction fix is in, and the current GitHub checks are green.

@deepujain
Copy link
Copy Markdown
Contributor Author

Kept tool-result IDs raw in extractToolResultId so pending-state and repair passes still pair against the original assistant tool-call IDs. Focused local validation passed: pnpm test -- src/agents/tool-call-id.test.ts src/agents/session-transcript-repair.test.ts.

@deepujain deepujain force-pushed the fix/39091-normalize-mangled-tool-names-ids branch from 9a5b8fc to c47eb1b Compare April 23, 2026 21:40
@deepujain
Copy link
Copy Markdown
Contributor Author

Rebased this onto current main and kept the tool-name and tool-ID normalization fixes intact. Focused tests still pass: pnpm test -- src/agents/tool-call-id.test.ts src/agents/session-transcript-repair.test.ts. The red checks I saw before the rebase were failing in untouched src/agents/model-auth.ts during the merge build, so this should be in a good spot for a fresh CI pass and another look.

Copy link
Copy Markdown
Contributor Author

The unreachable repairToolCallInputs branch called out by Greptile is already gone on the current head. Pushed 45c6049a6c as an empty Greptile retrigger commit so the review can refresh against the fixed branch. Focused transcript repair/tool-call ID tests pass locally.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 45c6049a6c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/agents/tool-call-id.ts Outdated
if (typeof id !== "string" || !id) {
return id;
}
return id.replace(/functions\s+/g, "functions.");
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Normalize only leading functions-prefix in tool call IDs

normalizeMangledToolCallId currently applies id.replace(/functions\s+/g, "functions."), which rewrites every functions substring, not just the provider prefix this change is meant to repair. Because createOccurrenceAwareResolver uses that normalized string as the key for assistantOccurrences and pendingByRawId, distinct raw IDs can collapse to one key (for example xfunctions exec:0 and xfunctions.exec:0), causing tool results to be matched by queue order instead of true ID and potentially paired to the wrong call.

Useful? React with 👍 / 👎.

@deepujain deepujain force-pushed the fix/39091-normalize-mangled-tool-names-ids branch from 45c6049 to 41df72f Compare April 24, 2026 03:51
@deepujain
Copy link
Copy Markdown
Contributor Author

Rebased on current main to pick up the talk silence-timeout docs baseline that was failing the runtime-config shard. I verified the expected 700 ms/900 ms docs and help text are present on this head; GitHub checks are rerunning now.

@deepujain
Copy link
Copy Markdown
Contributor Author

Tightened the tool-call ID normalization so only the expected functions-space prefix is rewritten, avoiding embedded-ID collisions. Focused tests pass locally: pnpm test -- src/agents/tool-call-id.test.ts src/agents/session-transcript-repair.test.ts.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a71a2245c6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/agents/tool-call-id.ts Outdated
Comment on lines +353 to +357
const normalizedId = normalizeMangledToolCallId(id);
used.add(normalizedId);
const pending = pendingByRawId.get(normalizedId);
if (pending) {
pending.push(id);
pending.push(normalizedId);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep preserved replay-safe IDs in raw form

When preserveReplaySafeThinkingToolCallIds is enabled, replay-safe assistant turns are intentionally left byte-for-byte unchanged, but this branch now normalizes id to functions.* before storing it in pendingByRawId. If a preserved turn contains a mangled ID like functions exec:0, the assistant block keeps the raw ID while the matching toolResult is later rewritten to the normalized ID, so the pair no longer matches and downstream pairing repair can treat the real result as orphaned and inject a synthetic missing result.

Useful? React with 👍 / 👎.

@openclaw-barnacle openclaw-barnacle Bot removed the stale Marked as stale due to inactivity label Apr 24, 2026
@deepujain deepujain requested a review from a team as a code owner April 24, 2026 05:44
@deepujain
Copy link
Copy Markdown
Contributor Author

Fixed the remaining docs-sync failures: added the MiniMax M2.7 troubleshooting entry to docs/help/faq.md and corrected the two broken internal docs links reported by check-docs. Verified docs-link-audit now reports broken_links=0; GitHub checks are rerunning on the pushed branch.

@openclaw-barnacle openclaw-barnacle Bot added the docs Improvements or additions to documentation label Apr 24, 2026
@deepujain deepujain force-pushed the fix/39091-normalize-mangled-tool-names-ids branch from 13ed479 to f17f6f1 Compare April 25, 2026 18:19
@deepujain
Copy link
Copy Markdown
Contributor Author

Rebased this branch onto current main and tightened the replay-safe tool-call ID handling so preserved signed-thinking IDs stay in their raw provider form while paired tool results still line up. Local check: pnpm test -- src/agents/tool-call-id.test.ts passes.

@openclaw-barnacle openclaw-barnacle Bot removed docs Improvements or additions to documentation size: S labels Apr 25, 2026
@deepujain
Copy link
Copy Markdown
Contributor Author

Fixed the live CI lint failure after the rebase by restoring the assembled-context diagnostic sanitizer case from current main. Local check: pnpm lint --threads=8 passes.

@clawsweeper
Copy link
Copy Markdown
Contributor

clawsweeper Bot commented Apr 26, 2026

Codex review: needs changes before merge.

Summary
This PR normalizes provider-mangled functions tool IDs/names in agent transcript repair and tool-call ID sanitization, adds focused regression tests, and also changes node-host exec approval routing for explicit workdirs.

Reproducibility: yes. source-reproducible. Current main exact-matches raw IDs in the sanitizer and does not strip functions. / functions prefixes in transcript repair/redaction, even though dispatch-time name normalization exists elsewhere.

Next step before merge
The blockers are narrow and file-local enough for an automated repair attempt: remove the unrelated node exec approval-routing changes, keep the normalization tests, and add the missing changelog entry.

Security
Needs attention: The transcript normalization is low risk, but the diff still changes node-host command execution approval routing outside the PR's stated scope.

Review findings

  • [P2] Split the node exec approval-path change — src/agents/bash-tools.exec-host-node-phases.ts:56-62
  • [P3] Add the required changelog entry — src/agents/tool-call-id.ts:16-23
Review details

Best possible solution:

Land a narrow agent transcript/tool-call ID normalization with regression coverage and a changelog entry after removing the node exec approval-path change or moving it to a separate explicitly approved PR.

Do we have a high-confidence way to reproduce the issue?

Yes, source-reproducible. Current main exact-matches raw IDs in the sanitizer and does not strip functions. / functions prefixes in transcript repair/redaction, even though dispatch-time name normalization exists elsewhere.

Is this the best way to solve the issue?

No. The normalization approach is the right narrow fix, but this PR is not the best merge shape while it also changes node exec approval routing and omits the required changelog entry.

Full review comments:

  • [P2] Split the node exec approval-path change — src/agents/bash-tools.exec-host-node-phases.ts:56-62
    This PR is scoped to transcript/tool-call normalization, but adding workdirExplicit changes when explicit host=node workdirs go through system.run.prepare under security=full/ask=off. That path controls command execution approval and plan semantics, so split it into a separate exec PR or get explicit maintainer security approval before merging this provider fix.
    Confidence: 0.84
  • [P3] Add the required changelog entry — src/agents/tool-call-id.ts:16-23
    This is a user-facing bug fix for OpenAI-compatible provider tool-using flows, but the PR diff does not add a CHANGELOG.md entry. Add a single-line Fixes entry before merge, with human contributor credit if appropriate.
    Confidence: 0.86

Overall correctness: patch is incorrect
Overall confidence: 0.84

Security concerns:

  • [medium] Unscoped node exec approval-path change — src/agents/bash-tools.exec-host-node-phases.ts:56
    The PR changes host=node full/off handling for explicit workdirs by routing them through system.run.prepare, while the PR body says command/tool execution behavior did not change. Because this path governs host command execution approval and plan semantics, it needs explicit security review or a split PR.
    Confidence: 0.84

Acceptance criteria:

  • pnpm test -- src/agents/tool-call-id.test.ts src/agents/session-transcript-repair.test.ts src/agents/session-transcript-repair.attachments.test.ts
  • pnpm exec oxfmt --check --threads=1 src/agents/tool-call-id.ts src/agents/session-transcript-repair.ts CHANGELOG.md
  • pnpm check:changed

What I checked:

Likely related people:

  • Peter Steinberger: Current blame and recent history route the central transcript repair, tool-call ID, and node exec approval helper files through Peter's recent refactor/maintenance commits. (role: recent maintainer; confidence: high; commits: cf1991d27deb, 848f154f3eaa, ea1e933b29a2; files: src/agents/tool-call-id.ts, src/agents/session-transcript-repair.ts, src/agents/bash-tools.exec-host-node-phases.ts)
  • @vincentkoc: The current main dispatch-time malformed tool-call name normalization was introduced in Runner: normalize malformed tool call names before dispatch #39328 and credited to @vincentkoc, which overlaps the provider-prefixed tool-name behavior this PR extends into transcript repair. (role: adjacent owner; confidence: medium; commits: 69a6c0a9dd88; files: src/agents/pi-embedded-runner/run/attempt.tool-call-normalization.ts, src/agents/pi-embedded-runner/run/attempt.test.ts, CHANGELOG.md)

Remaining risk / open question:

  • The PR still changes node-host command execution approval routing outside its stated provider-normalization scope.
  • Current main has later adjacent tool-name normalization, so the final branch should be rebased and de-duplicated carefully before merge.
  • The discussion reports focused unit validation, but no live Kimi/OpenAI-compatible provider E2E proof is available.

Codex review notes: model gpt-5.5, reasoning high; reviewed against 605e89468ebf.

@deepujain deepujain force-pushed the fix/39091-normalize-mangled-tool-names-ids branch from 9ec4a32 to d262790 Compare April 27, 2026 00:36
@deepujain
Copy link
Copy Markdown
Contributor Author

Rebased this branch onto current main and resolved the merge conflict. The assembled-context logging case is already present on main now, so the duplicate CI-fix commit was dropped during the rebase. Local checks: pnpm test -- src/agents/tool-call-id.test.ts and pnpm lint --threads=8 pass.

@deepujain
Copy link
Copy Markdown
Contributor Author

Fixed the post-rebase CI failures from current main by preserving explicit node workdir through prepare and moving the shared node exec params into a leaf type module to remove the import cycle. Local checks: pnpm test -- src/agents/bash-tools.exec.approval-id.test.ts -t "preserves explicit workdir for node exec|does not forward the gateway default cwd", pnpm check:madge-import-cycles, pnpm test -- src/agents/tool-call-id.test.ts, and pnpm lint --threads=8 pass.

@deepujain
Copy link
Copy Markdown
Contributor Author

Follow-up for CI lint: removed the stale node exec type imports after extracting the shared params type. Local check: pnpm lint --threads=8 passes.

@deepujain deepujain force-pushed the fix/39091-normalize-mangled-tool-names-ids branch from 0f62969 to 723038b Compare April 27, 2026 00:53
@deepujain
Copy link
Copy Markdown
Contributor Author

Rebased once more onto the latest main after it moved again. Adapted the node exec CI fix to main's new .types.ts split, while keeping the tool-call ID fixes intact. Local checks pass: node workdir test, madge import-cycle check, tool-call ID tests, and pnpm lint --threads=8.

@deepujain
Copy link
Copy Markdown
Contributor Author

Fixed the remaining node exec test failure by distinguishing explicit host=node workdirs from internal/default workdirs. This keeps full/off node exec on the fast path unless the tool call actually supplied a remote workdir. Local checks: targeted node exec tests, madge import-cycle check, tool-call ID tests, and pnpm lint --threads=8 pass.

@deepujain deepujain force-pushed the fix/39091-normalize-mangled-tool-names-ids branch from 13b16e2 to 749e8bd Compare April 27, 2026 01:06
@deepujain
Copy link
Copy Markdown
Contributor Author

Rebased onto latest main again and fixed the contracts-plugins failure by declaring Lobster's new ajv runtime dependency in the extension manifest and lockfile. Local validation: pnpm test -- src/plugins/contracts/extension-runtime-dependencies.contract.test.ts passes.

@openclaw-barnacle openclaw-barnacle Bot added the extensions: lobster Extension: lobster label Apr 27, 2026
@deepujain
Copy link
Copy Markdown
Contributor Author

Fixed the remaining support-boundary failure from latest main by aligning the Docker release-check trust assertion with the current reusable workflow behavior. Local validation: pnpm test -- test/scripts/test-install-sh-docker.test.ts passes.

@deepujain deepujain force-pushed the fix/39091-normalize-mangled-tool-names-ids branch from 010bb43 to 512853b Compare April 27, 2026 01:17
@deepujain
Copy link
Copy Markdown
Contributor Author

Rebased once more onto current main after the upstream release-validation follow-up landed, dropping the duplicate local CI-fix commits now present upstream. Local validation: agent/tool-id targeted tests plus pnpm test -- test/scripts/test-install-sh-docker.test.ts src/plugins/contracts/extension-runtime-dependencies.contract.test.ts pass.

@deepujain
Copy link
Copy Markdown
Contributor Author

Swept this PR again. Existing CI is green, and the inline Codex comments are addressed on the current head: prefixed sessions_spawn calls are redacted, tool-result extraction preserves raw ids, normalization is limited to the leading functions prefix, and replay-safe preserved ids stay paired. Focused tests passed locally: pnpm test -- src/agents/tool-call-id.test.ts src/agents/session-transcript-repair.test.ts src/agents/session-transcript-repair.attachments.test.ts. Added 🚀 reactions to the addressed comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant