Skip to content

fix: support OpenClaude Codex auth path and disable broken agent chat#21

Draft
pedrotecinf wants to merge 16 commits intoEvolutionAPI:developfrom
pedrotecinf:fix/codex-openclaude-agents
Draft

fix: support OpenClaude Codex auth path and disable broken agent chat#21
pedrotecinf wants to merge 16 commits intoEvolutionAPI:developfrom
pedrotecinf:fix/codex-openclaude-agents

Conversation

@pedrotecinf
Copy link
Copy Markdown

Summary

This PR fixes two issues affecting EvoNexus when running with openclaude and Codex OAuth:

  1. openclaude was installed but not detected because the service/runtime PATH did not include user-local install
    locations such as ~/.npm-global/bin.
  2. Agent pages could open the structured Chat UI even when the active provider was codex_auth, but that flow still
    depended on the Anthropic SDK and failed with Not logged in · Please run /login.

What changed

  • Extended CLI path resolution to include common user-local bin directories.
  • Applied that resolution consistently across:
    • dashboard provider checks/tests
    • terminal session spawning
    • ADW runner execution
    • service startup PATH
  • Updated the agent detail page to treat agent Chat as unsupported when the active provider is not native claude.
  • Forced agent pages to fall back to Terminal mode under OAuth/OpenClaude until the chat bridge becomes provider-
    aware.
  • Added .gitignore entries for local EvoNexus workspace/runtime data to reduce accidental commits of personal
    conversations and logs.

Files changed

  • ADWs/runner.py
  • dashboard/backend/routes/providers.py
  • dashboard/terminal-server/src/claude-bridge.js
  • dashboard/frontend/src/pages/AgentDetail.tsx
  • start-services.sh
  • .gitignore

Behavior before

  • Providers page could show 'openclaude' not found in PATH even when it was installed in ~/.npm-global/bin.
  • Agent terminal/provider flow could work while agent Chat still failed with:
    • Claude Code returned an error result: Not logged in · Please run /login

Behavior after

  • EvoNexus resolves openclaude correctly from common user-local install paths.
  • Codex OAuth/OpenClaude users can use agents through Terminal mode without hitting the broken Anthropic chat path.
  • The UI now avoids exposing a chat mode that is known not to work for non-Anthropic providers.

Validation

  • Verified openclaude --version resolves successfully from the corrected path.
  • Restarted services with updated startup PATH.
  • Confirmed terminal-server logs show agent PTY sessions starting with openclaude.
  • Built the frontend successfully with npm run build.

Notes

This PR does not fully implement provider-aware support for dashboard/terminal-server/src/chat-bridge.js.
It prevents the broken UX path for now. A future PR can make the structured agent chat layer work with openclaude/
Codex OAuth as well.

DavidsonGomes and others added 16 commits April 14, 2026 16:48
When systemd restarted the service, concurrent scheduler processes would
pile up causing routines (e.g. morning briefing) to fire multiple times.
acquire_lock() checks for a live PID on startup; release_lock() cleans
up the PID file on SIGINT/SIGTERM.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace TOCTOU-prone check-then-create with O_CREAT|O_EXCL atomic open.
Prevents multiple schedulers from starting simultaneously during rapid
restarts, which caused routines (review-todoist, git-sync) to fire
multiple times and send duplicate Telegram messages.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…mctl

systemctl restart on Type=oneshot + KillMode=none doesn't reliably kill
child processes. New approach: pkill processes directly then re-run
start-services.sh — works without sudo and actually restarts everything.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude CLI does not have a -p flag — prompt must be passed as a
positional argument. The old -p flag caused the YAML frontmatter
(---) to be interpreted as an unknown CLI option, failing all
heartbeats with: unknown option '---\nname: "zara-cs"'.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The dashboard was running scheduler.py both as a standalone process
(via start-services.sh) and as an embedded thread (app.py), causing
every routine to fire 2-3x per trigger. Removed the _run_scheduler
thread; kept a lightweight _poll_scheduled_tasks thread for one-off
ScheduledTask DB entries only.

feat(fin): add Evo Academy as revenue source in financial skills

fin-daily-pulse, fin-weekly-report and fin-monthly-close-kickoff now
pull data from the Evo Academy Analytics API (summary, orders, subs)
and consolidate it alongside Stripe and Omie. MRR, daily revenue and
P&L now reflect courses, subscriptions and Summit tickets.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- prod-end-of-day: Step 5 now reviews Todoist directly instead of
  calling /prod-review-todoist as sub-skill, which was sending its
  own Telegram notification before the EOD notification — causing 2x
  Telegram per EOD run

- pulse-faq-sync: explicit instruction to send exactly ONE Telegram
  message combining summary + alerts, instead of splitting into
  multiple reply() calls

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @pedrotecinf, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@DavidsonGomes DavidsonGomes changed the base branch from main to develop April 22, 2026 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants