Skip to main content
← Back to list
01Issue
FeatureShippedSwamp CLIPublic
Assigneesskunk-ape

Relationships

#4649 Let a type mark a method argument as data, and read an input file's content as data

Opened by skunk-ape · 11/11/2026· Shipped 11/11/2026

Summary

Let a type mark a method argument as data, so --input values for it are never evaluated as expressions.

Problem

swamp behavior run --input values are operator-written and evaluated (design/primitives/behaviors.md, "Inputs are operator-written"); --literal-inputs makes them data, but only when every caller remembers to pass it.

Some types take text an agent wrote, not operator configuration. @swamp/stagecraft's record_artifact / record_evidence / record_checkpoint take a payload that is a plan, review or result written by an agent. When that text mentions a resolvable ${{ vault.get(...) }}:

  1. swamp resolves it and hands the method the secret value;
  2. the method hashes the payload it received (stagecraft records that digest in its run record);
  3. swamp's data writer redacts the secret to *** on persist (redactOutsideVaultReferences, src/domain/models/data_writer.ts);
  4. the stored bytes no longer match the method's view, and stagecraft reports the artifact as changed outside the runtime (swamp-club#4596).

The secret is never persisted or printed, but the method holds it in memory and the text the author wrote is lost.

Proposal

  1. A method-argument schema marker, e.g. .meta({ data: true }), that makes a value supplied for that argument data in every route (--input, --input-file, --stdin, serve, workflow step inputs), exactly as under --literal-inputs. Expression text in such a field would be passed to the method verbatim.
  2. A way to read one input from a file as data. Today --input key=@path reads the file but evaluates its content, and --literal-inputs stops evaluation but also stops @ being read, so there is no single-input "this file's content is data" route. File content is never something the operator typed, so it arguably should not be evaluated at all. Options: let @path keep reading the file under --literal-inputs (content as data), make @path content data by default, or add an explicit form such as --input-data key=<path>. It must work over swamp serve, where the CLI reads the file on the client.

Stagecraft's case: a subagent writes its product to a result file, and the driver records it with --input payload=@<result-path>. Under the current rules that content is evaluated, so stagecraft is switching to having the subagent write a whole input file ({"name":...,"payload":{...}}) recorded with --literal-inputs --input-file. Item 2 would let it go back to recording the bare result file.

Why not only --literal-inputs (item 1)

It is per-invocation: every agent skill, driver and script must pass it, and forgetting it fails quietly until a reference happens to resolve. A type knows which of its arguments are data; it should be able to say so once.

Context

Found triaging swamp-club#4596 (stagecraft). Stagecraft is fixing its own side (skill passes --literal-inputs; subagents write input files; engine refuses a payload swamp redacted on write).

02Bog Flow
✓OPEN✓TRIAGED✓IN PROGRESS✓SHIPPED+ 1 MOREASSIGNED+ 5 MOREREVIEW+ 12 MOREPR_LINKED+ 2 MORESESSION_SUMMARIZED

Shipped

11/11/2026, 9:33:05 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
skunk-ape assigned skunk-ape11/11/2026, 7:25:06 PM

Sign in to post a ripple.