# Libtmux_json.Workspace.encode_receipt

**Workspace Manager concept example** A working example of the core library. It can change without notice.

- **Module:** Libtmux_json
- **Package:** libtmux-json
- **Language:** OCaml
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-ocaml/blob/205dfda49742592b479247049d186956e4a4cfe9/json/libtmux_json.mli#L57
- **Public owner:** Libtmux_json
- **Page:** https://libtmux.org/en/ocaml/latest/workspace/reference/libtmux_json-workspace-encode_receipt/

```
val encode_receipt :
  Libtmux_workspace.Execution.receipt ->
  (Yojson.Safe.t, Decode_error.t) result
```

Describe `libtmux.workspace-receipt/1` with ordered steps, outcome index lists, creation IDs, unbound hints and per-pane cleanup. Diagnostic messages are limited to 4096 bytes with an explicit truncation flag; command payloads are omitted.

Both output schemas have a 4 MiB bound. Invalid UTF-8 values use `{"encoding":"hex","bytes":"..."}` instead of losing bytes. Imported IDs and hints never establish a connection binding.

## Parameters

- `arg1` (`Libtmux_workspace.Execution.receipt`)
