Post to Threads from Codex

Threads posts are small, frequent and cheap, which is exactly what a scheduled Codex run is good at, and the reply surface is a tool call rather than a browser.

Hermoso is a marketing MCP server: 922+ tools over one OAuth’d endpoint that let an agent research the ads already running in a market, generate finished image and video ads, publish them, and build the paid campaigns behind them. Codex reaches all of it through one connection. This page covers one slice of that: what Codex can actually do on Threads, and what Threads will not let it do.

Connect Hermoso to Codex

  1. One command, and no key.
    codex plugin marketplace add hermoso-ai/hermoso && codex plugin add hermoso@hermoso
    Codex reads the marketplace file in Hermoso’s public repository and installs its five skills (research, ad-from-brand, generate, product-photoshoot and marketing). The skills run the hermoso command through npx, so no tool list is loaded into your sessions and nothing costs context until a command runs.
  2. Sign in once.
    npx -y hermoso auth login
    It opens a browser sign-in and stores an owner-only credential in ~/.hermoso/config.json. No browser on that machine, say CI or a container? Create a key under MCP & CLI → Terminal & API keys and run npx -y hermoso auth login --token hmk_…. A key carries real spend authority, so treat it like a password.
  3. Optional: the MCP server as well.
    codex mcp add hermoso -- npx -y hermoso mcp
    That writes the server into ~/.codex/config.toml and reads the same stored credential, so no key goes in the file. Prefer the hosted endpoint? codex mcp add hermoso --url https://app.hermoso.ai/mcp, then codex mcp login hermoso for the OAuth sign-in. The skills reach every tool without either.
  4. Ask Codex for something. “Pull my three closest competitors’ longest-running ads and remix the best hook into a 9:16 video,” or “post this render to the channel.” The agent picks the tools; you approve the spend.

Codex keeps MCP servers in ~/.codex/config.toml, or .codex/config.toml in a trusted project, and that file is TOML, not JSON: a copied mcpServers block will not load, and a hand-written entry is [mcp_servers.hermoso] with command = "npx" and args = ["-y", "hermoso", "mcp"]. The trailing mcp is load-bearing: npx -y hermoso with no subcommand prints help and exits. Codex reads plugin marketplaces in the same .claude-plugin layout Claude Code uses, which is why one repository installs in both.

Then connect Threads itself, once, under Settings → Connectors in Hermoso. That is an OAuth consent screen, so it is the one step that needs a browser. Everything after it is a tool call.

The Threads tools Codex gets

  • post_to_meta: publishes text, an image or a video with target: "threads", optionally geotagged.
  • schedule_post: queues it alongside every other channel.
  • list_threads_posts / threads_insights: what you have posted, and how each one did.
  • list_threads_replies / reply_to_thread / hide_thread_reply: read the replies, answer as the brand, hide what does not belong.
  • list_threads_mentions: who is talking about you.
  • search_threads_keyword / search_threads_locations: keyword search and the location ids a geotag needs.
  • delete_thread: removes a post.

Threads is the channel where Hermoso goes furthest past publishing. Beyond posting there is a full read-and-respond surface (replies, mentions, keyword search and per-post insights), which makes it usable as a listening channel as well as an outlet. Note that Threads is a separate OAuth grant from Facebook even though it shares the Page.

Threads limits worth knowing before you automate anything

TextA Threads post is capped at 500 characters, the tightest here apart from X. It is enforced when the post is created or queued, so an overlong post is refused while you are still there to fix it instead of being silently cut on the way out.
VisibilityPublic only. “Threads has no unlisted, private or draft post.” A Threads post exists publicly or not at all.
Carousel2 to 20 slides, images and video mixed. Both bounds are Meta’s own words, quoted in the table that enforces them: “Carousels must have at least 2” items, and “no more than 20 total images, videos, or a mix of the two.” That makes Threads the most generous mixed-media carousel of any channel here.
Which accountpageId. The same connected Page identity carries Facebook, Instagram and Threads.

Try it in Codex

Ask for it in ordinary language. These are plain sentences, not a DSL:

“Every weekday at 9am: read the new entries in the changelog, write one Threads post under 500 characters, post it, and log the id.”

That walks get_brand → generate_text → post_to_meta (target: "threads") → list_threads_replies. Interactively Codex shows the call before it runs it. Non-interactively there is nobody to ask, which is worth designing around on any step that publishes or spends.

Codex on Threads: the part that bites

Enforce the 500-character cap in the prompt as well as relying on the enqueue check. An unattended run that fails validation is a job that did not post, and on a daily cadence that is a silent gap. The listening half works the same way: list_threads_mentions returns structured results a cron-shaped run can act on.

For unattended runs, prefer the hermoso CLI with --json over the full tool manifest. It is far cheaper in context and easier to assert on.

Research Threads before you post

search_threads searches public Threads by keyword through the research surface, and search_threads_keyword does the same through your connected Threads account. There is no Threads ad library, because there are no Threads ads to archive.

The paid half

There is no Threads ads product in Hermoso, and it would be wrong to imply one. Threads here is an organic channel: publish, read, reply, measure. The paid tools cover Meta (Facebook and Instagram), Google Ads, Microsoft Advertising, Reddit Ads, LinkedIn, Pinterest, X Ads, TikTok Ads, Snapchat Ads, ChatGPT Ads, Apple Search Ads and AppLovin Ads.

What Codex cannot do on its own

An agent with a budget is only useful if the blast radius is bounded, so the fence is in the server rather than in a prompt. Every ad campaign, ad set, ad group and ad is created paused, and the status switches that arm real money refuse to run without an explicit confirmation flag. Every render is quoted first (hermoso_capabilities publishes each model’s exact credit cost before anything spends). Credits are reserved before the first provider call and settled at the exact cost afterwards, so a failed dispatch refunds rather than leaving you billed for nothing. Deletes are confirm-gated too, and every campaign tree is read back from the ad platform before your agent tells you what it built.

One step is deliberately not headless: linking an account is an OAuth consent screen, so you connect the channel once in a browser. Everything after that is a tool call.

The rest of the matrix

From Codex, post to: Facebook · Instagram · TikTok · YouTube · X · LinkedIn · Pinterest · Bluesky · Telegram. Or see everything Codex can publish to.

Post to Threads from: Claude · ChatGPT · Claude Code · Cursor · Cline · OpenClaw · Grok Bot · Hermes · Gemini CLI · Perplexity · Le Chat · Claude Cowork · Perplexity Computer · Paperclip · Ads from the command line

Frequently asked questions

Can Codex post to Threads?

Yes, with Hermoso's Codex plugin. Run codex plugin marketplace add hermoso-ai/hermoso && codex plugin add hermoso@hermoso, which installs Hermoso's skills, then sign in once with npx -y hermoso auth login. The sign-in opens a browser and stores the credential itself, so there is no key to create and none to paste. For the MCP server as well, run codex mcp add hermoso -- npx -y hermoso mcp. Codex then has 922+ tools, including the ones that publish to Threads, plus the ones that research the ads already running in your market and render the creative in the first place.

How do I connect Threads to Codex?

Two steps, once each. Run codex plugin marketplace add hermoso-ai/hermoso && codex plugin add hermoso@hermoso, which installs Hermoso's skills, then sign in once with npx -y hermoso auth login. The sign-in opens a browser and stores the credential itself, so there is no key to create and none to paste. For the MCP server as well, run codex mcp add hermoso -- npx -y hermoso mcp. Then connect Threads inside Hermoso under Settings → Connectors, which is an OAuth consent screen in a browser. After that Codex publishes to Threads as an ordinary tool call.

Can Codex post privately or as a draft to Threads?

No. Threads has no unlisted, private or draft post; a Threads post is public or it does not exist. Hermoso refuses a visibility Threads cannot honour at the moment you ask for it, rather than quietly publishing something weaker.

Can Codex schedule a Threads post for later?

Yes. schedule_post queues it on one calendar shared with every other channel, with a per-channel caption if the copy should differ, and list_scheduled and cancel_scheduled read and pull it back. Threads is one of the eleven channels that queue.

What is the Threads caption limit when posting from Codex?

A Threads post is capped at 500 characters, the tightest of any channel here apart from X. Hermoso enforces it when the post is created or queued, so Codex is told immediately rather than failing later when nobody is watching.

What does it cost to post to Threads from Codex?

Publishing to Threads costs no credits; Meta charges nothing per API call. Credits are spent on generating the creative. Plans are $29, $69 and $149 a month for 1,200, 3,000 and 7,000 credits, and every feature is on every plan including Free. The only exception is enterprise SSO.

Start free with 30 credits at signup and 250+ more to earn. Every feature is on every plan. Credits are spent only on AI models and Ad Spy research; posting, scheduling, ads management and analytics are free.

Start free →   See pricing