Relationships
#3729 swamp serve: remote 'model method history get|logs' cannot find a run that remote 'history search' lists
Opened by sntxrr · 10/21/2026· Shipped 10/21/2026
Description
Against a swamp serve instance, swamp model method history search <model> --server … --token-file … --json returns a run (e.g. id 1a2a…). Passing that id straight to history get or history logs with the same --server/token fails as not found. Running history logs <same id> inside the serve container, against the same repo, returns the log (106 lines).
history get → model_method_history_get_failed: Output or behavior not found: <id>
history logs → model_method_history_logs_failed: No method run or behavior found: <id>
history logs <model-name> → model_method_history_logs_failed: Run not found: for behavior: <model-name>The principal has read on model:* (without it, search is refused with "does not have 'read' on model:*", so the grant is evaluated). Search works over the same connection.
Steps to reproduce
- On serve, run any method on a model so it has run history.
- From a client:
swamp model method history search <model> --server wss://<serve> --token-file <t> --json, then take an id from.results[]. swamp model method history logs <id> --server wss://<serve> --token-file <t> --json→ not found.- On the serve host:
docker exec --workdir <repo> <container> swamp model method history logs <id> --json→ succeeds.
Environment
- serve: swamp 20261021.155838.0-sha.f979f7c1 (container, local datastore)
- client: swamp 20261020.190225.0-sha.626c5028, macOS
- auth: token-file principal with grants
runon one model andreadonmodel:*
Also
Over --server, the error JSON is written to stderr, not stdout, so a --json consumer sees an empty stdout and a non-zero exit for a refusal. Locally the same refusal is on stdout.
Shipped
Click a lifecycle step above to view its details.
stack72 commented 10/21/2026, 7:35:31 PM
@sntxrr thanks for the detailed report — the repro steps made this quick to pin down.
What was wrong: when swamp serve uses a datastore outside the repo's .swamp folder (a custom filesystem path, a namespace, or an S3 cache), history search read run records from the datastore, but history get, history logs and model output get only looked in the repo's .swamp/outputs. So search listed runs that get and logs then couldn't find. Run locally, the CLI looked in the right place, which is why docker exec … history logs worked.
Fixed in swamp-club/swamp#3268: all three now read the same place search does. We checked by id and by model name, for plain method runs and workflow steps, with and without a token. While there, serve's history logs now refuses to read a log file from outside the repo's own run-log folders.
On the stderr note: we couldn't reproduce a difference. With --json, the error goes to stderr and stdout is empty both locally and over --server. What does differ is the wording: remote errors carry a model_method_history_*_failed code and a "Server reported …" prefix, while local ones use not_found or no code. If you're seeing JSON on stdout locally for a refusal, send the exact command and we'll take another look.
The fix will be in the next release.
Sign in to post a ripple.