Skip to content

CL-6448: keep tools and history on openai-compatible body turns - #178

Merged
TheGreatAxios merged 3 commits into
mainfrom
cl-6448-openai-tools-history
Aug 21, 2026
Merged

TheGreatAxios merged 3 commits into
mainfrom
cl-6448-openai-tools-history

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

Summary

OpenAI-compatible adapters (Ollama/Studio) only send tools and history when those keys are on the assembled body at send time. Sidecar was collapsing extra keys on the onTrigger body path: body steps ran toolless through a throwing authorize stub, and each turn__<n> rebuilt a fresh per-run store so conversation never survived.

This threads parent authorize/credentialWiring through the vendored workflow-host spawn/child seam, materializes the body's staged tools (head/step collapse for single-step deploys), and restores conversation from the durable store keyed by the body's stable stepId.

Linear: https://linear.app/abklabs/issue/CL-6448

Tests

  • an openai-compatible turn's wire request carries the restored history and the declared tools — captured deps.fetch body must contain prior turns and the declared tool. Fails if either is stripped.
  • a body stepId absent from a single-step snapshot collapses to the sole entry's grants — body reply looks up the parent's sole grant set.
  • an unknown stepId against a multi-step snapshot stays a loud miss — grants still collapse only for the single-step case.
  • Step-env durable-conversation tests: different turn__n runIds share one store when the registry is present.
  • Suspendable-child: spawn input's authorize and credentialWiring reach the body invoker.

Vendor

No new Interchange snapshot. Existing vendor/intx/workflow-host delta: body-spawn authorize/credential threading. VENDORED.md + kill-date hash updated.

Pin the assembled wire request so a stripped tools or history payload
fails, and cover body-step grant collapse plus durable conversation
storage keyed by stepId across turn__n runs.
Thread parent authorize and credentialWiring through the body spawn
seam, drop the toolless body-env skip so staged tools materialize,
and restore conversation via the durable store keyed by stepId.
Document the vendored authorize/credentialWiring seam and refresh
the workflow-host kill-date hash.
@TheGreatAxios
TheGreatAxios merged commit 66c3431 into main Aug 21, 2026
0 of 2 checks passed
@TheGreatAxios
TheGreatAxios deleted the cl-6448-openai-tools-history branch August 25, 2026 15:40
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