Skip to main content

Troubleshooting the Agent (GUI + CLI)

If something looks wrong in MesoLive (no quotes, stale accounts, missing signals), start here: the Agent is the bridge between your broker and MesoLive.

Quick triage (2 minutes)

  1. Verify the Agent is connected:
  2. Verify the broker integration is connected:
  3. Verify data is flowing:
    • GUI: Last update timestamps (Accounts/Positions/Orders/Market Data) keep advancing.
    • Portal: Data Explorer shows fresh snapshots for your underlying/options.

If timestamps stop advancing, treat it as an outage and resolve it before trading.

Where to look first (Portal)

Agent Key problems (Portal is red / unauthorized)

Symptoms:

  • Agent UI shows “key is invalid” / “key is expired”, or Portal connectivity stays red.

Fix:

  • Generate a new key in the Portal Agents page, then update the Agent configuration.
  • Ensure there are no leading/trailing spaces when pasting.
  • If you revoked a key in the Portal, the Agent must be updated to a new one.

Agent version too old (forced upgrade)

Sometimes the backend enforces a minimum Agent version to keep the protocol compatible.

Symptoms:

  • The Agent used to work, but now Portal connectivity stays red even though the key is valid.
  • The Portal Agents page (https://mesolive.io/agents) shows the Agent offline and “Last seen” stops updating.

Fix:

License acceptance problems (CLI)

Symptoms:

  • CLI exits with “Terms and Conditions were not accepted”.

Fix:

IBKR / TWS connection failures

Symptoms:

  • IBKR indicator is red, or it connects but you see stale data / no market data.

Checklist:

  • TWS is running and logged in.
  • TWS API is enabled:
    • FileGlobal ConfigurationAPISettings
    • Enable socket clients; Read-Only API is unchecked (needed for trading).
  • The Agent’s port matches the TWS API port (7496 live / 7497 paper by default).
  • Client ID is unique. If another app uses the same Client ID, one of them will fail to connect.
  • You have the required IBKR market data subscriptions for the products you trade; missing permissions can look like “no quotes”.

See: Interactive Brokers setup.

Docker can’t reach local TWS

Common causes:

  • Wrong hostname for reaching a host-local TWS instance.

Fix:

  • macOS/Windows: use host.docker.internal for --tws-host.
  • Linux: host.docker.internal may not exist; use the host’s LAN IP or run Docker with host networking (if appropriate for your environment).
    • If you use docker compose, prefer extra_hosts: ["host.docker.internal:host-gateway"] (Docker 20.10+).

See: MesoLive Agent Setup (CLI) → CLI options.

TastyTrade API failures

Symptoms:

  • TastyTrade indicator is red, or it connects and then starts failing.

Checklist:

  • Your OAuth app and grant were created with the correct redirect URI and scopes (see TastyTrade setup).
  • Refresh tokens can be rotated/revoked; if in doubt, generate a new grant and update the Agent.

Collecting logs (when escalating)

CLI / Docker

  • Use docker logs mesolive-agent (or your container name).
  • If running without Docker, capture stdout/stderr (e.g., mesolive-agent ... > agent.log 2>&1).

GUI app

The GUI writes a rolling log stream to a MesoLiveAgentLogs folder under the app’s cache directory (2-day retention). The exact path depends on your OS; the fastest method is to search your disk for MesoLiveAgentLogs and attach the newest files to your support ticket.