Skip to content

Add opt-in stakwork_run_step tool — execute one workflow step with literal inputs - #1477

Merged
Evanfeenstra merged 1 commit into
mainfrom
stakwork-run-step
Jul 22, 2026
Merged

Add opt-in stakwork_run_step tool — execute one workflow step with literal inputs#1477
Evanfeenstra merged 1 commit into
mainfrom
stakwork-run-step

Conversation

@Evanfeenstra

Copy link
Copy Markdown
Collaborator

What

An execute counterpart to the read-only Stakwork run-research tools: stakwork_run_step runs ONE workflow step with LLM-supplied literal inputs and returns its output.

Double-gated. The tool registers only when the caller supplies the Stakwork API key AND passes a truthy toolsConfig.stakwork_run_step (standard toolConfigEnabled semantics: true, non-empty string, or object without enabled: false). The WORKFLOW_SYSTEM prompt guidance for it is gated behind the same flag, so non-opted-in callers see no mention of step execution. A string/object config value overrides the tool description via the existing override loop (stakwork_run_step is registered as a proper ToolName).

How it works

  • Launch: workflow_id + step_id (+ literal params/attributes overrides) → POST /workflow_steps/run on the Stakwork API (added in stakwork/senza-lnd#7948), which wraps the step in an ephemeral single-transition workflow and runs it as a normal project.
  • Wait: polls GET /projects/:id/status every 5s (default 120s, capped 600s). On timeout returns in_progress with the project_id; calling again with that project_id resumes waiting instead of launching a duplicate run.
  • Read: on a terminal state, returns the step's full GET /projects/:id/steps/:step_id/io (inputs/outputs, truncated at the existing 12KB caps).

Overrides are literal — they replace [$(ancestor).output.x)] interpolations, so no ancestor steps or prior outputs are needed; {{SECRET}} aliases pass through and resolve server-side at execution. The tool description and prompt guidance both steer the agent to study a real run first via stakwork_run_steps and to treat this as a deliberate, billable action.

Dependency

404s until stakwork/senza-lnd#7948 deploys — the read-only tools are unaffected either way.

🤖 Generated with Claude Code

…iteral inputs

Double-gated: requires the Stakwork API key AND a truthy
toolsConfig.stakwork_run_step. Launches a run via the new
POST /workflow_steps/run Stakwork endpoint, polls status, and returns the
step's full IO; a timed-out call returns in_progress with the project_id
so a follow-up call resumes waiting instead of launching a duplicate run.
The WORKFLOW_SYSTEM prompt guidance for the tool is gated behind the same
flag, so non-opted-in callers see no mention of step execution.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Evanfeenstra
Evanfeenstra merged commit 49ab452 into main Jul 22, 2026
6 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