arkennemasis Codex Login Status
Check your ChatGPT login before you spend a generation
- status
ArkCodexLoginStatus is the "are we even logged in?" sanity check for the arkennemasis Codex nodes. It reports the Codex login this machine will use - which ChatGPT account, what plan, when the token expires - without generating anything. And it never, ever outputs the token itself, which is the kind of design decision you appreciate more the longer you've been wiring credentials into ComfyUI.
The whole Codex path of the pack works on a principle that still surprises people: no API key, no OAuth flow inside ComfyUI. The nodes reuse the login the Codex CLI already wrote on this machine. You run codex login once in your own terminal (it opens a browser), which writes ~/.codex/auth.json, and the Codex nodes read that file directly. This node exists because "is that file there and still valid" is not a question you want to discover the answer to mid-generation - an expired login on a 24-image batch means twenty-four failures, and the pack's retry logic explicitly does not retry a 401/403.
How it works
The only input is codex_home - the folder holding auth.json. Blank means: use $CODEX_HOME if set, else ~/.codex. Running several ChatGPT accounts? Give each its own folder and point each node at the right one; this node reports whichever login this machine will use for a given setting.
It's an output node that always re-runs - IS_CHANGED returns NaN because a token expires on its own, and serving a stale login check from ComfyUI's cache would defeat the point. The output is a single status STRING, and it's a genuinely informative block of text:
- Not logged in →
NOT LOGGED INplus the reason and the fix (Run codex login). - Logged in → the account email, the auth file path, the plan, whether the account id and refresh token are present, and the expiry -
expires in: 118 h,expired: false.
That's the whole node, and that's correct. It's a cheap diagnostic, not a feature zoo.
When you actually need it
The pack's README tells you to drop it in after codex login to confirm the account and plan before you run anything - good advice, because "not every ChatGPT plan or region can call the hosted image tool" and the node says so plainly rather than failing cryptically. The free tier can't call the hosted image tool at all; the pack is developed against ChatGPT Plus at $20/month. Checking the plan before a run is the difference between "the node told me I can't do this" and "the node told me, and then I ran it anyway and spent ten minutes watching retries."
It's also the way to verify a multi-account setup: point it at a second codex_home, confirm it reports the second email, and you know your per-node codex_home wiring is right before any generation spends quota.
Installing
It ships with comfyui-arkennemasis:
cd ComfyUI/custom_nodes
git clone https://github.com/Hishamahmer/comfyui-arkennemasis
pip install replicate httpx
restart, and it's under arkennemasis/Utility. The httpx dependency matters here: without it the Codex nodes don't even load, and the pack isolates that so everything else keeps working - but this node is in the Codex module, so it needs the dependency installed to appear.
One honest caveat: this node reports the login state, but it can't tell you whether your plan can actually call the image tool - availability is account-dependent and the pack says so. Use it to catch the boring failure modes (not logged in, expired, wrong account), and accept that the exciting ones still surface at generation time.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| codex_home | STRING | Blank = CODEX_HOME, else ~/.codex. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| status | STRING | — |