> ## Content Index
> Fetch the complete content index at: https://datajutsu.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# A Protobuf Unknown Field Is a Skip (and the Stream Cut Is Where Streaming Breaks)
- URL: https://datajutsu.com/protobuf-unknown-fields-streaming/
- Published: 2026-10-24T23:08:32.000Z
- Updated: 2026-10-24T23:08:32.000Z
- Author: Data Jutsu

Every decoder you have used tells you what an unknown field is, in the one way that matters, by not reading it. I ran the library that runs every tab of the converter against bytes its schema has never seen and measured exactly what skip means. It means the wire type alone decides how many bytes get walked over. A varint skip runs until the continuation bit stops, a fixed 64-bit skip consumes exactly eight bytes, a length-delimited skip reads the length and eats that many, a fixed 32-bit skip eats four, and a group skip walks inside until it finds the matching end tag. The field number never enters the calculation. I built an unknown field with a hundred byte payload made entirely of bytes that look like real fields, and the decoder skipped the whole hundred without reading a single one of them, then landed cleanly on the field that followed.

There is one unknown field that breaks the skip, and it is the one that cannot exist in a well-formed stream. Wire type four is the group end tag, and a skip that lands on it with no group open throws, invalid wire type four at offset one, the exact message with the exact arithmetic. That is the second of the two error flavors the decoder has, the first being the index out of range you get when a declared length runs past the end of what you handed it. The truncation error carries its math, index out of range two plus five greater than four, which tells you the decoder was at byte two, claimed five more, and only had four. These two messages are the whole vocabulary of decoder failure, and neither one appears when the stream is doing the quiet thing.

The quiet thing is where the known fields sit. The generated decoder for your schema does not check the wire type of a field it knows. It reads what the schema says the field is and never looks at the three bits that say what the stream claims it is. I gave an int32 field a length-delimited tag with a string payload, and the decoder read the length byte as the field's value, took the first payload byte as a tag for field ten, a field the schema never had, and then asked to skip ninety-seven bytes of a message that had seven left. The error that comes out names none of your fields: index out of range, four plus ninety-seven greater than seven. That is the fingerprint of a wire type lie. When a known field misparses, the failure lands one or two fields later, on a byte that was payload, and the arithmetic in the error is your map of where the walk went wrong. If your decoder error is about a field number that does not exist in your schema, the bug is usually in a field before it.

Now the same bytes under two schemas. Field nine, varint, value seven. A schema that has no field nine walks over it and your object has no key. A schema that has an int64 at nine keeps it, and the object carries the seven. Unknown is not a property of the bytes, it is a property of the bytes and your schema, which is why a schema that is one revision behind never throws on the new field, it just does not show it. I ran the tool's decode tab flags, defaults on, bytes as strings, and the output is the same: every kind of unknown, varint, length-delimited, fixed, vanishes, and the fields your schema knows fill in with their defaults. A stale schema is the one decode that succeeds and silently loses data, because there is no error to find.

Under streaming the rules do not change, and that is the point. A gRPC frame ends where its five-byte prefix says it ends, never where its fields would suggest, so unknown fields inside a frame cannot shift the boundary, and I verified a two frame server stream reading back as two exact objects in order. The real new failure is the cut. Take a valid stream and decode every prefix of it, and each prefix is either a smaller valid message or one of the two errors, never a half field. Cut after the first field you get a message with one field. Cut in the middle of a varint you get the index error. Cut after the last field you get the whole message. The stream never carries a partial value, it carries a sequence of complete-or-not, which is why a dropped connection loses whole messages and never half ones, and why the frame prefix is the only thing that decides where one message stops and the next begins. The tag anatomy is in the [wire format post](https://datajutsu.com/how-protobuf-wire-format-works/), the framed body measured byte for byte is in the [real gRPC trace post](https://datajutsu.com/decode-a-real-grpc-trace/), and the bytes go into [proto.datajutsu.com](https://proto.datajutsu.com/?ref=datajutsu.com) on the decode tab, where you will watch the unknown field disappear and the fields around it land whole.