03 · Agent Runtime
t3code supplies the upstream agent interface and provider orchestration. Market Bender chooses Claude first, adds trading-specific typed tools and context, and records every compatibility touchpoint.
What stays upstream; what Market Bender adds
t3code
- React/Vite interface and Node WebSocket orchestration
- Provider adapters/services and streaming events
- Provider session lifecycle and existing tool/MCP seams
- Current providers including Claude and Codex
Market Bender
- Privy identity/wallet adapter
- Trading context and display-safe events
- Narrow trading tools calling risk/execution
- Self and VS orchestration
- Provider policy, observability and compatibility tests
Narrow capabilities, no user configuration
The player does not configure an MCP server. Market Bender may use t3code's existing automatic tool/MCP session seam internally, but the product exposes only get_market, get_portfolio, place_order, list_orders, cancel_order, close_position and flatten. Coding shell/filesystem tools, arbitrary network access, raw wallet RPC and secret access are absent from the trading session.
Validated tool arguments are the TradeIntent boundary
Model input
- Fresh
MarketFramewith allowed instruments only - Reconciled portfolio/open orders/recent fills
- Risk-budget summary, not mutable policy
- Match revision, remaining time and permitted opponent state
- Sanitized user steering
Model output
- One typed tool call or hold
- Stable intent ID and bounded numeric strings
- Optional display-safe rationale summary
- No chain-of-thought, credential, signature or settlement instruction
Event-driven, bounded, single execution authority
A deterministic scheduler decides when a turn is eligible: material market/portfolio change, fill/cancel event, steering command, match phase transition, or maximum idle interval. It coalesces bursts, applies a minimum cadence and supplies a context snapshot ID. Read-only analysis subagents may inspect bounded inputs, but one execution authority owns write tools for a signer/process.
Influence strategy without bypassing controls
Steering is sanitized text that enters the next context. Direct controls create explicit human-authored TradeIntent records and pass through the same match/risk/execution boundary. Pause disables new model risk; it does not disable cancel, reduce-only recovery or Exit All.
Failure produces no new risk
- Timeout: record
model_timeout, discard late output, and reconsider only at a fresh cadence. - Invalid schema: reject before risk; allow at most one bounded correction request.
- Stale context/revision: reject and rebuild context.
- Duplicate tool call: return the recorded verdict/result for the idempotency key.
- Provider outage: keep reconciliation/direct safety controls alive and show a degraded state.
Prove “substantially unmodified” per revision
Each upgrade records upstream commit, touched extension surface, adapter version, auth/tool behavior, patch list (normally empty), rebase result and smoke tests. Any change to t3code core must state why an additive seam was insufficient and how the deviation remains bounded.