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 | $0.00075 | $0.00811 |
| Sonnet 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 10d 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.
- 10d 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 1mo ago), licensed Apache-2.0. It adds 150 tokens to every session and 1,621 once invoked, about $0.0007 per session on Opus 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.
Other skills, from other repositories
systematic-debugging
4-phase root cause debugging: understand bugs before fixing.
triage-issues
Triage GitHub issues in the googleapis/mcp-toolbox repo: propose the correct labels (type / priority / product / status), check for duplicates, verify a bug has enough info to act on, and draft a triage comment. Use whenever a maintainer asks you to triage, label, categorize, prioritize, or "look at" an issue (or a…
copilotkit-debug
Use when diagnosing CopilotKit issues -- runtime connectivity failures, agent not responding, streaming errors, tool execution problems, transcription failures, version mismatches, and AG-UI event tracing.
agent-merge-conflict-arbiter
Neutral arbiter for merge conflicts between two agents.
python-debugpy
Debug Python: pdb REPL + debugpy remote (DAP).
sglang-diffusion-benchmark-profile
Use when benchmarking denoise latency or profiling a diffusion bottleneck in SGLang.