ductor icon indicating copy to clipboard operation
ductor copied to clipboard

[Bug]: onboarding failure, codex auth failed.

Open mjivani opened this issue 7 months ago • 1 comments

What happened?

ductor onboarding is failing.

Steps to Reproduce

my telegram bot says codex CLI auth failed and I need to reauthneticate... but when I got to do onboarding again it failes.

just says service stopped and then nothing.

Expected Behavior

auth to happen again for codex.

Operating System

Windows

Environment

Local (pip install)

Which LLM provider?

Codex

ductor version

version is failing.

/diagnose output

EscapeVelocity:Recent logs (last 50 lines):2026-04-19 10:01:01 [INFO] ductor_bot.orchestrator.lifecycle:lifecycle.py:90: [main] Available providers: claude, codex, gemini2026-04-19 10:01:01 [INFO] ductor_bot.cli.model_cache:model_cache.py:217: [main] GeminiCacheObserver starting, cache_path=C:\Users\mjiva\.ductor\config\gemini_models.json2026-04-19 10:01:01 [INFO] ductor_bot.cli.model_cache:model_cache.py:84: [main] Gemini cache refresh forced2026-04-19 10:01:01 [INFO] ductor_bot.cli.model_cache:model_cache.py:124: [main] Discovered 7 Gemini models2026-04-19 10:01:01 [INFO] ductor_bot.cli.model_cache:model_cache.py:220: [main] Gemini cache loaded: 7 models, last_updated=2026-04-19T06:01:01.713116+00:002026-04-19 10:01:01 [INFO] ductor_bot.cli.model_cache:model_cache.py:217: [main] CodexCacheObserver starting, cache_path=C:\Users\mjiva\.ductor\config\codex_models.json2026-04-19 10:01:01 [INFO] ductor_bot.cli.model_cache:model_cache.py:84: [main] Codex cache refresh forced2026-04-19 10:01:02 [INFO] ductor_bot.cli.codex_discovery:codex_discovery.py:106: [main] Codex discovery found 4 models2026-04-19 10:01:02 [INFO] ductor_bot.cli.model_cache:model_cache.py:124: [main] Discovered 4 Codex models2026-04-19 10:01:02 [INFO] ductor_bot.cli.model_cache:model_cache.py:220: [main] Codex cache loaded: 4 models, last_updated=2026-04-19T06:01:02.836383+00:002026-04-19 10:01:02 [INFO] ductor_bot.cron.observer:observer.py:85: [main] CronObserver started (1 jobs scheduled)2026-04-19 10:01:02 [INFO] ductor_bot.heartbeat.observer:observer.py:80: [main] Heartbeat disabled in config2026-04-19 10:01:02 [INFO] ductor_bot.webhook.observer:observer.py:74: [main] Webhooks disabled in config2026-04-19 10:01:02 [INFO] ductor_bot.cleanup.observer:observer.py:78: [main] File cleanup started (media: 30d, output: 30d, api: 30d, hour: 3:00)2026-04-19 10:01:02 [INFO] ductor_bot.orchestrator.observers:observers.py:122: [main] Rule file watcher started (CLAUDE.md <-> AGENTS.md <-> GEMINI.md)2026-04-19 10:01:02 [INFO] ductor_bot.orchestrator.observers:observers.py:127: [main] Skill sync watcher started2026-04-19 10:01:02 [INFO] ductor_bot.config_reload:config_reload.py:151: [main] Config reloader started watching C:\Users\mjiva\.ductor\config\config.json2026-04-19 10:01:02 [INFO] ductor_bot.messenger.telegram.startup:startup.py:98: [main] Topic name cache seeded with 11 name(s)2026-04-19 10:01:03 [INFO] ductor_bot.messenger.telegram.startup:startup.py:138: [main] Bot online: @EscapeVelocityPMBot (id=8365158724)2026-04-19 10:01:03 [INFO] ductor_bot.orchestrator.core:core.py:408: [main] Multi-agent commands registered2026-04-19 10:01:03 [INFO] aiogram.dispatcher:dispatcher.py:596: [main] Start polling2026-04-19 10:01:03 [INFO] ductor_bot.multiagent.shared_knowledge:shared_knowledge.py:107: SharedKnowledgeSync watching C:\Users\mjiva\.ductor\SHAREDMEMORY.md2026-04-19 10:01:03 [INFO] aiogram.dispatcher:dispatcher.py:378: [main] Run polling for bot @EscapeVelocityPMBot id=8365158724 - 'EscapeVelocity'2026-04-19 10:01:08 [INFO] ductor_bot.multiagent.shared_knowledge:shared_knowledge.py:114: SHAREDMEMORY.md changed, syncing to all agents2026-04-19 10:01:14 [INFO] ductor_bot.logging_config:logging_config.py:137: Logging initialized (level=INFO)2026-04-19 10:01:14 [INFO] ductor_bot.workspace.init:init.py:288: Workspace init started home=C:\Users\mjiva\.ductor2026-04-19 10:01:14 [INFO] ductor_bot.workspace.rules_selector:rules_selector.py:145: Deploying rule files (variant: all-clis, claude=True, codex=True, gemini=True)2026-04-19 10:01:14 [INFO] ductor_bot.workspace.rules_selector:rules_selector.py:199: Deployed 48 rule files (Claude=True, Codex=True, Gemini=True)2026-04-19 10:01:15 [INFO] ductor_bot.workspace.init:init.py:306: Workspace init completed2026-04-19 10:01:15 [INFO] ductor_bot.i18n:__init__.py:43: i18n initialized: language=en2026-04-19 10:01:15 [WARNING] ductor_bot.infra.pidlock:pidlock.py:125: Stale PID file found (pid=24076), overwriting2026-04-19 10:01:15 [INFO] ductor_bot.infra.pidlock:pidlock.py:128: PID lock acquired (pid=45756)2026-04-19 10:01:15 [ERROR] ductor_bot.multiagent.internal_api:internal_api.py:98: Failed to start internal agent API on port 8799Traceback (most recent call last):  File "C:\Users\mjiva\pipx\venvs\ductor\Lib\site-packages\ductor_bot\multiagent\internal_api.py", line 96, in start    await site.start()  File "C:\Users\mjiva\pipx\venvs\ductor\Lib\site-packages\aiohttp\web_runner.py", line 121, in start    self._server = await loop.create_server(                   ^^^^^^^^^^^^^^^^^^^^^^^^^    ...<7 lines>...    )    ^  File "C:\Python313\Lib\asyncio\base_events.py", line 1622, in create_server    raise OSError(err.errno, msg) from NoneOSError: [Errno 10048] error while attempting to bind on address ('127.0.0.1', 8799): [winerror 10048] only one usage of each socket address (protocol/network address/port) is normally permitted2026-04-19 10:01:15 [INFO] ductor_bot.multiagent.supervisor:supervisor.py:667: AgentSupervisor stopped (all agents shut down)2026-04-19 10:01:15 [INFO] ductor_bot.infra.pidlock:pidlock.py:143: PID lock released2026-04-19 10:01:29 [INFO] ductor_bot.messenger.telegram.handlers:handlers.py:122: [main:msg:-1003843529562] Command dispatched cmd=/diagnose@EscapeVelocityPMBot2026-04-19 10:01:29 [INFO] ductor_bot.orchestrator.core:core.py:302: [main:msg:-1003843529562] Message received text=/diagnose@escapevelocitypmbot2026-04-19 10:01:29 [INFO] ductor_bot.orchestrator.commands:commands.py:233: [main:msg:-1003843529562] Diagnose requested

Relevant log output


LLM self-diagnosis (optional)

No response

Additional context

No response

Before submitting

  • [x] I have searched existing issues for duplicates.
  • [x] I am running the latest version.

mjivani avatar Apr 19 '26 06:04 mjivani

Symptom fixed in v0.16.0 (commit 5e38631).

ductor onboarding no longer aborts when an individual provider auth probe raises — you get a yellow-panel warning naming the provider + the exception, and the wizard continues as long as at least one provider is authenticated. Also hardened check_codex_auth against Path.home() raising RuntimeError on Windows (the rare case where %USERPROFILE% / %HOMEDRIVE% / %HOMEPATH% are all unset).

Heads up: reading your full traceback, the actual crash was OSError: [Errno 10048] — a stale ductor process holding port 8799 (the internal agent API). The "codex auth failed" Telegram message was a separate hint you saw earlier. I'm tracking the port-conflict detector as a separate follow-up since it needs a startup-path check rather than a wizard change. If you hit the same traceback again after upgrading to v0.16.0, run ductor stop (or kill the stale python.exe holding 8799) and try again — let me know and I'll ship the port-conflict detector next.

PleasePrompto avatar Apr 21 '26 10:04 PleasePrompto