WEB_DASHBOARD_ENABLED defaulted to false and was never set, so nothing
served the dashboard. Remove the server/routes, apps/dashboard,
apps/android, the dashboard-only settings modules (settings-store,
settings-store-moa, room-skill-settings, runtime-inventory,
codex-live-status, settings-effort), WEB_DASHBOARD_* config, the
web-dashboard-only startup mode, dashboard/android scripts and the
react/vite/playwright dependencies.
The Codex account refresh loop in settings-store is dropped with it: it
refreshed account index 0 through the shared ~/.codex/auth.json instead
of the isolated ~/.codex-accounts/0 used by the reviewer.
Host evidence loses the dashboard_dist / android_debug_apk artifact
kinds. The Discord status dashboard is unchanged. Room skill overrides
are still read from the DB by agent-runner.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Codex usage poll: run the repo-pinned CLI (0.159.3) instead of a global
0.128 install, hold the account lease while polling (skip if a run holds
it, so the poller cannot rotate a token under a live reviewer session), and
poll every 5 min instead of every minute (~1,440 app-server spawns a day).
- Claude usage poll: 5 min instead of 1 min. The 1-minute cadence only served
the auto-paired-mode gate, which is not wired into the runtime; it drew ~32
HTTP 429s a day.
- Dashboard duplicate cleanup: was a 2 s poll fetching 100 messages (~43k
Discord REST calls a day) plus a fetch after every edit. Clean up only when a
fresh status message is posted or on first render, with a 5 min sweep.
- Logging: one line per event and no ANSI colors outside a TTY (events were
split into ~11 journal lines). Progress-edit audits, Discord progress edits,
streamed-activity and per-bucket Codex usage logs move to debug; sends,
agent output and the usage summary stay at info.
- Two tests wrote under the real data/ipc and left fake room folders that the
live 1 s IPC watcher kept polling; they now clean up after themselves.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A NEEDS_CONTEXT from the owner or reviewer is a question only the user can
answer, and the arbiter's own rules say to ESCALATE it. Routing it through the
arbiter added a full turn first (13 of 23 arbiter calls in 30 days). Escalate
directly; BLOCKED and deadlocks still go to the arbiter.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex sessions always received owner-common-paired-room.md ("You are the
owner", branch rules) whatever the role, so the Codex reviewer never saw the
reviewer rules and answered with PROCEED/REVISE (26x/8x in 30 days).
The Claude arbiter runs with CLAUDE_CONFIG_DIR pointed at a directory that is
wiped before every run, and its CLAUDE.md was only written on the unsafe-host
path. In normal mode it ran with no rules at all, so 20 of 23 arbiter verdicts
in 30 days were free-form text the verdict parser could not read.
Pick the paired-room prompt by role (owner / reviewer / arbiter) for Codex
AGENTS.md, and write the role CLAUDE.md into the reviewer/arbiter config dir
in normal mode as well. The readonly-session builder now shares that code.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Mark confirmed items (prompt bugs, failover removal, web dashboard /
android / glasses deletion, rotation simplification, natural-language
stop replacing session commands, launcher old-installer cleanup), drop
the single-mode conversion, and explain the three remaining decisions
(review skip, finalize-turn alternatives, main room role) in plain terms.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Evidence-backed audit (code, runtime, token usage) with 36 numbered
candidates, priorities, risks and open decisions. Includes two prompt
wiring bugs (arbiter gets no rules in normal mode, Codex reviewer gets
owner rules) and the dead codex-main failover handoff path.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- GPU: driver/library mismatch can be fixed by reloading the nvidia modules
(procedure + what to stop), done 2026-10-01 without a reboot
- KAclaw: now claude-opus-5-5 on SDK 0.3.286, backup location, the expired
refresh token and the re-login runbook; note that the Claude CLI ignores
CLAUDE_CREDENTIALS_PATH so per-account tests need CLAUDE_CODE_OAUTH_TOKEN
- git.tkrmagid.kr remotes no longer carry the token; document the
secrets.json-backed credential helper
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>
The reviewer's Codex app-server logged "failed to refresh available models:
failed to decode models response: unknown variant `max`" on every run: the
server now advertises a `max` reasoning effort the old CLI cannot parse. Each
failure also dumped the whole models payload (instruction templates included)
into the service journal.
The pin was misleading: codex-runner actually resolved an untracked stale
runners/codex-runner/node_modules/@openai/codex 0.124.0 from 2026-04-26 that
shadowed the root workspace copy, so earlier version bumps never reached the
runner. That nested copy (not in bun.lock, gitignored) was removed on the host
so the runner resolves the lockfile-managed root install.
End-to-end check through the real CodexAppServerClient with the reviewer's
account: thread start, turn, goal set/get, close and thread resume with context
retained all succeed, with 0 app-server errors (was 2 per run) and a simple
turn taking 5s instead of 49s.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Codex auth lease is exclusive per account so two Codex processes never
rotate the same refresh token at once. With the single configured account that
also serializes every Codex run, and claimCodexAuthLease() failed immediately
while another room's Codex run held it: the turn errored with "Codex rotation
pool unavailable", the task closed as reviewer_codex_unavailable and the
review was silently skipped.
All three such failures on 2026-09-28 coincided exactly with another room's
Codex run holding the lease (10:25:55, 18:08:25, 18:22:50 KST).
runAgentProcess now waits (up to 15 min, polling every 2s) when the only
obstacle is a lease held by a live run. A dead or rate-limited pool still
fails fast, and the normal path adds no async hop because the wait is only
entered when the lease is actually busy. The exclusivity itself is kept.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude Opus 5.5 (claude-opus-5-5) is rejected by the bundled Claude Code CLI
2.1.153 with "does not support this model; version 2.1.280 or newer is
required". Bumping the SDK brings the bundled CLI to 2.1.286.
Verified end-to-end against EJClaw's own credentials through the real SDK and
binary: claude-opus-5-5 returned a normal completion after the upgrade (it
errored with the 400 before), and claude-opus-5 still works.
The model switch itself lives in .env (untracked): CLAUDE_MODEL=claude-opus-5-5.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
syncTrackedProgressMessage() logged "no longer owns the active paired turn
attempt" and returned, but left the 5s progress ticker running. Losing the
attempt is permanent — ownership only flips back to 'active' when a new
attempt claims the turn under its own runId — so a superseded run kept waking
every 5s for the entire life of the following turn (165 wakeups observed in
one room) while editing nothing. The channel's progress message stayed frozen
for the whole next turn, so a room that was actively working looked hung.
Clear the ticker on ownership loss, matching the repeated edit-failure path.
The regression test asserts on the ownership probe rather than editMessage:
a leaked ticker and a stopped one both produce zero edits, so counting edits
cannot distinguish them.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
preparePairedExecutionContext bailed out early when group.workDir was null,
which made the ensurePairedProject() self-heal directly below it unreachable.
A tribunal room registered without work_dir therefore produced no paired
execution context at all: the turn output was never persisted, the task
revision stayed frozen and the 10-minute execution lease was never released,
so every follow-up human message inside that window was silently dropped and
the room appeared to stop answering.
Single-mode rooms still bail out via ensureActiveTask returning null.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The owner and reviewer each resume a persistent session that already
holds the running paired thread, yet buildOwnerPendingPrompt /
buildReviewerPendingPrompt re-sent the ENTIRE accumulated turnOutputs
list every turn, so the prompt grew linearly with round-trips for no
benefit. Only the arbiter path was capped.
Reuse the arbiter's latestTurnOutputMessagesWithOmissionMarker cap
(now a shared TURN_OUTPUT_CONTEXT_LIMIT = 6) so owner/reviewer prompts
send at most the 6 most recent outputs plus an omission marker. On a
long ping-pong task this bounds per-turn prompt size instead of
re-sending every prior round's output. Behavior for tasks with <=6
outputs is unchanged.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The user should be able to choose from the last arbiter message alone, without
scrolling back through the owner↔reviewer conversation. Instruct the arbiter, on
ESCALATE, to restate the decision in one sentence and list the options as a
short numbered list with per-option consequences, including only the minimum
context needed. Prompt files are read per-turn, so this is live immediately.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
When a paired task ends on an arbiter ESCALATE (asking the user to choose), the
user's next reply was carried into the fresh task with the owner's earlier final
as context — not the arbiter message they were actually responding to. Generalize
the carry-forward to the latest user-facing final (owner final OR arbiter
verdict, whichever the task ended on), so the user can choose based on the last
arbiter message without the new turn re-reading the whole prior conversation.
The carried-forward guidance marker is now matched by a shared prefix so it
triggers for both. Adds tests for the arbiter-escalation carry and the prefix
guidance.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Move the storeMessage → enqueueMessageCheck side effect out of the delivery
callback into scheduleAutoContinueForPhantomFinal so the injection path is
directly unit-tested: an auto-continue outcome for a delivered final injects the
corrective nudge as an ipc_injected_human message and re-enqueues a turn, while
a non-auto-continue outcome or an undelivered final does nothing. Behavior is
identical to the inline version — this only adds test coverage and a no-op
refactor, so no redeploy is required.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Extends the phantom-notification guard: when a non-paired turn dead-ends on an
"I'll wait … I'll be notified" final with no watcher registered, re-invoke the
agent once (inject a corrective nudge as an inbound instruction + re-enqueue) so
it actually finishes the work in the foreground, rather than only appending a
"send a follow-up" notice. A hard per-chat cap (max 1 re-run per phantom streak,
reset on any clean final) makes it loop-safe — a model that keeps producing the
dead-end can never spin the bot. Paired rooms are excluded because they already
continue on their own (owner → reviewer → …). Pure cap/decision logic is unit-
tested; reuses the proven ipc_injected_human + enqueueMessageCheck path.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
An agent could end a turn with "I'll wait for the build to complete — I'll be
notified" without registering any watcher, so nothing ever resumed and the user
was left staring at a dead-end (observed in the tts_site room). The prompt rule
alone did not stop the model. At final-delivery time, when the final reads like
such a phantom-notification dead-end AND no CI watcher is active for the chat,
append an explicit notice telling the user no notification is coming and to send
a follow-up — turning a silent hang into an actionable prompt. Pure detector +
guard with unit tests; wired into the owner/reviewer final-delivery path.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
A tribunal room whose work_dir was never provisioned (null) made
resolveOwnerTaskForHumanMessage return a null task, so the owner never ran and
the room went completely silent — the user's messages got no reply at all (seen
in the tts_site room, where days of requests were dropped). ensurePairedProject
now provisions the canonical workspace on demand when work_dir is missing,
guarded to tribunal rooms so a single-mode room never gets a spurious paired
workspace. Idempotent via ensurePairedWorkspaceProvisioned. Adds tests for both
the tribunal self-heal and the single-mode no-op.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The "does not carry forward by default" test in paired-execution-context.test.ts
read the real config, so enabling PAIRED_CARRY_FORWARD_LATEST_OWNER_FINAL in
this deployment's .env flipped its result and it failed. Pin the flag to false
in that suite (mirroring the flag-on carry-forward.test.ts which pins true) so
the unit test is deterministic regardless of the ambient .env. Full suite is
green again with the flag enabled: 1595 pass / 3 skip / 0 fail.
Also gitignore the .ejclaw-*images-*/ and .ejclaw-attachment-*/ scratch dirs
that outbound-attachments tests create in the repo root; they only leak when a
test run is interrupted mid-flight and would otherwise clutter git status.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Owner continuity:
- Seed a freshly created owner task with the previous task's latest owner
final on a cold start after the previous task already closed, so a user
reply to a finalized TASK_DONE no longer produces a "no context" answer.
Activated for this deployment via PAIRED_CARRY_FORWARD_LATEST_OWNER_FINAL
(.env); carried text is injected as clearly-marked background only.
- Skip intermediate STEP_DONE outputs when picking the carry-forward anchor.
Single-mode routing:
- enforceRoomModeOnLease strips a stale reviewer/arbiter lease from a room
switched back to single, preventing single-mode messages from stalling in
the paired path on a stuck execution lease.
Session auth / credentials:
- Pre-sync Claude credentials into each session dir before the agent spawns.
- Honor CLAUDE_CREDENTIALS_PATH in setup/login.ts (per-service isolation).
- Add a relogin-required gate so a permanently logged-out claude-code room
asks the user to re-login instead of spawning a doomed agent.
Other:
- Arbiter verdicts written in the user's language (verdict keyword stays EN).
- status-dashboard chatName field; runtime-inventory credential path resolver.
Tests (make suite fully green: 1595 pass / 3 skip):
- service-routing: default owner is now the claude service and reviewer is
codex-review; update the 7 failover/default expectations accordingly.
- migrate-room-registrations: owner inferred as claude-code (configured
OWNER_AGENT_TYPE) for a dual legacy room; reviewer becomes codex.
- register: mock paired-workspace provisioning + reload signal (registration
now provisions a workspace and hot-reloads); assert RELOADED status.
- paired-execution-context: force a claude-code reviewer to exercise the
Claude read-only branch regardless of the deployment default.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
A final answer over 2000 chars edited straight into the tracked progress
message was rejected by Discord (content[BASE_TYPE_MAX_LENGTH]), leaving a
failed edit + stale progress stub before the send fallback. editMessage
now edits the tracked message with the first 2000-char chunk and sends the
remainder as follow-up messages, so long finals land cleanly in order.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
detectDirectRuntimeVersion switched on command.file === 'bun'|'node', so
a resolved absolute path (e.g. /home/claude/.bun/bin/bun) fell through to
"host:<path>" and lost the version. Match on path.basename so the version
probe fires and runtimeVersion stays "host:bun@<ver>" regardless of how
the package-manager command was resolved.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
A resumed Claude session that grew past the model's context limit failed
every turn with "Prompt is too long" — even auto-compaction could not
shrink it — so the same oversized session was reused indefinitely and the
channel looped forever on that error (no Claude reset pattern matched,
unlike Codex). Add "prompt is too long" / context-limit patterns to
SESSION_RESET_PATTERNS so the poisoned session is cleared and the next
turn starts fresh.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Agents ended turns with "I'll wait … I'll be notified" expecting a
background-completion callback that this environment never delivers, so
the turn hung and left the planning sentence stuck in the channel. Add a
claude-platform rule that no such notification exists — finish within the
turn (foreground/poll) or ask the user for a follow-up.
Also suppress the elapsed-time suffix on progress messages until at least
one 5s bucket has elapsed, so freshly-created progress no longer shows a
meaningless "0초". Update the affected message-runtime expectations.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
claude-credentials-path.ts is imported by token-refresh/claude-usage/
agent-runner-environment/runtime-inventory; committed tree already
depends on it. claude_relogin.sh is referenced by token-refresh.ts as
the manual recovery step; codex_relogin.sh mirrors the Codex re-auth
runbook. Drop stray empty .codex file.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Ports from isolated upstream-port branch (base b3c5a4b), verified in
isolation via baseline-vs-port failure-set diff and re-verified live
(195 pass / 0 fail on affected tests):
- redact Discord bot tokens in outbound (router.ts SECRET_PATTERNS)
- block SSRF to private hosts in MoA base URL (moa.ts)
- refuse public dashboard bind without auth token (web-dashboard-server.ts)
- merge upstream .gitignore rules for python/build/secret noise
- real CPU utilization from /proc/stat instead of load avg (unified-dashboard.ts)
- width-safe placeholder for missing usage window on mobile (unified-dashboard.ts)
- bump direct deps to patch known vulnerabilities (discord.js/yaml/cron-parser)
Risky upstream commits (d5a94af phantom reset-time, patch 6 Codex usage)
intentionally skipped to avoid touching the credential-isolation tree.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
When an agent turn fails, users only saw "요청을 완료하지 못했습니다. 다시
시도해 주세요." with no clue why. Capture the failure reason (explicit
error field, or provider-error text like "API Error: 529 Overloaded"
classified by detectClaudeProviderFailureMessage) in the turn controller
and append it to the failure message ("...\n\n오류 내용: <reason>",
secret-redacted + length-capped). Update the paired-room loop filter to
startsWith so a failure-with-reason is still recognized and not
re-injected into prompt history. Unit-tested.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The raw sendMessage/editMessage paths did not route through
sanitizeForOutbound, so an agent-authored @everyone/@here in a progress
or edited message could still ping the whole channel. Set a client-level
allowedMentions default (parse: ['users']) so no normal send/edit can
mass-ping; explicit <@id> user mentions still work, and the disk-usage
alert broadcasts via a separate REST path with its own allowedMentions.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Agent-authored replies pass through sanitizeForOutbound before Discord
send, but it did not touch mass-mention tokens — so a reply that merely
*mentioned* "@everyone" while explaining a feature pinged the whole
channel. Add neutralizeMassMentions (zero-width space after @) to the
central sanitizer so normal reply/progress/edit text can never mass-ping;
intentional broadcasts (e.g. the disk-usage alert) use a dedicated path.
Leaves <@id> mentions and emails intact. Covered by unit tests.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Self-contained single-call Korean AI-tell humanizer skill for EJClaw's
runner-skill sync. Derived from epoko77-ai/im-not-ai @0ac1e84 (MIT):
adapted the codex single-call path to return the rewrite inline in chat,
bundled only the 3 rulebooks it reads, and made reference paths runtime
-neutral (Claude + Codex). Includes upstream LICENSE + NOTICE for MIT
attribution. No external/paid API — runs on the session model only.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Making a channel registration live no longer depends on an operator/agent
remembering to restart. setup/register.ts and scripts/deregister-room.ts now
call signalEjclawReload() after the DB write, which sends SIGHUP to the running
service's main PID (→ runtimeState.reloadRoomBindings). Best-effort and
injectable-for-tests; no-ops when the service isn't running.
Also document the canonical rule in the committed, agent-loaded platform prompt
(prompts/claude-platform.md): prefer these paths, never fake a restart, verify
via the "Room bindings reloaded" log; a plain in-turn systemctl restart is
forbidden (it kills the agent).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Registering/deregistering a channel via a DB write from a non-main room did not
take effect until a full restart, and restarting from inside an agent turn is
unreliable (the agent is a child of ejclaw.service, so `systemctl restart` kills
it mid-command and it can't be confirmed) — the source of repeated "auto-restart
missing / claimed restart but it didn't happen" failures.
Add a SIGHUP handler that calls runtimeState.reloadRoomBindings(), which re-reads
ONLY room bindings from the DB (cursors/sessions untouched, no re-processing).
`kill -HUP <MainPID>` then makes a registration live instantly with no restart
and no agent death, so it is verifiable in the same turn.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Record the recently deployed operational changes: minute-boundary + event-driven
status dashboard refresh with edit-retry-before-repost, Claude session→canonical
token write-back (with corrected session credential path scan) to prevent
invalid_grant family revocation, and the deregister-room purge tool.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
listSessionCredentialPaths scanned <sessions>/<folder>/.claude/.credentials.json,
but real session creds live at
<sessions>/<folder>/services/<serviceId>/.claude/.credentials.json (and under
tasks/<taskId>/...). The mismatch meant writeCredentials' fan-out and
loadFreshestCredentials' stale-copy scan silently missed every real session
file — so old refresh-token copies (family-revocation landmines) were never
overwritten and the session→canonical write-back could not converge dormant
sessions.
Rewrite it via the pure, tested collectSessionCredentialPaths that walks the
actual services/<id>/.claude and services/<id>/tasks/<id>/.claude layout.
Verified on live data: now matches all 24 real session credential files (was 0).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Root cause of recurring "Refresh token expired / invalid_grant" logouts: the
main refresh loop and each agent session's Claude CLI share one OAuth token
family but refresh independently. Anthropic rotates refresh tokens and revokes
the whole family if an already-rotated token is reused, so when a session
refreshed mid-turn the canonical copy went stale and its next refresh was
rejected — forcing a manual re-login.
Add syncClaudeSessionAuthBack (mirrors the existing Codex syncCodexSessionAuthBack):
after each Claude turn, if the session's CLAUDE_CONFIG_DIR credentials are
strictly newer than canonical (and same subscription), adopt them into the
canonical file. writeCredentials then fans the current token out to every
session dir, so no stale copy lingers to trigger family revocation. Decision
logic extracted to the pure, tested shouldAdoptSessionOAuth.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Deregistration only removed the base group folder, leaving the tribunal
reviewer/arbiter runtime behind: DB session rows keyed as "<folder>:reviewer"
/":arbiter" and on-disk dirs data/sessions/<folder>-reviewer/-arbiter (plus
ipc/workspaces variants). Include those role-suffixed variants in both the
sessions DELETE and the disk cleanup so a deregistered room leaves nothing.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Instead of a fixed 60s interval from an arbitrary start offset, the base status
refresh now fires on each wall-clock minute boundary (:00), keeping the
minute-precision timestamp shown in the message accurate. Event-driven updates
(new message / agent activity) still refresh in between. Adds
msUntilNextMinuteBoundary with tests.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The retry refactor captured `const editMessage = channel.editMessage` and
called it detached, losing `this`. Every status edit then threw
"this.client is undefined", so each cycle failed all retries and reposted a
fresh (notifying) status message — ~50 reposts in 30 minutes. Bind the method
to the channel so the edit runs in place. Adds a regression test showing a
detached method fails while a bound one succeeds.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Raise the status dashboard base refresh from 10s to 60s, and refresh
immediately (debounced 1.5s) on events between ticks:
- a real chat message arrives in a registered room (index.ts onMessage)
- an agent starts/finishes a run, i.e. activity moves between rooms
(GroupQueue.setOnActivityChange fired on activeCount changes)
requestImmediateStatusUpdate() drives updateStatus out-of-band via a coalescing
trigger. The existing re-entrancy guard means the base periodic refresh does not
run while an edit-retry is in flight; a refresh requested during that window is
remembered and runs once afterward. Adds createCoalescingTrigger with tests.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The 15s x2 edit-retry-before-repost policy is meant for transient blips during
steady-state operation, not the moment right after a (re)start. On the first
render after startup, use 0 retries: still edit the stored message in place if
possible, but if that edit fails, repost a fresh status message immediately
instead of waiting through the retry cycle. Subsequent ticks use the 2-retry
policy.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
A transient Discord error (e.g. HTTP 503) on the periodic status-message edit
previously caused an immediate repost of a fresh status message. Now the edit
is retried up to 2 more times at 15s spacing, and a fresh message is only sent
if every attempt fails. Retry logic is extracted into the testable
editStatusMessageWithRetry helper (injectable sleep). Added a re-entrancy guard
so overlapping interval ticks are skipped while a slow retry runs, preventing
double-posts.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>