Skip to content

f.agent options.cwd is accepted by the SDK and refused by the kernel (invalid_spec: unknown field "cwd") #489

Description

@khaliqgant

packages/sdk/src/authored-worker-step.ts validates options.cwd (f.agent options.cwd must be a string when set) and lowers it into the step spec (...(options.cwd === undefined ? {} : { cwd: options.cwd })), but the kernel refuses the field:

FAILED [protocol_error] relayflowd could not complete the run request:
invalid_spec: unknown field "cwd" at steps[0] — refusing to guess (fail closed)

Reproduced on relayflows 2.0.21 with flows run --local-agent and a two-step flow whose first f.agent sets cwd. flows check passes — nothing catches it before the run.

Either the kernel should accept cwd on agent/llm steps (run the CLI in that directory, still inside the run's tree) or the SDK should refuse it at authoring time with a named refusal and flows check should catch it. Accepting-then-refusing at dispatch is the worst of the three. If cwd is meant to be expressed another way (workspace surfaces?), say so in docs/SURFACE.md where AgentOptions is documented.

Found while writing a multi-repo flow that drives agents in two checkouts.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    garden-readyScoped and ready for an agent to pick up

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions