{
  "id": 18899924,
  "title": "How osFoundry's wait_for_messages long-poll carries messages between Claude Code and Codex, rebuilt in Python",
  "url": "https://urgent.news/2026/11/08/how-osfoundrys-wait-for-messages-long-poll-carries-messages-between",
  "topic": "ai",
  "section": "AI",
  "published": "2026-11-08T08:53:08.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/bbt_c84feb0f535/how-osfoundrys-waitformessages-long-poll-carries-messages-between-claude-code-and-codex-rebuilt-3ce0"
  },
  "original_language": "en",
  "account": "The wait_for_messages long-poll in osFoundry's agent network is used to communicate messages between Claude Code and Codex. This long-poll requires no subscription, webhook or socket, and returns messages as they arrive or after a maximum timeout of 50 seconds. Both Claude Code and Codex are MCP clients that make requests, and they cannot call into each other.\n\nThe wait_for_messages endpoint is built to handle message delivery efficiently. It takes three parameters: after_sequence, timeout_s, and limit. After_sequence specifies the sequence number of the last message received, timeout_s sets the maximum wait time in seconds, and limit defines the maximum number of messages to return. An empty list is returned if there are no messages after the specified timeout.\n\nThe endpoint supports three types of message addresses: by to, by @handle, or in a direct message. The @handle route is used to send messages to specific agents. The handle must follow a specific pattern: 2 to 31 characters, lowercase, digits and hyphens, and cannot include certain reserved words. The handle is matched using a regular expression in both the web client and Python implementation.\n\nLong-polling is used as the primary method for message delivery, with a timeout of 50 seconds. This approach provides the best balance between latency and call count. Short-polling every 2 seconds or 10 seconds results in higher call counts and increased latency. The 50-second timeout allows for efficient message delivery while minimizing unnecessary calls.",
  "summary": "This is the whole receive side of osFoundry 's agent network, as the public MCP endpoint declares it. The output is from tools/list on https://api.osfoundry.io/api/v1/external-mcp , which answers without a token: wait_for_messages: required= [] readOnly=True openWorld=False scope= [ 'osfoundry:read' ] { \"after_sequence\" : { \"type\" : \"integer\" , \"minimum\" : 0 }, \"timeout_s\" : { \"type\" : \"integer\"…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 3,
    "also_reported_by": [
      {
        "outlet": "XDA Developers",
        "title": "Someone used Claude Code to reverse-engineer the Apple AirPods 3, and now head-tracking works on Linux",
        "url": "https://urgent.news/2026/11/06/someone-used-claude-code-to-reverse-engineer-the-apple-airpods-3-and",
        "published": "2026-11-06T08:36:56.000Z"
      },
      {
        "outlet": "Hacker News",
        "title": "Claude Code's \"Don't Ask Again\" exposes passwords in 1,122 public GitHub files",
        "url": "https://urgent.news/2026/11/07/claude-codes-dont-ask-again-exposes-passwords-in-1-122-public-github",
        "published": "2026-11-07T20:45:32.000Z"
      }
    ]
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}