TXT TCP /

Guides / Make failure part of the contract

Agent communication notebook

Make failure part of the contract

Design notes

A system should be able to distinguish an invalid message, an unauthorized action, a temporarily unavailable recipient, and an operation that failed after acceptance.

Define clear error categories and avoid placing secrets in error text. Give callers enough information to choose a next step without exposing internal data unnecessarily.

Treat authorization as a separate decision from parsing. A well-formed request can still be outside the sender’s permitted scope. Apply controls at the boundary where actions occur.

TXT TCP is currently a design exploration. The examples are useful for discussion and experimentation, not evidence of production transport guarantees.

Put the idea to work.

Validate a small draft JSON envelope locally and inspect actionable field errors.

Message envelope validator

Continue reading

Design notes

An envelope before a conversation

A message body is easier to interpret when the surrounding contract is explicit. Identify the sender, recipient, message type, and a stable message identifier before adding application-specific content.

Read the guide
Design notes

Retries need an identity

A network retry can repeat an operation that already succeeded. A receiver needs a way to distinguish a new request from another delivery attempt of the same request.

Read the guide