Borrowing it
Nothing to install: this file belongs to truss-harness/Truss. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/truss-harness/Truss/master/.skills/truss-tool-error-states/SKILL.mdgit clone --depth 1 https://github.com/truss-harness/TrussWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/truss-harness/truss/truss-tool-error-states)<a href="https://agentmods.dev/skills/truss-harness/truss/truss-tool-error-states"><img src="https://agentmods.dev/badge/skills/truss-harness/truss/truss-tool-error-states/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/truss-harness/truss/truss-tool-error-states"><img src="https://agentmods.dev/badge/skills/truss-harness/truss/truss-tool-error-states.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00150 | $0.01621 |
| Opus 5.5 | $0.00060 | $0.00648 |
| Sonnet 5.5 | $0.00030 | $0.00324 |
| Haiku 4.5 | $0.00015 | $0.00162 |
Grade A, and why
truss-tool-error-states scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 60 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Truss Tool Error States
Use this skill before changing native tools, MCP tool execution, or tool-call presentation.
Error Contract
- Preserve the assistant's thinking state when tools fail. Do not replace accumulated thinking or tool-call rows with a generic provider or stream error.
- Every attempted tool call should emit a visible
tool_callupdate withstatus: "running", then exactly one terminal update withstatus: "completed"orstatus: "error". - Long-running MCP tools may emit progress before the terminal update. Preserve progress as
ChatToolCall.progresson repeatedtool_callevents for the same call ID; do not treat progress as a separate tool result. - When progress reaches
100, keep that progress value on the terminal update so the transcript can hold the completed bar briefly before fading it out. spawn_sub_agentcalls should also emitsub_agent.spawnedand terminalsub_agent.statusupdates. Failed children must leave the parent tool call instatus: "error"with the child session reference preserved.- Store failed tool calls in
ChatThinking.toolCallswith the original arguments, title, timestamps, and full error string so the transcript detail modal can show what happened. - If all tool calls in a tool turn fail, return an assistant message that summarizes the concrete tool failures and includes the merged thinking/tool metadata. Do not continue into a provider call that only sees
tool_errormessages unless at least one tool call succeeded or there is a deliberate recovery path. - If a stream-level error still occurs after tool events have arrived, the client should preserve the in-flight assistant message and only mark it
status: "error". - Provider text-call marker syntax such as Kimi, DSML, or MiniMax
<tool_call><invoke name="...">...blocks should be recovered into internal tool calls and stripped from final assistant content, not written into the transcript as ordinary text. - Prefer specific user-visible messages such as
Web search: query failed because ...over vague text likeError in input stream.
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 60 lines · 150 tokens per session scan A 0741567308b7
truss-tool-error-states is a skill published in the GitHub repository truss-harness/Truss (5 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 150 tokens to every session and 1,621 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
truss-tool-error-states compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| truss-tool-error-statestruss-harness/Truss | Skill | 5 | 3mo ago | Apache-2.0 | A | 150 | Codex |
| debugStepfenShawn/kota | Skill | 101 | 2d ago | MIT | A | 6 | Claude Code, Codex |
| systematic-debuggingNousResearch/hermes-agent | Skill | 261k | yesterday | MIT | A | 16 | Claude Code, Codex |
| python-debugpyNousResearch/hermes-agent | Skill | 261k | yesterday | MIT | B | 17 | Claude Code, Codex |
| sglang-diffusion-benchmark-profilesgl-project/sglang | Skill | 39k | yesterday | Apache-2.0 | A | 26 | Claude Code, Codex |
| resolve-handoffomnigent-ai/omnigent | Skill | 11k | yesterday | Apache-2.0 | A | 23 | Claude Code, Codex |
| iterate-implementationhumanlayer/humanlayer | Skill | 13k | yesterday | Apache-2.0 | A | 16 | Claude Code, Codex |