Skip to content

fix: middleware pass-through, reload visibility, workflow consistency#10

Merged
msilverblatt merged 4 commits intomasterfrom
fix/round5-middleware-reload-workflow
Mar 15, 2026
Merged

fix: middleware pass-through, reload visibility, workflow consistency#10
msilverblatt merged 4 commits intomasterfrom
fix/round5-middleware-reload-workflow

Conversation

@msilverblatt
Copy link
Owner

Summary

Fixes middleware argument preservation, hidden tool visibility after reload, and workflow tool management consistency across all 4 SDKs.

Changes

Middleware pass-through (HIGH)

  • Python/TypeScript middleware handlers returning None/undefined were defaulting arguments_json to empty string instead of preserving the request's original values
  • Tool calls through pass-through middleware would receive empty arguments

Reload visibility (MEDIUM — all 4 SDKs)

  • Added sendDisableHiddenTools call after reload in Go, Python, TypeScript, and Rust
  • Without this, hidden workflow steps become visible after hot reload

TypeScript workflow onError (MEDIUM)

  • onError transitions now compute disableTools (was returning empty array)
  • Old step tools remained visible during error recovery

Rust workflow restore (MEDIUM)

  • Added pre_workflow_tools tracking to WorkflowState
  • External tools hidden during workflow are now re-enabled on completion/cancel

Test plan

  • Go runtime — all pass
  • Go e2e — 8/8 pass
  • Go SDK — all pass
  • Python — 170/170 pass
  • TypeScript — 107/107 pass (tsc + vitest)
  • Rust — 75/75 pass

Python and TypeScript middleware handlers returning None/undefined
(meaning "no changes") would default arguments_json and result_json
to empty strings, silently wiping tool arguments. Now defaults to
the request's original values, matching Go and Rust behavior.
The initial handshake sent DisableToolsRequest for hidden tools,
but the reload handler did not. After hot reload, hidden workflow
steps would become visible to the LLM.
The onError path returned disableTools: [] while the normal transition
path correctly computed the full disable set. Old step tools would
remain visible during error recovery.
Added pre_workflow_tools to WorkflowState, snapshotted at workflow
start. On terminal completion or cancel, these tools are re-enabled
via the ToolResult. Previously external tools disabled during the
workflow would stay hidden permanently.
@msilverblatt msilverblatt merged commit 8de362c into master Mar 15, 2026
8 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