* fix(sessions): preserve fork lifecycle ownership and context
Preserve incognito storage, revalidate message-cut authority at commit, and keep late UI fork results scoped to their presentation. Carry prepared child identity and actual context through subagent cleanup and receipts. Verify native source cuts with canonical projection and preserve supervision connection and cleanup ownership. Document the separate canonical-descendant initialization limitation.
* refactor(agents): remove unused subagent prompt task input
* test(codex): validate native fork fixture request shapes
* fix(codex): avoid inherited labels in native session forks
* fix(test): align fork prompt fixtures and session type imports
* refactor(agents): reuse subagent attachment result type
* fix(presence): keep colliding profile and raw viewers separate
Use recorded identity namespaces for ephemeral presence grouping, viewer
exclusion, activity cards, and typing counts. Keep timing facts owned by
each connection so later profile qualification cannot leak activity across
identities, and preserve current self identity over stale hello snapshots.
Fixes#132247. This live-presence repair is separate from the merged
transcript-provenance repair in #132038; persistence and authorization
remain unchanged.
* test(presence): qualify header and activity profile fixtures
Replace Telegram Desktop and Mantis proof plumbing with a repository-owned Telegram Test Server skill and ten Convex-leased headless user sessions. Workers keep full harness freedom while the broker owns only exclusive lease lifecycle.
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
* feat(gateway): auto-apply safe doctor config migrations at startup
Gateway startup now runs the same deterministic, prompt-free legacy
config-key migrations as "openclaw doctor --fix" when an otherwise
invalid single-file config can be fully migrated, instead of refusing
readiness with a doctor hint. The write happens under the existing
startup migration lease, after state migrations consume retired
locators, only when the complete result validates including plugins,
and keeps the previous config in the .bak ring. Configs using
$include, Nix mode, newer-version configs, update-in-progress runs,
and configs that stay invalid keep the current fail-closed refusal.
This replaces the narrow two-key stable-upgrade repair with the full
migration set (which subsumes it), so headless service gateways just
work across upgrades instead of stopping on retired config keys.
* fix(doctor): keep startup repair preview off the shared state database
resolveStartupConfigSnapshot serves gateway pre-bootstrap selection and
backup discovery, which run before state-database admission. The full
planner resolves plugin doctor contracts through the installed-plugin
registry, which opens the shared SQLite store — a broken store (or
backup's pre-validation guarantee) must not break those callers. The
preview tier now applies only state-free migrations with raw validation;
the preflight committer and canonical-write matcher stay authoritative.
* test(doctor): avoid shadowing the path module in repair fixtures
* test(doctor): pin checkpoint build provenance for unbuilt test environments
CI unit shards and unbuilt checkouts have no dist/build-info.json, so the
checkpoint layer fails open by design and the startup-repair checkpoint
assertions could never hold there. Wrap the real module with a pinned
build identity so recording and needs-checks stay meaningful.
* fix(doctor): reach plugin-owned migrations from the startup trust check
The pre-bootstrap trust check admitted only state-free core migrations,
so a config whose sole repair belongs to a plugin doctor contract was
refused before the plugin-aware preflight could migrate it. The resolver
now runs the full planner first and falls back to the state-free preview
only when the installed-plugin registry store is unreachable, keeping
backup discovery and broken-store startups fail-closed.
Carry the target agent identity through session creation, patching, title preparation, and keyed-session model comparisons. Preserve explicit-empty policy behavior, agent aliases, and the admin gate for actual model changes.
* fix: keep CJK compaction summaries within budget
Preserve canonical CJK pressure in bounded worker projections, including tool argument keys and values. Keep raw projection limits separate and avoid loading the session runtime just to estimate tokens. Cover restored chunks and the full summary consumer.
* test: use canonical messages in compaction fixtures
Remove obsolete estimator mocks and represent assistant content as typed blocks. Preserve oversized-retry precedence and sanitization checks with the real estimator.
* fix(chat): stop channel messages borrowing profile identities
Record bounded sender provenance at the input source and require a qualified
profile for portraits, person Activity links, viewer matching, and typing.
Carry the same authenticated fact through live presence for optimistic sends.
Keep historical transcript text and labels without guessing profile identity.
Preserve deliberate hook/redaction behavior, reject sender reassignment, and
keep distinct authors separate in chat grouping and display deduplication.
No SQLite schema change or historical backfill.
Closes#131886
* fix(ui): preserve qualified identity in viewer avatars
Carry the recorded live-user identity through presence projection and avatar
rendering instead of manufacturing profiles from raw presence IDs. Mixed
raw-ID groups remain unqualified; their grouping contract stays separate.
Qualify genuine profile fixtures across Gateway, avatar, and browser tests.
Keep a historical same-ID no-link browser control and preserve strong avatar
layout, retry, and missing-image assertions.
Follow-up for #132038; fixes CI and the retained browser-fixture review finding.
* test: synchronize node approval readiness and qualify presence fixtures
* fix(qa): keep leases when Gateway startup teardown fails
Retain a synchronous QA child owner through startup, replacement, and explicit finalization. Release Gateway-backed transport leases only after authoritative process settlement, independently of cleanup diagnostics. Preserve failure artifacts and primary fixture errors.
Fixes#131643
* test(qa): keep fixture cleanup inside plugin boundaries
* test(qa): retain integrated fixture owners and stop observations
* ci: follow renamed local JSONL socket owner in CodeQL
* test(qa): record reviewed cleanup error suppressions
* test(ci): exercise PR-native network semantic review
Route sensitive changes into the existing semantic gate and restore configured net-policy coverage. Add actual query fixtures, including an intentional red checkpoint for JavaScript-family raw clients before the follow-up predicate repair. PR remains draft until semantic proof and final CI pass.
* fix(ci): classify supported JavaScript network sources
Preserve the existing directory and owner boundaries across TS, MTS, JS, and MJS. Hosted semantic regression 33190472078 failed on exactly the three missing executable rows; expected findings and test exclusions remain unchanged.
* test(ci): isolate network fixtures and retain guard coverage
Use independent fixture stems and explicit MTS extractor inputs while preserving every expected finding. Scan the semantic fixture root for duplicates and keep the exact socket-owner assertion insensitive to formatting.
* test(qa): return confirmed stop in WhatsApp cleanup fixture
* test(qa): own Discord attachment gateway before startup
* ci: fail closed on unavailable CodeQL diff metadata
* test(oc-path): measure synchronous worker CPU budgets
Groq can report a per-request size ceiling as a TPM rate-limit error. Record the token-denominated Requested > Limit fact at failover classification so embedded recovery stops compaction and retry with reset guidance, while transport-owning fallbacks can still advance and ordinary TPM throttling retains backoff.
Co-authored-by: Jerome Queck <jeromequeck@jeromegroup.org>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
Optional memory maintenance must not reset unsummarized conversation history. Preserve ordinary replies after exhausted flush retries and surface required compaction failures through the existing recovery outcome.
Fixes#131957
* feat(profile): enable Git co-author credit by default
Verified GitHub identities now get public `Co-authored-by` credit unless the
person explicitly opts out. An absent `git.coauthor.enabled` row is the default
rather than a refusal, resolved through one shared helper used by both the
attribution resolver and the Control UI toggle.
* fix(profile): fail closed on malformed co-author preference values
The preference API persists arbitrary JSON, so `value !== false` let a
non-boolean row read as consent to publish a verified person's public Git
trailer. Only a missing row or literal `true` now enables credit, with
regression coverage at the attribution resolver and the profile toggle.
* docs(vision): state the team-assistant direction alongside personal use
The privacy rule governs what leaves an install, not what teammates see on a
shared Gateway. Say that explicitly so co-author credit and other shared-session
attribution are not read as a violation of the telemetry opt-in rule, and name
team.openclaw.ai as where OpenClaw is built with OpenClaw.
* fix(qa): prevent early Discord bot reuse and implicit transcript rooms
* chore(qa): defer the Crabline dependency update
* fix(ci): use public QA helper and gate skipped report fetches
* docs: reframe for teams and soften group-chat guidance
The docs framed OpenClaw as single-user ("personal AI assistant",
"personal assistant trust model") even though multi-user sessions,
named operator roles, presence, and commit credit shipped. Reframe the
trust model as one trust boundary per gateway (a single operator or a
mutually trusting team), treat group chats as a first-class deployment
with caution scoped to genuinely public rooms, and add a Team setup
guide next to the personal one.
* docs: link Why OpenClaw from README and docs root
Reframe the README intro away from single-operator-only wording, add the
team deployment and Why OpenClaw links, and point the docs landing page
at the architecture case.
* docs: soften security callouts from warnings to notes
* docs: keep Slack DMs on pairing default in team example
Record preparation start at the lifecycle owner and preserve independent send boundaries after failures, without splitting same-run steering. Fixes#131825.
* fix(active-memory): exclude error payloads from recall context
* fix(active-memory): prioritize failed recall status
* test(active-memory): cover failed recall cleanup and gateway flow
Co-authored-by: soltonigiri <kano.nests@gmail.com>
* test(active-memory): diagnose cleanup rejection and gateway startup
Co-authored-by: soltonigiri <kano.nests@gmail.com>
* fix(active-memory): preserve recall failures through timeout cleanup
Carry terminal and cleanup failure facts through the canonical partial-result
owner so timeout recovery cannot inject earlier memory from failed recall.
Preserve legitimate partial recovery, original cleanup errors and contributor
payload filtering. Cover direct recovery and declare the real Gateway test's
existing built-runtime prerequisite.
Co-authored-by: soltonigiri <kano.nests@gmail.com>
* fix(active-memory): finish cleanup and built Gateway verification
Name the canonical cleanup operation without changing error propagation, align the strict CI prerequisite expectation, and run the real recall proof through an isolated exact-build Gateway process. Preserve all behavioral assertions and deadlines; hosted verification remains required.
Co-authored-by: soltonigiri <kano.nests@gmail.com>
* test(active-memory): exercise authorized chat recall
Use the public interactive chat route, which supplies canonical turn tool authority, for the built Gateway recall regression. Preserve the real provider, memory, failed-status, prompt-isolation, and history assertions and their deadlines.
Co-authored-by: soltonigiri <kano.nests@gmail.com>
---------
Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: soltonigiri <kano.nests@gmail.com>
Deferred context-engine maintenance now cooperatively cancels during Gateway stop and accepted restart drain, releasing queued work and owned engine resources without quarantining cancellation-aware plugins.
Fixes#129200.
* fix(sessions): preserve participant identity and input provenance
Keep profile, agent, remote, observed, and legacy identities distinct in the existing participant table. Record accepted input at admission, including steering, instead of inferring a person from the session creator. Preserve historical membership and counts while leaving ambiguous profile timestamps unknown through stopped-writer Doctor migration.
Project full visibility-filtered person membership before preview limits so Activity does not misattribute channel identities or omit people outside the facepile. Keep participant membership separate from authorization and expose raw-selector ambiguity to memory operators.
Repair Doctor readiness reporting, generic Swift inline-union generation, direct-dispatch metadata handling, and fixture-owned database lifetimes. Verify namespace collisions, real provider input, accepted steering, visibility, backup/migration/reopen boundaries, native decoding, and the built-CLI lifecycle.
Fixes#130661
* fix(macos): isolate readiness and discovery lifecycles
Keep readiness fixtures private for their entire lifetime and give health readiness one deadline owner. Start and cancel slow host discovery with active discovery, not model construction.
Make native protocol, callback, onboarding, and process-cleanup tests observe their intended lifecycle phases without expanding deadlines or weakening assertions. Correct the documented signing default.
Validated with 1,839 parallel native tests, the release product build, causal negative controls, pinned Swift lint/format checks, and fresh isolated autoreview. Native production delta: -5 lines.
* docs(macos): clarify app profile isolation boundaries
* build(protocol): refresh generated Swift install models
* fix(protocol): preserve optional literal field presence
* fix(ci): bound SDK declarations and isolate test lifecycles
Discover the current declaration source graph in a joined child before normal eager emission, and track its complete source-bearing cache inputs. Repair shared jsdom focus teardown and native worker fixture request ordering without changing UI focus ownership or execution fallback policy.
* test(sessions): prove Goal participant upgrade boundaries
* fix(doctor): atomically repair session transcripts
* fix(sessions): keep runtime reads and repairs on SQLite owners
Resolve physical session databases once and carry that identity through startup, search, boards, maintenance, and Doctor. Remove automatic legacy JSON import from Gateway startup while preserving explicit Doctor upgrades.
Publish repaired legacy transcripts with strict atomic replacement and preserve the source when backup, write, or rename fails.
* fix(sessions): simplify startup ownership and diagnostics
* test(sessions): migrate legacy history through Doctor in CLI proof
---------
Co-authored-by: Amp <amp@ampcode.com>
* fix(channels): enforce documented media limits at byte boundaries
Resolve canonical account caps at native byte consumers, publish QA attachments durably, and refresh global media policy without resurrecting manually stopped accounts. Preserve existing local survivor warnings, remote batch atomicity, transport ceilings, and contributor schema work.
Co-authored-by: Ayaan Gazali <ayaangazali.work@gmail.com>
* fix(qa-channel): serialize preview changes with durable delivery
* test(qa-channel): reuse the typed deferred helper
* fix(auto-reply): retain media captions when block streaming is off
Resolve disabled block delivery at message-end so suppressed text callbacks cannot strip the later attachment caption. Preserve enabled break modes and per-turn precedence using the existing boolean owner.
* docs(streaming): clarify captions with block delivery disabled
* test(media): rebalance bounded core typecheck shards
Keep the existing 720-root ceiling and exact-once canonical coverage by moving media tests into the messaging shard. The plugin/platform shard reached 721 roots with the new media contract coverage; the new allocation is 682 and 526 roots. No runtime or test assertions change.
---------
Co-authored-by: Peter Steinberger <steipete@gmail.com>
Prefer the verified GitHub public name for new or unnamed profiles and upgrade saved names only when they exactly match the current canonical login. Preserve other saved names and provider fallback on the next normal identity sync. Reuse existing GitHub requests without migration or schema changes.
* fix(ui): open worktree sessions before setup finishes
Admit the first turn before naming, checkout, and repository setup; show
startup progress and keep failures retryable in the same session. Reuse the
accepted-run workspace owner, fence cancellation and setup authority, and
block sibling work until the workspace is ready.
Fixes#124966 (immediate worktree sessions and setup progress).
* test(ui): retain project picker capability in startup fixture
* fix(worktrees): fence checkout retries after cancellation
* test: align native phases and title fallback with admitted startup
Materialize legacy model allowlists atomically at the migration owner and
validate authored and resolved config before writing. Defer unresolved model
references without dropping their existing restriction or falsely marking the
migration complete. Preserve include ownership and repeated doctor stability.
Fixes#114964.
Co-authored-by: Peter Steinberger <steipete@gmail.com>
* fix: honor scenario drivers in generated QA commands
Carry declared driver requirements through coverage search, grouping and quoted command output. Preserve unconstrained defaults and validate generated arguments through real CLI parsing and canonical lane selection. Closes#131088.
* test: capture generated QA commands through the shell
* feat(ui): show activity cards for online people
Record live person timing independently of heartbeat freshness and expose keyboard- and touch-accessible cards with visible session links. Preserve continuous online intervals across overlapping tabs without adding persistent activity history.
Closes#130649
* build(protocol): refresh generated presence timing fields
* fix(gateway): scope presence snapshots to read-access operators
Apply one recipient projection to hello, system-presence, and events. Keep person timing and time-zone details behind read access, and filter watched references with the canonical session-list policy without leaking hidden counts. Preserve idle-person metadata for readers and prevent non-reader activity-driven frames.
* fix(plugins): preserve Gateway capability load context
Carry the owning registry's metadata generation, workspace, install records, and built-artifact preference through capability discovery. Preserve standalone source loading and existing speech eligibility while avoiding synchronous source transforms on cold Talk catalog requests.
Fixes#130777
* test: align integrated presence and capability coverage
Keep the recipient matrix in its timing-aware owner, close the suite-owned Gateway for shutdown proof, and spy on the canonical install-record reader. Remove the retired private carrier's assertion allowance.
* fix(gateway): broadcast presence when clients connect
Publish completed connection rows through the canonical scoped broadcaster so established readers see first connections and reconnects without waiting for profile edits or activity. Preserve shared online intervals and reset them only after the final socket closes.
* fix(ci): align presence fixtures and sidebar type ownership
Reuse the canonical sidebar host type to remove the type-only lazy-runtime cycle. Assert omitted scopes through hello auth and denied presence reads, and supply presence version callbacks in the shared WebSocket context fixture. Retain startup admission and drain assertions without changing deadlines.
* fix(ui): retain latest scroll commands until their destination
Do not treat the virtualizer's idle debounce or a decreasing offset as reader takeover. Settle at the actual DOM end within one pixel, retaining the separate eight-pixel UI-follow policy and explicit input cancellation. Cover retargeted idle delivery and near-end precision with the real dependency, synchronize pointer baseline capture, and type the existing composer snapshot as its textarea contract.
Fixes#130892
* fix(memory): isolate sqlite-vec KNN in subprocess
* fix(memory): satisfy KNN subprocess CI guards
* test(release): include memory KNN child artifact
* test(memory): update KNN subprocess fixtures
* fix(memory): bound KNN child row payloads
* fix(memory): preserve published readers during cancellable KNN
Keep shadow reindex database, vector readiness, FTS and metadata state in
an owned async context. Public operations retain the published connection,
and escaped shadow continuations cannot write to it after rebuild closes.
Terminate the one-shot query child through its owned handle and retain
admission until close. Remove process-tree/PID probing and test-only hooks.
Cover publication overlap, callback reads, cancellation and recovery.
Co-authored-by: OpenClaw Assistant <assistant@openclaw.local>
* refactor(memory): separate database context ownership
Keep the published reader and shadow writer context in its own owner module. Repair plugin test imports and typed lint findings without changing the verified KNN behavior.
---------
Co-authored-by: OpenClaw Assistant <assistant@openclaw.local>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
* fix(agents): stabilize runtime context across tool rounds
Keep current-turn metadata after the active user and before tool calls so Responses continuation retains the complete prior request prefix. Preserve active hook context and intentionally resend when transient context expires on a later turn.
Reworks #130166. Thanks to Markus Hartung for investigating continuation failures.
Co-authored-by: Markus Hartung <mail@hartmark.se>
* fix(ai): localize continuation ordering to Responses
---------
Co-authored-by: Peter Steinberger <steipete@gmail.com>
* fix(channels): bundled channels reject the documented responsePrefix override
* fix(feishu): pass channel and account to the reply prefix resolver
The ordinary reply dispatcher built the prefix context without channel or
accountId, so channels.feishu.responsePrefix and its account override fell
through to the global value. The comment dispatcher already passed them.
* fix(channels): accept twitch's root responsePrefix and type ClickClack's
Twitch validates as a two-branch union with both branches closed, so
responsePrefix declared only on the account shape left
channels.twitch.responsePrefix rejected whenever accounts is present. Also
declares responsePrefix on ClickClackAccountConfig so typed callers can express
what its schema already accepts.
* fix(clickclack): apply the configured responsePrefix in model mode
Model mode sends the completion straight to ClickClack instead of going through
the agent reply pipeline, so the documented responsePrefix parsed and then did
nothing. Resolve it through the public reply-pipeline seam so template
variables like {model} render from the completion's own provider and model.
* fix(clickclack): do not double the response prefix in model mode
systemPrompt is operator-owned, so a model can be instructed to emit the
configured prefix itself and the unconditional concatenation then sent it
twice. Match the shared reply normalizer's startsWith guard.
* test(clickclack): resolve inbound access through the real resolver
Main now requires access.channelIngress, which the hand-built fixture did not
provide, so the model-mode messages never dispatched. Drop the fixture and let
handleClickClackInbound resolve access from a DM-shaped message, matching the
sibling bot-loop tests.
* test(channels): reject a key missing from any composed branch
A union alternative is a configuration mode an operator can pick, so a key
present in only one mode is unusable in the other even though the union still
validates. Treat any rejecting alternative as a rejection, and walk allOf when
collecting account schemas.
* fix(channels): offer responsePrefix only where the reply path applies it
Applying the prefix to an outbound reply is per-channel wiring, not a shared
step. Buzz, Nostr, QA Channel, Raft, Reef and SMS never read it, so accepting
the key there validated a setting their delivery path ignores. Anchor the
contract to the channels that consume the prefix.
* fix(channels): complete shared response prefix delivery
Co-authored-by: ayaangazali <ayaangazali.work@gmail.com>
* docs(config): refresh response prefix baseline
* test(tlon): use canonical prefix fixture helpers
* test(channels): prove Twitch reply prefix delivery
Exercise schema admission and the real shared reply dispatcher at the Twitch native send boundary, replacing redundant schema-only coverage. Keep Tlon fixtures on canonical imports and recording options.
* docs(channels): clarify explicit message prefix behavior
---------
Co-authored-by: Peter Steinberger <steipete@gmail.com>
* feat(ui): save appearance preferences per user profile
When a Control UI connection is bound to an authenticated user profile
(trusted-proxy, Tailscale, GitHub identity), theme, theme mode, and accent
become per-profile: stored in the existing user_preferences KV store via
users.prefs.set, overriding gateway-wide ui.prefs, with live cross-device
updates over a new additive users.prefs.changed event scoped to the same
merged profile. Restore default deletes only the profile key and falls back
to the gateway-wide value. talk.config projects the caller's profile accent
for native clients. Profile-less connections (token/password/none auth)
keep the existing gateway-config behavior byte-identically.
Release-note context: on multi-person gateways appearance choices are now
personal and follow you across devices; an admin restyling their own UI no
longer reskins the whole team.
* chore(protocol): allowlist users.prefs.changed for mobile clients
iOS and Android resolve the profile accent through talk.config on connect
and config refresh; live per-profile appearance push on natives is a named
follow-up.
* chore(protocol): regenerate Swift/Kotlin models for users.prefs.changed
* fix(ui): honor explicit defaults and identity switches for profile appearance
Addresses the three ClawSweeper review findings:
- resetValue for profile-bound appearance keys is the deletion fallback
(gateway value), so an explicit product-default selection persists as a
profile write instead of being misclassified as a reset.
- An identity switch between two known scopes forces a full appearance
reconcile and clears appearance keys the returning identity never set,
so a shared browser cannot keep the previous profile's look (boot keeps
the last-seen shortcut).
- talk.config joins the profile-dependent dispatch gate so a pending
GitHub identity sync completes before the profile accent is projected;
token clients pass through untouched.
* chore(ui): satisfy assertion-safety ratchet and docs formatting
* refactor(ui): extract server-prefs storage primitives
server-prefs.ts crossed the 700-line cap after the review fixes; the
stateless localStorage persistence primitives move to
server-prefs-storage.ts (no behavior change). Shrink-prunes the
assertion-safety baseline for the moved casts.
* fix(ui): keep imported custom themes out of profile storage
Custom palettes are browser-local by contract, so a profile must never
carry theme=custom to a browser that cannot render it. The wire contract
drops custom from the storable theme values (readers self-heal any stored
value), a profile-bound custom selection stays retained browser-local
(including the offline-queued path), and the exhaustive theme test now
encodes the exception.