ToolErrorRecord#

Create, compose, unload, and save session-local Python tools. See the guide.

class zett_agent.jit_harness.errors.ToolErrorRecord(*, tool_name, error_type, message, message_truncated, occurrences, last_seen_at, last_call_id, status, caller_tool_name=None)[source]#

One distinct recent error, with the latest invocation’s context.

Errors deduplicate by tool name, exception type, and complete message. Reoccurrence refreshes recency and last_seen_at; reading does not. occurrences covers only the current cache residence, restarting if an evicted error reappears. message is truncated to the configured character limit and message_truncated says whether the full text was longer; None means the exception could not be formatted. No exception object, traceback, arguments, or result object is retained. Exception messages themselves may contain sensitive application data.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Parameters:
  • tool_name (str)

  • error_type (str)

  • message (str | None)

  • message_truncated (bool)

  • occurrences (int)

  • last_seen_at (datetime)

  • last_call_id (str)

  • status (ToolCallStatus)

  • caller_tool_name (str | None)

caller_tool_name: str | None#

Tool whose handler composed the latest occurrence; null at the top level.

classmethod validate_status(value)[source]#

Keep the cache limited to the two outcomes it exists to explain.

Parameters:

value (ToolCallStatus)

Return type:

ToolCallStatus

Fields#

tool_name (required)

See the typed model signature for this field.

error_type (required)

See the typed model signature for this field.

message (required)

See the typed model signature for this field.

message_truncated (required)

See the typed model signature for this field.

occurrences (required)

See the typed model signature for this field.

last_seen_at (required)

See the typed model signature for this field.

last_call_id (required)

See the typed model signature for this field.

status (required)

See the typed model signature for this field.

caller_tool_name (optional)

See the typed model signature for this field.