Before, a Claude run that hit the account usage limit closed the open
paired task as claude_usage_limit, posted the reset time and consumed the
user's messages, so the work was lost and had to be re-requested.
Now the room is paused instead:
- The failed turn is released without touching the paired task (no
failure count, no status change, no follow-up) and the queue keeps the
human messages unconsumed, so the same turn can run again.
- The room is recorded in router_state `claude_usage_pause` with the reset
time (error text, else cached usage API reset, else a 10 min retry). A
banner time that just passed is read as "now", not tomorrow.
- While the limit lasts, paused rooms run nothing and any other room's
Claude turn pauses that room without spawning a run (the limit is
account-wide). A stop request still goes through and drops the room
from the resume list.
- The scheduler tick clears the pause 1 min after the reset, posts a
resume notice and re-queues the rooms; the pending turn or the kept
messages then run again. The state survives restarts.
Safety refusals keep closing the task as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When Claude hit a limit the run was handed to a Codex service
(codex-main/codex-review) through service_handoffs and a global owner
failover. That service does not exist in this deployment, so handoffs
stayed pending forever (2 rows since May) and the user got no answer.
Removed:
- handoff creation (message-agent-executor-handoff, paired-turn-fallback)
and the delegated paired-execution path
- the pending-handoff poll/claim worker (message-runtime-handoffs) and the
service_handoffs CRUD module (db/service-handoffs, db exports)
- global owner failover in service-routing, its recovery timer in index,
the dashboard failover line, the codex-review failover prompt pack and
prompts/codex-review-failover-platform.md
- failoverOwner in RoomRoleContext and the `failover=` ROOM_ROLE field
- OWNER_/REVIEWER_/ARBITER_FALLBACK_ENABLED and FAILOVER_MIN_DURATION_MS
- tests for the removed behaviour
Now, when a Claude run fails with a usage/rate limit (trigger reason
429 or usage-exhausted) the executor closes the open paired task as
completed/claude_usage_limit and sends the room one final notice:
"Claude 사용 한도에 도달했습니다. 21:40에 재개할 수 있습니다." The reset time
comes from the error text (CLI banner "resets 9:40pm (Asia/Seoul)", dated
banners, "try again at ...", ISO timestamps), else from the cached usage
API window at 100%, else "잠시 후 다시 시도해 주세요". Nothing retries
silently; the next user message starts a new task. Other Claude failures
(session failure, org access denied) now end as ordinary run errors.
The service_handoffs table, its columns on paired_turn_attempts and the
migrations stay untouched for the later migration squash; the runtime no
longer reads or writes them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The deployment has a single Claude OAuth credential and a single Codex
ChatGPT account, so the N-account rotation machinery only added state
files, cooldown bookkeeping and code paths that never ran.
Removed:
- Claude token rotation (token-rotation.ts, token-rotation-base.ts):
rotate-on-limit, per-token cooldowns, token-rotation-state.json.
CLAUDE_CODE_OAUTH_TOKENS is still read, but only its first entry.
- Codex account rotation (codex-token-rotation.ts): account pool,
rotate-on-429/auth, dead-auth/cooldown tracking, round-robin advance,
d7 auto-rotate, codex-rotation-state.json, manual account switch.
- Account index plumbing in token-refresh, claude-credentials-path
(CLAUDE_ACCOUNTS_DIR / ~/.claude-accounts/<n>), Claude/Codex usage
collectors, the dashboard rows and the Codex warm-up.
- provider-retry.ts rotation loops and the Codex retry path.
Kept:
- Codex exclusive auth lease (one Codex run at a time), the 15-minute
waitForCodexAuthLease, and a usage-poll lease that skips while a run
holds the account (codex-auth.ts).
- Session auth copy and write-back of refreshed tokens
(syncCodexSessionAuthBack, syncClaudeSessionAuthBack).
- Codex auth path: ~/.codex-accounts/0/auth.json, else ~/.codex/auth.json
(now resolved per run, so a re-login needs no restart).
- Claude token refresh loop, CLAUDE_CREDENTIALS_PATH and the
CLAUDE_TOKEN_REFRESH_* / CLAUDE_USAGE_USE_HOME_CREDENTIALS flags; an
auth-expired run still force-refreshes the token and retries once.
- Error classification (classifyClaudeTrigger, classifyCodexTrigger).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
No room has room_settings.is_main = 1, so every main-only path was dead,
and admin work is done from the host shell. Each room's agent may now
only act on its own room:
- IPC: messages/inbound injection only to the source room; schedule,
update, pause, resume and cancel only for the source room's tasks;
drop the assign_room and refresh_groups IPC tasks and the deps they
needed (assignRoom/syncGroups/getAvailableGroups/writeGroupsSnapshot)
- DB/host evidence is always scoped to the source group folder
- runner MCP server: drop the assign_room tool, the target_group_jid
parameters and the isMain flag; list_tasks shows only the room's tasks
- drop EJCLAW_IS_MAIN, RunnerInput.isMain and AgentInput.isMain; the
global CLAUDE.md memory is now included for every room
- drop the available_groups.json snapshot (available-groups.ts), the
inferred restart announcement that only went to the main room, and
the unused Channel.syncGroups hook
- setup register: drop --is-main; deregister-room: drop the main-room
refusal and --force, and fix its unknown[] binding type error
- remove the groups/main/ template
The room_settings.is_main column and migrations are untouched; new rows
get the column default (0) and nothing reads it anymore.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Remove the /compact, /clear and /stop session commands. They were gated
to the main room or SESSION_COMMAND_ALLOWED_SENDERS, neither of which
exists in this deployment, so nobody could use them. The agent-runner
/compact passthrough goes with them.
Instead, a short human message whose whole intent is "stop" (그만, 멈춰,
중단해, 하지 마, 취소, stop, cancel, ...; see src/stop-intent.ts) stops the
room when it has something to stop: a running or queued run, an open
paired task, or unprocessed human messages before it. The message loop
then
- advances the room cursors past the stop message (memory + router_state)
- completes the open paired task as user_stopped, cancels its open turns
and drops its execution lease
- closes stdin with a user-stop reason and kills the agent through the
existing GroupQueue.closeStdin/killProcess
- replies "진행 중이던 작업을 중단했습니다." once
When nothing is running the message is handled as a normal message.
The user-stop close reason is treated like a human interruption, so the
killed paired turn releases its lease without counting a failure and
queues no follow-up, and the turn controller does not post the generic
failure text on top of the stop reply.
advanceLastAgentCursor no longer moves a cursor backwards, so a run that
finishes after the stop cannot rewind the cursor and re-dispatch the
stop message (the respawn seen when an agent was only killed).
Stale SESSION_COMMAND_* keys in .env are now ignored instead of failing
startup.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MOA_* was never configured, so enrichArbiterPromptWithMoa always
returned the prompt unchanged and the Kimi usage fetch only produced an
empty dashboard row. Remove src/moa.ts, src/kimi-usage.ts, the arbiter
prompt enrichment, MoA config/schema, the Kimi row and MoA line in the
Discord status dashboard, and the MOA_* / unused FALLBACK_* provider
examples from the docs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Global memory (groups/global/CLAUDE.md):
- add a model/runtime section: current versions (Opus 5.5, SDK 0.3.286,
Codex 0.159.3), the model upgrade checklist, the stale nested
node_modules and single-Codex-account gotchas, and the 09-19..10-01 fixes
- fix the garbled credentials paragraph and list every stored credential key
- correct the reviewer description (reviewer is codex, arbiter claude-code)
- the tmpfs/RAM watchdog it described no longer existed; point to the
restored /home/claude/tmpfs-ram-watchdog.sh
- refresh stale host facts (tmpfs/disk sizes, nvidia-smi version-mismatch
after driver auto-updates means "reboot pending", not "GPU broken")
- include the Windows CI runner section written on 2026-09-23 that was
already live but never committed
Docs and skills:
- README / configuration.md / .env.example: current SDK and model
versions, per-room reviewer/arbiter override, real attachment types,
existing OpenAI Whisper fallback, src-based service and detached restart
- architecture.md: registered_groups is gone; RestartPreventExitStatus only
applies to setup-rendered units
- setup/debug/customize skills: canonical DISCORD_*_BOT_TOKEN keys (the old
alias now aborts startup), Bun instead of Node, Codex OAuth login instead
of OPENAI_API_KEY, drop ignored register flags, journald instead of
logs/*.log, room_settings query instead of registered_groups, bun run test
- CONTRIBUTING: drop the reference to the nonexistent /add-telegram skill
- legacy-compat-removal-spec: mark as implemented/historical
- CHANGELOG: add an Unreleased section for the recent fixes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat: refresh dashboard settings UX and Codex feature toggles
Improve settings/tasks mobile layout, model effort validation by agent type, and preset models for GPT 5.5 and Opus 4.7. Store Codex fast mode and goals in config.toml with Claude fastMode session sync and updated docs for Codex 0.133.
Co-authored-by: Cursor <cursoragent@cursor.com>
* style: apply pre-commit formatting after dashboard settings commit
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: Cursor <cursoragent@cursor.com>