The owner may end a TASK_DONE answer with "리뷰 불필요: <reason>". The
host treats it as a request and honors it only when every guard holds:
- workspace content equals the task base (hasCodeChangesSinceRef), the
working tree is clean, and HEAD did not move during the owner run
- the run used no file-mutating tool (Edit/Write/MultiEdit/NotebookEdit),
no subagent (Agent/Task) and no state-changing or unknown MCP tool
- every Bash command is classified read-only by a conservative
quote-aware classifier (src/bash-command-classifier.ts); anything
unknown counts as mutating
- tool usage was reported and not truncated (agent-runner now reports
tool names and Bash commands as toolUsage on its terminal output)
- the user did not ask for a review in this task
When honored the task completes as review_skipped with no reviewer or
finalize turn; the answer is delivered with the marker line removed and a
small "-# 검토 생략 …" note. Otherwise the marker is stripped and the
normal review runs. A bare "검토해줘"-style message right after a
review-skipped answer reopens that task for the reviewer.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each paired room used to resume one owner (and one reviewer) session for
weeks, so every call re-read a huge unrelated history (median ~260k input
tokens). A stored session is now resumed only while it belongs to the
running paired task; the first turn of a new task starts fresh and the new
session is bound to that task (router_state paired_session_task:<folder>,
survives restarts). Later turns of the same task (revisions, follow-up
human messages while the task is open) keep resuming it. Arbiter was
already fresh per call; single rooms are unchanged.
The previous task's final answer still reaches the new session through the
carried-forward turn-0 output, so PAIRED_CARRY_FORWARD_LATEST_OWNER_FINAL
now defaults to true.
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>
CODEX_WARMUP_ENABLED defaulted to false and was never set, so the
warm-up loop in unified-dashboard never ran. Remove the loop, the
`enabled` / `intervalMs` config keys, the `disabled` result and the
`shouldSkip` hook it alone used. The fixed-slot usage primer keeps
calling runCodexWarmupCycle with forceAttempt exactly as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Nothing in src/, setup/, scripts/ or test/ imports them; only
runners/agent-runner uses zod and the MCP SDK, and it declares both in
its own package.json. bun.lock regenerated with --lockfile-only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The service only runs under Linux systemd. Remove setupLaunchd,
setupNohupFallback, buildLaunchdPlist, the launchd/nohup service checks
in setup/verify-services.ts, ServiceDef.launchdLabel, launchd/ and the
unused repo-tokens/ GitHub action. Without systemd, `setup --step
service` now fails with systemd_unavailable instead of writing a nohup
wrapper.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Delete exported symbols that nothing in src/, setup/, scripts/ or
runners/ references (and no test exercises), iterated to a fixed point:
service-routing lease/failover helpers, paired-workspace-manager
fingerprint/registration helpers, message-runtime-rules trigger helpers,
utils.fetchWithTimeout, detectPnpmStorePath, isCodexMainService,
isDeltaHandoffEnabledForGroup with the unused DELTA_HANDOFF config, the
deprecated db/schema.applySchemaMigrations alias, unused db wrappers
(memories, router state, sessions-by-agent-type, room skill override
writes, recent chat/turn-output queries) and a few unused type aliases.
Orphan files: src/dashboard.ts + src/dashboard-status-content.ts (only
referenced each other), src/restart-context-cli.ts (never invoked) and
the unused src/config/index.ts barrel.
Service-handoff / channel-owner-lease code is left for a later batch.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
src/auto-paired-mode.ts had no production importer. Remove it together
with the helpers only it used: getClaudeUsageExhaustion /
isClaudeUsageExhausted in claude-usage.ts and getCodexUsageExhaustion /
isCodexUsageExhausted in codex-usage-collector.ts, plus their tests.
auto-paired-mode-state.json stays in the data-state allowlist: the live
data dir still has that file and an unknown state file is a startup
precondition failure.
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>
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>