Add opt-in run_step param to workflow_explorer_agent for single-step execution - #4902
Merged
Conversation
…execution The explorer stays read-only by default. Passing run_step: true — which the main agent is instructed to do ONLY when the user explicitly asks to run/execute/test a workflow step — forwards toolsConfig.stakwork_run_step to the swarm agent, unlocking the (billable) single-step execution tool for that one call. Omission is the swarm's off state, so ordinary research dispatches remain strictly read-only. Prompt guidance covers the consent rule and how to phrase a self-contained discover → fill → run → report execution prompt. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Evanfeenstra
enabled auto-merge (squash)
July 23, 2026 16:40
|
Test environment is now live. View it at: https://hive-preview-3.sphinx.chat Database expires at: Jul 23, 2026, 9:42 PM UTC |
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.
What
Lets the canvas agent's
workflow_explorer_agentexecute ONE Stakwork workflow step — but only when the user explicitly asks for it. Completes the chain built in stakwork/senza-lnd#7949–#7955 (therun_step_from_templateendpoint) and stakwork/stakgraph#1478/#1479 (the swarm-sidestakwork_run_steptool, gated ontoolsConfig.stakwork_run_step).How
workflowExplorerTools.ts— new optionalrun_step: booleanon the tool schema. When true, the call forwardstoolsConfig: { stakwork_run_step: true }to the swarm agent, flipping its opt-in gate for that one dispatch. When absent, nothing is sent — omission is the swarm's off state, so ordinary research calls stay strictly read-only. Tool + prompt-param descriptions carry the consent rule ("set true ONLY when the user has explicitly asked to run/execute/test a workflow step — never for ordinary research; executions are real and billable").prompt.ts(getWorkflowsCapabilitySnippet) — new "Running a step" section: when to set the flag (explicit user request only, never proactively — propose and wait otherwise), and how to phrase the execution prompt (self-contained: workflow + step id, user-supplied inputs or discover-then-fill with test values /mock_mode, one dispatch carrying the whole discover → fill → run → report loop). "Strictly read-only" caveats updated to "read-only by default".capabilities.ts— menuBlurb mentions the on-request step execution. Deliberately NOT added towriteToolNames: readonly mode strips whole tools by name, which would also remove all research; the comment documents this trade-off.Why per-call rather than session-level
A session- or capability-level toggle would let one approval bleed into later unrelated calls. A per-call boolean means each execution window is opened by exactly one user request and closes immediately after — layered on top of the existing gates (org-gated
workflowscapability, server-side Stakwork API key, swarm-sidetoolsConfigopt-in).🤖 Generated with Claude Code