Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

Commits on main

fix(agent): make the cap pause binding on sub-agent dispatch, and stop hiding backstop deaths\n\nA turn that reached its model-call cap requested a graceful pause and then\ndispatched another sub-agent in the same second. `SteeringCommand::Pause` is\nadvisory — honoured at the harness loop boundary — and nothing consulted it\nbefore dispatching, so the new child ran as a tool call wrapped by the run's\nremaining wall-clock budget, overran it, and the harness failed the whole run.\nEvery result the turn had accumulated was discarded instead of checkpointed.\n\nAdd a turn-scoped dispatch guard installed next to the sub-agent usage\ncollector. It records two facts the turn already produces but never wrote\ndown, and consults them at `run_subagent`, the chokepoint every synchronous\nand parallel delegation passes through:\n\n- a graceful pause has been requested (recorded by `CapPauser` through a\n shared handle before it sends the advisory command, so the write\n happens-before any later dispatch rather than racing it), and\n- the remaining wall-clock is shorter than the longest sub-agent this turn\n has actually completed.\n\nBoth refusals are evidence-based and derived from runtime state, never from a\nconfigured constant or a task shape: with no pause, no ceiling, or no\ncompleted sub-agent to learn from the guard allows the dispatch, so an opening\nfan-out is never blocked and behaviour outside a turn scope is unchanged.\nOnly the top-level turn's cap binds — a sub-agent hitting its own cap is a\nroutine outcome and must not halt the parent's fan-out.\n\nAlso split the wall-clock telemetry. `sentry_suppression_reason` suppressed\nthe harness `Timeout` under the same arm as the outer channel backstop, so a\nturn that died with eighteen sub-agents' work in flight reached Sentry as\nnothing at all. The outer backstop fires with no terminal event and stays\nsuppressed; the harness `Timeout` fires while bounding real in-flight work and\nnow reports, tagged with which ceiling fired. User-facing copy is unchanged.\n\nCloses tinyhumansai/openhuman#5804\n
M3gA-Mind committed 3 months ago
0ef2ce6
fix(tinyplace): classify the not-yet-published 404 and surface the real cause\n\n`signal_key_status` makes two best-effort relay reads. For an agent that has\nnot published its Signal keys yet, both 404 — that is the expected answer, not\na fault: `signal_register_encryption_key` repairs the missing directory card on\nthis same 404, so it is the state the very next step fixes.\n\nBoth arms logged at `warn`. The orchestration drain supervisor calls\n`ensure_signal_keys_published` every 15s while not discoverable, which probes\ntwice per cycle, so an unregistered instance emitted up to four of these per 15\nseconds, forever. `[orchestration].enabled` defaults to true, so this is not\nstaging-scoped.\n\nThe same file already classifies this exact 404 as a normal branch at six other\nsites; the two probe arms were the only ones without one. That asymmetry inside\none file is the argument that this is a defect rather than an environment\nproblem. Adds `is_not_published_yet` and uses the file's existing\n`Err(e) if ...` guard idiom at both arms. Deliberately narrow — only 404, so a\n500 from a broken relay stays warn-worthy.\n\nSilencing the symptom alone would make a real registration failure invisible,\nbecause the diagnosability is inverted: the cause ("wallet locked / no signer?")\nwas logged at `debug` in the supervisor while the symptom sat at `warn`. So the\nsecond half reverses that. The supervisor now counts consecutive\nnot-discoverable cycles and escalates the cause to exactly one `warn` at the\nthreshold — the same shape `platform::socket::ws_loop` already uses\n(`FAIL_ESCALATE_THRESHOLD`), which was introduced for this same problem. One\nline per run, not one per cycle, so a permanently locked wallet does not\nre-create the defect in the other direction.\n\n`CYCLE_SLEEP_SECS` replaces three literal 15s so the threshold's documented\n"~1 minute" is derived rather than a comment that can drift.\n\nNo behaviour change to the RPC surface: both arms already returned the same\nvalues (`remote: null`, `encryptionKeyPublished: false`), so `signal_key_status`\nJSON, `ensure_signal_keys_published`'s retry decision and `self_identity` are\nuntouched. `map_err` is deliberately left alone — it serves all 152 controllers\nand demoting 404 there would hide genuine ones.\n\nCloses tinyhumansai/openhuman#5627\n
M3gA-Mind committed 3 months ago
5df7a49
fix(orchestration): gate wallet-requiring identity reads on wallet status\n\nSecond half of the pattern #3964 established: classify the condition as\nexpected (previous commit) AND stop wallet-less users from making the\ncall at all.\n\nThat prevention half used to exist. It lived privately inside\n`agentworld/pages/FeedSection.tsx` and was deleted with the whole\nagentworld module in a45752ed2, leaving only the classifier — which is\npart of why the same class recurred here at self_identity. It is shared\nthis time, as `hooks/useWalletConfigured`, so the next wallet-gated\ncaller inherits the gate instead of re-deriving it.\n\n`wallet_status` answers the same question `selfIdentity()` would provoke\nan error to answer, and resolves normally for a wallet-less user, so the\ngate replaces an erroring RPC with a non-erroring one.\n\nGated all three `selfIdentity()` callers: `useTinyPlaceIdentity` (the\nburst source — its retry ladder repeated the rejection), the\norchestration tab, and the discover panel. In each, `relayInfo()` needs\nno wallet and still runs, so nothing that was visible becomes hidden.\n\nKeeps the precedent's load-bearing detail: skip only on a POSITIVE "no\nwallet". If `wallet_status` itself fails we cannot prove absence, so the\ncall proceeds and the core classifier handles the result. Deliberately\nuncached — a wallet set up mid-session must be picked up on the next\nmount, and a cached "no" would strand the user until restart.\n\nRefs tinyhumansai/openhuman#5805\n
M3gA-Mind committed 3 months ago
3fbd2ee
fix(memory): suppress only deadlines the core itself reported, and drop the plural trap\n\nReview follow-up on #5803.\n\n## Only a core-reported deadline is evidence of running work\n\nCodex was right, and this was a real hole in the fix rather than a nitpick.\n`isIngestTimeout` matched any `timed out after Nms` plus a duck-typed\n`kind === 'timeout'`. Both admit cases where nothing is running:\n\n - The renderer's own AbortController fires as\n `Core RPC <method> timed out after 585000ms` with `kind: 'timeout'`. It\n proves the client stopped waiting and nothing more; a wedged, overloaded or\n absent core is indistinguishable from one happily distilling sessions.\n - A bare phrase like `request timed out after 30s` from an ordinary provider\n failure matched too.\n\nSuppressing either shows "still running" over work that stopped - the same\nfalse-reporting defect this PR exists to remove, with the sign flipped, and the\nworse direction: a false "failed" is recoverable because the next status poll\nshows what landed, a false "still running" is not.\n\nThe predicate now requires the `ingest coding sessions: ` prefix, which only\n`ingest_coding_sessions_rpc` adds, around both of its deadline paths. A message\ncarrying it can only have been produced inside that handler, which proves the\ncore received the request and started the call. The `kind` check is gone\nentirely - it was precisely the renderer signal that must not be suppressed.\n\nNew test asserts a renderer abort still rejects; the predicate test now pins\nboth directions, including `{ kind: 'timeout' }` alone being insufficient.\nRevert-checked: restoring the old predicate fails both.\n\n## Plurals\n\n`Foram importadas 1 sessões` was wrong, and a singular/plural pair would only\nhave moved the problem: ru and pl need three forms, ar six, so `1 vs many`\nwould still misrender `2 сессии` against `5 сессий`. There is no\n`Intl.PluralRules` layer in this repo to hang a real rule on.\n\nReworded so the count never sits against an inflected noun - "Sessions imported\nso far: {processed}." - which is correct in all fourteen locales and needs no\ninfrastructure. Applied to every locale, not only pt.\n\nNote: the pre-existing `completeMessage` / `stoppedMessage` / `partialFailure`\nstrings have the same shape. Left alone here - this PR does not otherwise touch\nthem, and fixing them is a separate pass.\n\n## Verification\n\n71 files / 649 tests passing; typecheck 0; lint 0 errors; i18n:check 0 missing\n0 extra; i18n:english:check clean; prettier clean.\n\nRefs tinyhumansai/openhuman#5802\n
M3gA-Mind committed 3 months ago
0e5cad9
Tell a deliberately null-classed driver from a modules-off build\n\n#5799 taught the migration import to name which of three ways the binding\nanswered the null driver, so the refusal stops blaming the user's config.\nIt got the third case right and the discriminator wrong.\n\nIt keyed on `binding.driver_id()`, with the modules-off case as the\ncatch-all arm. That arm catches more than it describes.\n`DriverClass::parse("null")` is a valid class, and `binding::admit` skips\nits `built_in_class` consistency check for an id that is not built in — the\nmatch answers `None` for such ids, meaning "nothing to enforce". So:\n\n [subsystems.memory]\n driver = "mynull"\n [subsystems.memory.drivers.mynull]\n class = "null"\n\nis admitted verbatim. `build` takes its `class == Null` branch and binds\n`NullMemoryProvider` directly, so the binding reports `class = Null`,\n`fallback = None`, and `driver_id = "mynull"` — not `"null"`, so it fell\ninto the catch-all. A user who deliberately switched memory off on a\nperfectly good modules-enabled build was told their `modules` feature was\noff and sent to investigate their build. That is the same misdirection\n#5799 existed to remove, and its own note said the message must never\nstate a cause it cannot establish.\n\nKeying on what `admit` *answered* separates them, and is the only signal\nthat does: modules-off answers `Module` and is then bound to `Null`, while\na null-classed driver answers `Null` and nothing was substituted. Both\nproduce a non-`null` driver id, so the id cannot tell them apart. `admit`\nis pure config, so this asks it directly. Four arms, each stating only what\nits own branch establishes, including a named arm for the\n`admit`-refused-with-no-fallback shape — unreachable, because `build`\nrecords that as a fallback, but named rather than folded into a neighbour\nthat would then be guessing.\n\nAlso, from CodeRabbit on the same PR: the refusal promises "the source\nworkspace is untouched" and nothing checked it. The gates-off test now\nasserts the source entry is byte-identical afterwards.\n\nFound by the Codex reviewer on #5799; the correction did not land before\nthat PR merged, so it comes separately.\n\nMessage text only — the same imports are refused either way, and the\n`fallback` and built-in-null arms keep their previous wording verbatim.\nThe new test is ungated: the confusion is reachable in a modules build.\n\nVerified on 68b2496fc: applying only the test to unmodified main fails it\non its own assertion; with the fix, gates-off scope 953 passed, product-set\nmigration_helpers 23 passed, clippy clean on both sets, fmt and\n--no-default-features clean.\n
M3gA-Mind committed 3 months ago
a5ae102
fix(memory): stop reporting a completed coding-session import as a failure\n\n"Import all sessions" showed a red banner reading `ingest coding sessions:\ncall to `IngestCodingSessions` timed out after 30000ms` while the import was\nstill running, and finished successfully seconds later:\n\n 02:13:12 entry mode="incremental" max_sessions=5\n 02:13:42 ERROR IngestCodingSessions timed out after 30000ms\n 02:13:47 exit files_seen=422 sessions_processed=3 sessions_failed=0\n evidence_units=4106 observations=15 budget_hit=true\n\nThe sessions were imported. The banner was wrong, and it invited a retry of a\n35-56s job that had already worked.\n\n## The deadline nobody chose\n\nThree deadlines bound this call, and two of them are deliberate and carefully\nordered so the middle one reports:\n\n client fetch abort 585s memorySourcesService.ts (120 + N*90 + 15 grace)\n core ingest_budget 570s memory/sources/rpc.rs (120 + N*90, capped 600)\n tinybus call 30s vendor/tinybus/.../connection.rs:56 DEFAULT_TIMEOUT\n\nThe third is a flat default applied by `Proxy::new` whenever a caller does not\nset one, and it arrived silently when the memory provider moved behind a\nmodule. It is 19x tighter than the smallest budget the RPC computes, so the\nbudget above it can never be observed. `rpc.rs`'s own doc comment says "the\ndeadline stays here on purpose" - it was already the wrong statement.\n\n`ingest_coding_sessions` now sets the bus deadline from `ingest_budget` itself,\nplus a 30s grace so the RPC's clean structured message wins the ordering rather\nthan racing it. One formula, two layers; `ingest_budget` is `pub(crate)` so the\ntwo cannot drift, and two tests assert the bus deadline outlasts every budget\nthe piecewise formula can produce, including at the cap.\n\n## A deadline is not a failure\n\nRaising the deadline is not sufficient, and tinybus says why: "A timeout does\nnot cancel the remote work - tinybus cannot - it stops waiting and frees the\ncaller" (connection.rs:22-23). Any deadline that fires leaves the import\nrunning, so reporting one as a failure is wrong at any budget.\n\n`drainCodingSessions` now classifies a deadline (`isIngestTimeout`) and returns\n`timedOut: true` with every completed pass's counts intact, instead of\nrejecting. Genuine failures still reject and still reach the error banner.\n\nThe predicate matches the message rather than only `CoreRpcError.kind`: the\ncore's own ceiling renders "timed out after 570s" in *seconds*, which\n`classifyRpcError` classifies as `transport`, not `timeout`. The kind is read\nstructurally rather than via `instanceof`, because a class identity is one\nbundling decision away from silently answering false.\n\n## Banner states\n\n success -> "N sessions produced M persona observations."\n budget_hit / remaining -> "Imported N. Run import again to continue the\n remaining M." (already correct; it was\n unreachable because pass 1 threw first)\n genuine failure -> the error, unchanged\n deadline, work ongoing -> "Import still running" (info), new\n\nThe deadline branch leads: `sessionsFailed` carries the last *completed* pass's\ncount, so on a timeout it describes superseded work, and leading with it would\ntell the user to retry a run that has not finished.\n\n## Verification\n\n`pnpm --filter openhuman-app test` over i18n + services + intelligence: 71\nfiles, 648 tests, all passing. `pnpm typecheck` exit 0, `pnpm lint` 0 errors,\nprettier clean, `pnpm i18n:check` and `pnpm i18n:english:check` both clean (2\nnew keys in all 14 locales, real translations, no em dashes).\n\nRevert-checked, each new test against its own fix:\n - drain loop rethrows unconditionally -> both deadline tests fail\n - regex drops the seconds alternative -> the 570s test fails\n - card drops the timedOut branch -> both banner tests fail\n\nNot run: the Rust suite and the coverage lane. The Rust change is compiled by\nCI; `vendor/` submodules are not checked out here.\n\nRefs tinyhumansai/openhuman#5802\n
M3gA-Mind committed 3 months ago
bed4447
Drain the shared store through the family the assertions read\n\n`json_rpc_memory_sync_and_learn` has been red on main since #5779:\n\n memory_learn_all: JSON-RPC error: memory_learn_all requires\n local_ai.runtime_enabled=true\n\nThat error is the symptom, not the cause. The case asserts `memory_learn_all`\nreturns zero processed on an empty store, and reaches "empty" by calling\n`memory_tree_wipe_all` first. When the store is not actually empty the handler\nwalks past its `target_ns.is_empty()` short-circuit and hits the\n`runtime_enabled` guard, which is what surfaces.\n\nIt only fails in the full serial target, never alone: a namespace another case\nleft — `conversation_raw` — survives the wipe. Measured: the wipe reports 14\nrows deleted, a second wipe reports `rows_deleted: 0`, and `namespace_list`\nstill answers `["conversation_raw"]` throughout.\n\n`wipe_all` reaches the driver through `binding::for_config(config)` — this\ncase's own workspace — while the assertions read through\n`active_memory_guard()`. Same binding here, but not the same store: the memory\nmodule is loaded once per process and captures the first workspace it is given,\nso every later binding in the binary (one per case, each with its own tempdir)\nis a different `MemoryBinding` over that one captured store. A `purge_all`\nscoped to this workspace cannot reach what another wrote. That asymmetry is the\none-workspace-per-process property, not a defect in `wipe_all` — a `purge_all`\nreaching across workspaces would be the real bug the day a host binds two.\n\n#5779 is what made it bite, by doing the right thing. Session memory used to\ncome from `create_session_memory_with_local_ai`, an engine-built store over\nthat case's own workspace files and invisible here; #5779 routed it onto\n`DriverMemory::for_subtree`, which is the shared module. So an agent turn in an\nearlier case now files `conversation_raw` where this case can see it. The split\nhad been hiding the collision, not preventing it.\n\nDraining through `memory_clear_namespace` is what makes this deterministic: it\ntakes `active_memory_guard()` + `as_documents()`, the exact path\n`list_namespaces` reads, so "cleared" and "listed" cannot disagree by\nconstruction. The wipe stays — the `queue_depth` and idle-ingestion assertions\nstill want it — and `memory_learn_all {}` keeps exercising the `None => all_ns`\nbranch rather than being retargeted at an explicit empty list, which would have\nduplicated the `does-not-exist` case below it and dropped that branch.\n\nVerified: the full target serially is 104 passed / 0 failed; before the drain\nthe same command fails on this case. The added `remaining.is_empty()` assertion\nis live in that run — `leftover` is `["conversation_raw"]`.\n
M3gA-Mind committed 3 months ago
b353e29
Name the missing module when an import refuses the null driver\n\n`Rust Feature-Gate Smoke (gates off)` has been red on main since #5779.\nBoth `migration_helpers::ops` apply cases fail with:\n\n refusing to import OpenClaw memory into the null driver — memory is\n disabled by configuration ([subsystems.memory] driver = "null")\n\nThe config says no such thing. `admit` is pure config and never sees the\nfeature flag, so it admits the configured `tinycortex`; `module_provider`\nthen substitutes the null provider under `#[cfg(not(feature = "modules"))]`\nbecause there is no module to bind. The binding that comes back reports\n`class = Null` with `driver_id = "tinymemory"` and no `fallback` — nothing\nrefused, so there is nothing to fall back from.\n\n`target_memory_backend` keyed its reason on the class alone, so that third\ncase landed in the configured-null arm and sent a user to edit a line that\nsaid the opposite of what they were told. It now matches on the driver id\ntoo and names the build.\n\nThe refusal itself is correct and stays: with no module compiled in, every\nwrite is discarded, and an import reporting "migrated N" having written\nnone is the silent data loss #5779 added it to prevent. The message also\nstops saying "OpenClaw" on the Hermes path, which is the same function.\n\nSo the two apply cases cannot pass with the gates off — there is no store\nto import into — and are gated on `feature = "modules"` (a default\nfeature, so the product and contributor lanes keep running them).\n`apply_refuses_and_names_the_build_when_no_memory_module_is_compiled_in`\ncovers the gates-off half: still refused, and refused for the stated\nreason.\n\nVerified: gates-off CI scope 952 passed; `--no-default-features` and\n`--features tui` check clean; product-set lib 22 passed with both apply\ncases live. Reverting the core.rs change fails the new test on its own\nassertion.\n
M3gA-Mind committed 3 months ago
4a448e2