Truss: Skill for Codex

.skills/truss-tool-error-states/SKILL.md

truss-tool-error-states is a skill for Codex from truss-harness/Truss. It costs 150 tokens per session (1,621 once invoked), scanned A, original, Apache-2.0.

A set of instructions for how Truss runs tools and displays their progress, results, and errors. Tools are actions an AI agent can call, including built-in tools and MCP tools, which are tools provided through an external connection standard.

In plain words
What is it for?
Use it when changing tool execution, tool-call streaming, MCP integrations, provider recovery, saved thinking data, or the chat interface for tool and sub-agent status updates.
Why use it?
It keeps failed tool calls visible and preserves the agent's reasoning and error details instead of replacing them with a vague failure message. It also ensures that progress and completion states are represented consistently.

Skill for Codex

Written for Codex: agents/openai.yaml present.

This is truss-harness/Truss's own configuration. It tells Codex how to work on Truss itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything Truss configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/truss-harness/Truss/master/.skills/truss-tool-error-states/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/truss-harness/Truss

Made for: Codex.

Wrote 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.

agentmods badge for truss-tool-error-states

README.md
[![agentmods](https://agentmods.dev/badge/skills/truss-harness/truss/truss-tool-error-states/github.svg)](https://agentmods.dev/skills/truss-harness/truss/truss-tool-error-states)
Your own site
<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.

agentmods 80×15 button for truss-tool-error-states

Your own site · 80×15
<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>
Per session 150 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,621 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 10d ago against content hash 0741567308b7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

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.

.skills/truss-tool-error-states/SKILL.md · 60 lines

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_call update with status: "running", then exactly one terminal update with status: "completed" or status: "error".
  • Long-running MCP tools may emit progress before the terminal update. Preserve progress as ChatToolCall.progress on repeated tool_call events 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_agent calls should also emit sub_agent.spawned and terminal sub_agent.status updates. Failed children must leave the parent tool call in status: "error" with the child session reference preserved.
  • Store failed tool calls in ChatThinking.toolCalls with 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_error messages 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 like Error in input stream.

Read the full file on GitHub · 60 lines

Files

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.

Changes

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.

  1. 10d ago First seen · 60 lines · 150 tokens per session scan A 0741567308b7

Subscribe to this mod's changes

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.