---
schema: 1
type: term
title: _static typing_
description: >-
  **Static typing** is the practice of checking code against a fixed set of type
  definitions before (or as) it runs, so that calls to methods or functions that
  don't exist are caught by a type checker rather than failing at runtime. In
  this material, it is the safety net that makes agent **code execution**
  against an API's SDK viable: when a model hallucinates a method like
  `stripe.transactions.list`, the type checker catches the error in real time
  and returns relevant documentation inline.
  [^913c216d-5ccb-51d9-8f42-8feb7c017d9d@2398]
canonical: 'https://liquidgold.cc/channel/everyinc/explore/term/static-typing-1538a715159d'
markdown: >-
  https://liquidgold.cc/channel/everyinc/explore/term/static-typing-1538a715159d.md
llms: null
parent: 'https://liquidgold.cc/channel/everyinc/llms.txt'
channel: everyinc
updated: '2026-10-23T22:12:35.346Z'
language: null
children: []
---


# \_static typing\_

Canonical: https://liquidgold.cc/channel/everyinc/explore/term/static-typing-1538a715159d

Parent: [Channel index](https://liquidgold.cc/channel/everyinc/llms.txt)

## Definition

**Static typing** is the practice of checking code against a fixed set of type definitions before (or as) it runs, so that calls to methods or functions that don't exist are caught by a type checker rather than failing at runtime. In this material, it is the safety net that makes agent **code execution** against an API's SDK viable: when a model hallucinates a method like `stripe.transactions.list`, the type checker catches the error in real time and returns relevant documentation inline. [^913c216d-5ccb-51d9-8f42-8feb7c017d9d@2398]

## _Static typing_ in this material In the channel's material, **static typing** appears as the mechanism that makes **code execution** safe for agents. When a model runs TypeScript against an API's SDK instead of calling MCP tools one by one, the whole approach only works if the library behaves perfectly out of the box — the right version, no hallucinated methods. **Static typing** is the safety net: a type checker catches errors in real time — `stripe.transactions.list` doesn't exist; did you mean payment intents, orders, or balance transactions? — returning relevant documentation inline, powered by a sub-agent unburdened by the full conversation context. [^913c216d-5ccb-51d9-8f42-8feb7c017d9d@2398] [^ea9761fa-0184-555e-be30-4928a6682680@2412]    ### The hallucination guard Without typed SDKs, a code-executing agent could happily invent methods that don't exist. The type checker surfaces the mistake immediately and points toward the correct API surface, so the model self-corrects instead of failing silently. This is what lets Stainless run agent code in **network-locked sandboxes** — one API provider per sandbox, so only `api.stripe.com` is reachable — with type checking catching hallucinated calls. [^913c216d-5ccb-51d9-8f42-8feb7c017d9d@2611] [^ea9761fa-0184-555e-be30-4928a6682680@2638]   - **Static typing** is presented as the enabler for agent code execution: the type checker guarantees the SDK the model is calling actually exists and behaves as intended. - It catches hallucinated method calls in real time and returns relevant documentation inline via a sub-agent, keeping the main context lean. [^913c216d-5ccb-51d9-8f42-8feb7c017d9d@2398] - It is one half of the code-execution stack — typed SDKs in network-locked sandboxes — that Stainless offers as an alternative to exposing hundreds of MCP tools.  [^913c216d-5ccb-51d9-8f42-8feb7c017d9d@2398]: Anthropic Just Bought a Dev Tools Startup for $300M. Here's What Its Founder Told Me. — Alex Rattray on static typing as the hallucination guard, from 2398s. [^ea9761fa-0184-555e-be30-4928a6682680@2412]: Alex Rattray, MCP conversation — type checker returning relevant docs inline, from 2412s. [^913c216d-5ccb-51d9-8f42-8feb7c017d9d@2611]: Anthropic Just Bought a Dev Tools Startup for $300M. Here's What Its Founder Told Me. — sandboxing, from 2611s. [^ea9761fa-0184-555e-be30-4928a6682680@2638]: Alex Rattray, MCP conversation — network-locked sandbox, from 2638s.
