How does --output-format stream-json work?
Each line is a JSON event:
| type | Meaning |
|---|---|
system (subtype: init) | Session id, model, effort, folder, tools, version |
text | A piece of the answer |
tool_use / tool_result | A tool started / finished (ok, summary) |
usage | Input, output and cached tokens for a step |
retry | A retry with attempt, max, wait and reason |
note | A notice from Line |
permission_denied | Something needed approval and was declined |
result | The final result object (same as json) |
Use it to show live progress in your own tools.
Related articles
Still need help?
Tried the steps above and still stuck? Email us. We usually reply within the first hour, and always within 24 hours. A full support team is with you.
Infrastructure questions, or permanent deletion of your data
infrastructure@clatterlabs.xyzFor deleting your whole account or the data of one service.