Commit Graph

1612 Commits

Author SHA1 Message Date
Shakker 69fa1a8eab fix(codex): preserve steering transcript order 2026-08-21 07:45:40 +01:00
Vito Cappello 6d7bc062e3 fix(session-catalog): hide OpenClaw-managed provider sessions (#125424)
* fix(session-catalog): hide OpenClaw-managed upstream sessions

* fix(codex): filter managed paired-node sessions

* fix(codex): classify legacy managed sessions

* fix(session-catalog): classify managed provider sessions

* fix(session-catalog): backfill inter-session ownership

* fix(session-catalog): classify Claude internal prompts

* fix(session-catalog): retain durable provenance

* fix(codex): keep rollout home derivation private

* fix(anthropic): declare catalog schema dependency

* fix(anthropic): avoid catalog schema dependency

* fix(session-catalog): scope managed ownership to Codex

* fix(codex): contain catalog provenance reads

* fix(codex): bind managed threads to catalog home

---------

Co-authored-by: VACInc <3279061+VACInc@users.noreply.github.com>
Co-authored-by: Josh Lehman <550978+jalehman@users.noreply.github.com>
2026-08-20 19:51:55 -07:00
Peter Steinberger 319df0e7a1 test: trim plugin test duplicates (#126917) 2026-08-20 18:07:27 -07:00
Josh Avant a042125170 fix(memory): preserve provenance across dreaming (#126489)
* fix(memory): preserve provenance across dreaming

* fix(build): preserve bundled hook metadata

* refactor(build): remove obsolete directory helper

* test(memory): align provenance fixtures

* test(memory): type consolidation run options

* test(memory): register write provenance siblings

* fix(memory): preserve legacy provenance registration

* fix(memory): make provenance provider-independent

* fix(memory): canonicalize provenance workspace keys

* fix(memory): keep provenance mutation host-private

* fix(build): track runtime postbuild implementations

* fix(build): verify bundled hook metadata outputs
2026-08-20 17:58:31 -07:00
Peter Steinberger 500fd2cac9 refactor(codex): separate exec session transport (#126859) 2026-08-20 17:10:26 -07:00
Peter Steinberger 1362490b80 refactor(sandbox): canonicalize backend ownership (#126828) 2026-08-20 13:52:15 -07:00
Vincent Koc 15f33d9edc fix(qa): preserve Codex auth identity across restarts (#126777) 2026-08-21 03:16:22 +08:00
Peter Steinberger 02c08bba71 fix(codex): unblock Computer Use after plugin install (#126699)
* fix(codex): release config fence before readiness probe

* chore(codex): upgrade managed app-server to 0.148.0
2026-08-20 08:26:41 -07:00
Peter Steinberger 6d70d051a4 fix(gateway): preserve agent owner for live events (#126608)
* fix(gateway): preserve agent owner for live events

* fix(gateway): retain canonical live session owner
2026-08-20 02:50:38 -07:00
Peter Steinberger 980b07f4a2 refactor(agents): replace tool-failure warning heuristics with a two-rule policy (#126542)
* refactor(agents): reduce tool failure warnings to two rules

* test(agents): remove obsolete tool recovery receipt proof

* refactor(agents): drop unused meta param from buildToolMutationState

* test(agents): remove stale tool warning assertions

* test: export runtime source snapshot from closed runtime-snapshot mocks

Heal the main breakage introduced by 9441e3fe6e / #126531, which added a runtime source-snapshot read to provider model route resolution. Closed Vitest factories now return null for that source snapshot, preserving their pre-projection behavior.

* test(gateway): make compaction read-error faults order-immune

Generation-2 CI failure in run 32342180898, job 96343444772 showed that the mock factory initialized while shared gateway-server importers remained bound to the real transcript reader.

The dedicated isolated project fixes normal shards. Complete its ownership by adding it to the root project matrix and excluding the test from the non-isolated OPENCLAW_GATEWAY_PROJECT_SHARDS=0 fallback.
2026-08-20 01:11:05 -07:00
Peter Steinberger 147edf47f3 fix(auth): keep a retired auth JSON from stranding a migrated store (#126562)
* fix(auth): keep a retired auth JSON from stranding a migrated store

Runtime failed closed with AUTH_PROFILE_MIGRATION_REQUIRED whenever a retired
credential file was present, even when the canonical SQLite store already held
the agent's profiles. One leftover auth.json therefore made a fully migrated
install unusable, and the gateway lifecycle preflight refused start/restart on
top of it, so every channel and provider stayed offline until Doctor ran.

A legacy file is now only fatal when the canonical store cannot serve
credentials. Doctor's importer never overwrites a usable stored credential, so
a file sitting beside a populated store is unarchived bytes, not pending
migration: runtime logs a one-time warning and keeps serving. An empty store
with a credential file still fails closed and never falls through to
environment auth. Startup degrades that owner to configured-unavailable
instead of refusing to boot, which lets the lifecycle preflight go away.

* refactor(secrets): retire the auth-profiles.json vocabulary

Auth profiles moved to SQLite, but operator-facing surfaces still named the
retired JSON file. The duplicate-agentDir error told operators to copy
auth-profiles.json to share credentials, which does nothing and lands the
second agent in a migration-required state; `openclaw migrate plan codex`
reported a target file that is never created; and the secrets picker labelled
candidates with a filename that no longer exists.

Renames the SecretTargetConfigFile discriminator to "auth-profile-store" and
corrects the operator-facing text, the migrate plan target, and the docs that
described the file as a live target. Genuine legacy-filename uses in doctor,
the security fixer, and migration fixtures are unchanged.

Also deletes resolveSecretPlanTargetByPath and ResolvedSecretPlanTarget from
the plugin SDK. They have no callers in core, plugins, or tests, and the
symbols are absent from the latest stable tag, so they carry no compatibility
obligation and are removed rather than deprecated. Their inline parameter type
was the only thing putting the retired filename on the public SDK surface.

* improve(wizard): warn about device-code phishing

The device-code prompt only warned against sharing the code, and only when an
expiry was known. Device-code phishing works the other way around: the attacker
starts the login and gets the victim to enter the attacker's code. Codes
delivered over a chat channel are the risky case and carry no expiry hint, so
the warning is now unconditional and covers received codes, matching the Codex
CLI prompt.

Also documents the Codex auth handoff: a subscription profile is installed as
in-memory external auth rather than persisted, and token refresh is inverted
so the refresh token stays in OpenClaw's store.

* fix(test): make transcript read-failure injection order-independent

server.sessions.compaction-read-errors.test.ts injected its failures with
mockRejectedValueOnce, which fails the NEXT call to loadTranscriptEvents
globally. Under --isolate=false a shard shares one worker, so any sibling
transcript read could consume the one-shot rejection before the compaction RPC
issued its own; compaction then ran against the real reader and returned ok,
failing three assertions. This shard was already red on main; a prior repair
fixed the mock's initialization order but left the call-order dependency.

Key the injection on the seeded sessionId instead, so unrelated readers cannot
consume it and the re-read case counts only its own session's reads.

Also updates two expectations invalidated by this branch: the duplicate-agentDir
remediation text, and the plugin SDK export ratchet, shrunk by the two retired
secret-plan exports.
2026-08-20 00:42:41 -07:00
Josh Avant 29cfd195d1 fix(memory): honor turn tool policy during automatic recall (#126482)
* fix(memory): bind prompt recall to turn tool policy

* test(plugins): update hook contract inventory

* fix(memory): bind recall to active run lifecycle

* docs(plugins): define prompt authority contract

* test(plugins): track prompt authority type guard

* fix(plugins): revalidate prompt authority per handler
2026-08-19 19:21:51 -07:00
Peter Steinberger 8b15dc9447 refactor: share media and process runtime helpers (#126490)
* refactor(media): share video description requests

* refactor(process): expand buffered runtime options
2026-08-19 17:48:49 -07:00
Ben Badejo 20af8688dd fix(codex): refresh stale isolated Computer Use bundles (#126080)
* fix(codex): refresh stale isolated Computer Use bundles

* fix(codex): satisfy Computer Use CI contracts

* fix(codex): constrain Computer Use bundle refresh

* test(codex): guard Computer Use cache fixture

* fix(codex): contain native Computer Use refresh paths

* fix(codex): keep service path type private

---------

Co-authored-by: Benjamin Badejo <ben@benbadejo.com>
Co-authored-by: Josh Lehman <550978+jalehman@users.noreply.github.com>
2026-08-19 16:02:23 -07:00
Josh Lehman 841f25eae6 fix(codex): accept newer desktop app-server versions (#126450) 2026-08-19 15:36:54 -07:00
Peter Steinberger 7e0b599ca4 fix: surface Codex input prompts across runtimes (#126387)
* fix: surface Codex input prompts across runtimes

Codex structured input now reaches bounded Gateway questions in native and ACP runs, with exact turn ownership, explicit unsupported outcomes, and cancellation fencing. Consume the published ACPX elicitation support.

* chore: align elicitation helpers with current guards

Use protocol-specific helper names required by current main and update the reservation regression to the generalized input owner.

* fix: formalize structured input SDK surface

Expose one documented, frozen agent-harness structured-input contract with runtime and subpath coverage, replacing the accidental function-property API.

* fix: satisfy elicitation architecture gates

Register the real-process ACPX fixture as an executable test root and move shared structured-input types into the boundary leaf to keep Knip and Madge clean.

* fix: remove structured input lint suppression

Preserve the rejected control and invisible-character ranges with an explicit code-point check so the production suppression inventory stays closed.
2026-08-19 15:25:33 -07:00
Vitor Cepeda Lopes e00f860198 fix(codex): Computer Use fails when Desktop bundles a newer app-server (#125883)
* fix(codex): allow newer app-server runtimes

* fix(codex): bound external app-server compatibility

---------

Co-authored-by: TheAngryPit <16145902+TheAngryPit@users.noreply.github.com>
Co-authored-by: Josh Lehman <550978+jalehman@users.noreply.github.com>
2026-08-19 14:42:33 -07:00
Samuel Judson 24a1139188 fix: move raw call transcripts from system to user prompt to protect provenance (#123846)
* Move raw transcript from system to user prompt to protect provenance.

* Type fix.

* fix(voice-call): harden transcript context handling

* fix(voice-call): initialize inbound Twilio control state

* test(voice-call): align runtime coordinator fixture

---------

Co-authored-by: joshavant <830519+joshavant@users.noreply.github.com>
2026-08-19 13:07:59 -07:00
Peter Steinberger 341551937e fix(agents): preserve empty CLI subagent completions (#126379)
* fix(agents): preserve empty CLI subagent completions

* chore(qa): remove retired Matrix coverage leaf

* refactor: consolidate shared runtime ownership

* fix(scripts): keep runtime build coercion dependency-light

* chore: remove release-owned changelog entry
2026-08-19 11:30:43 -07:00
Peter Steinberger aa6949839d test: remove final delta scaffolding (#126310) 2026-08-19 05:16:43 -07:00
Peter Steinberger 9f8d53d6fb fix(codex): reap app-server descendant processes (#126285)
* fix(codex): reap app-server descendant processes

Contain the exact live Codex app-server ancestry before transport close so independently grouped MCP descendants cannot survive client retirement or overlap a replacement.\n\nCloses #119760.

* fix(codex): retain proven app-server descendants

* fix(codex): converge app-server quiescence

* fix(codex): bound app-server stop retries

* fix(codex): hold app-server root through eof

* fix(codex): bound app-server quiescence

* fix(codex): release stopped app-server processes

* fix(codex): bound app-server containment work

* fix(codex): bound process inspection asynchronously
2026-08-19 03:08:18 -07:00
Peter Steinberger fef5fc55f4 fix(codex): prevent node process control from targeting gateway sessions (#126253) 2026-08-19 01:31:52 -07:00
Peter Steinberger 3378e07d50 refactor(plugin-sdk): promote shared runtime primitives (#126193)
* refactor(plugin-sdk): promote shared runtime primitives

* test(codex): keep one attempt tools owner
2026-08-19 01:10:18 -07:00
Peter Steinberger 629f37e841 fix(codex): preserve transcript mirror identity (#126245)
Keep the writer-owned idempotency key stable across transcript redaction so final Codex snapshots replay against the admitted SQLite row instead of dropping mirrored history.\n\nCloses #126244
2026-08-19 01:07:27 -07:00
Peter Steinberger 554fc80e2f fix: Full access sessions no longer request exec approval (#126210)
* fix: stop Full access sessions from requesting exec approval

* fix: propagate Full access policy to compaction

* fix: source compaction permissions from session state
2026-08-19 01:04:36 -07:00
Peter Steinberger 3205e9282d fix(codex): keep progress card directly visible (#126189) 2026-08-18 23:20:27 -07:00
Peter Steinberger 2e6457b8e6 fix(codex): restore GPT-5.6 reasoning effort options (#126182)
* fix(codex): preserve model effort capabilities

Keep public model identities separate from app-server execution routing, and retain provider-owned complete effort metadata when account discovery is partial.

Fixes #126005

* refactor(codex): avoid redundant thread rotation

* fix(codex): preserve model fallbacks without leaking wire ids
2026-08-18 22:56:20 -07:00
Peter Steinberger 0d14434d0e feat(secrets): add explicit protected and agent-readable access (#126088)
* feat(secrets): add explicit agent access modes

Distinguish protected write-only secrets from agent-readable Gateway environment values, expose policy-bound Gateway exec aliases to Codex, and activate Node environment proxy support for destination-bound egress.\n\nCloses #125975

* fix(gateway): bind lifecycle dispatch to owning instance

* test(ui): preserve mock gateway recovery state

* fix(codex): avoid unavailable gateway process guidance

* fix(harness): keep run correlation host-owned

* fix(gateway): bind restart delivery to instance

* test(codex): construct tools through test host capability
2026-08-18 22:51:15 -07:00
Peter Steinberger 2456c77459 improve(gateway): avoid repeated logging and delivery scans (#126147)
* perf(gateway): remove repeated logging and delivery scans

Exact session-delivery retries no longer scan the full queue. Logging and diagnostics reuse lifecycle-owned settings and listener interest so uninterested projections are skipped, while outbound WebSocket summaries are built only after recipient admission.

* fix(infra): break diagnostic listener import cycle

Keep event-type validation at the diagnostic dispatcher while the process-wide listener presence counter remains a leaf module.

* test(cli): use logging override owner

Exercise late one-shot JSON diagnostics through the canonical logger override setter so lifecycle-cached console settings are invalidated as they are in production.

* test(auth): use logging override owner

Configure the locked-update warning test through the canonical logger override setter so lifecycle-cached console settings are invalidated before assertion.

* test(gateway): normalize redacted media fixture

Compare durable inbound media facts against the public redaction contract so random identifiers that resemble sensitive text do not make the Gateway suite flaky.
2026-08-18 22:13:22 -07:00
Peter Steinberger 5564671c4f fix(gateway): bound audit and Codex backlogs (#126154)
* fix(gateway): bound audit and Codex backlogs

Live Gateway SQLite lock failures and process heap pressure exposed two
independent queue owners. Route best-effort audit persistence through the
canonical shared-state connection with bounded contention retries, and remove
the per-notification Codex yield so the keyed turn queue can drain directly.

Follow-up to #126033 and #126073.

* fix(gateway): annotate raw SQLite cold-open probe

* test(codex): register notification burst shard
2026-08-18 21:44:09 -07:00
ClawSweeper 7e69b1d5ab fix(ui): make Guardian review activity subtle (#125395)
* fix(ui): make guardian reviews subtle

* fix(ui): correlate Guardian warning cleanup

* fix(ui): retain ambiguous Guardian warnings

* fix(codex): preserve Guardian review state

Keep command-owned review state durable across reconnect and persisted history, with conservative bounded outcomes and producer-owned routine warning correlation. Verify native user-home app-server auth instead of injecting stored profiles.

* refactor(ui): split workspace conflict rendering

---------

Co-authored-by: RoboClaw <309084314+roboclaw-bot@users.noreply.github.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-18 20:28:23 -07:00
Peter Steinberger e2643afb2a fix(codex): retain terminal facts in oversized trajectories (#126050)
* fix(codex): delegate trajectory bounding to host

* fix(trajectory): preserve compact terminal facts

* style: format release validation skill
2026-08-18 16:22:25 -07:00
Josh Avant 50720c3b8e fix(codex): preserve native approval scope (#125995) 2026-08-18 16:18:01 -07:00
Peter Steinberger b34eb16071 fix(copilot): restore OpenClaw guidance to agent turns (#125997)
* fix(copilot): add OpenClaw prompt guidance

Copilot append-mode system messages included credential safety, workspace bootstrap, and extra context but omitted OpenClaw delegation and reply-delivery policy.

Build guidance from the final policy-filtered tool surface so visible delegated work, Skill Workshop, and source replies follow the same behavior as Codex.

* fix(copilot): break prompt guidance import cycle

The CI architecture gate detected a cycle through attempt-config and prompt-guidance. Isolate raw-run mode detection in a leaf module.
2026-08-18 15:01:15 -07:00
Peter Steinberger 491dc7f8b1 fix(codex): report native project docs truthfully (#126010) 2026-08-18 14:42:56 -07:00
Peter Steinberger d5aff660a2 fix(codex): keep large AGENTS.md instructions visible (#125966)
* fix(codex): raise native project doc budget

Default OpenClaw Codex threads to a bounded 128 KiB aggregate project-document budget so large AGENTS.md chains remain visible. Preserve explicit ordinary-thread overrides and keep restricted or lightweight turns at zero.

* test(codex): refresh project doc config expectations
2026-08-18 12:39:52 -07:00
Peter Steinberger 5301fb5e7f fix(codex): preserve harness trajectories (#125941) 2026-08-18 11:47:09 -07:00
Peter Steinberger 62b2141118 fix: keep turns active when sessions_yield has no child (#125850)
* fix(agents): reject sessions_yield without child completion

* fix(agents): preserve native child yield claims

* chore(agents): keep tool registry within lint limit

* fix(agents): preserve subagent self-yield
2026-08-18 10:53:37 -07:00
Peter Steinberger fd8326c5bf fix(codex): reap sandbox process trees before termination (#125908) 2026-08-18 10:48:10 -07:00
Peter Steinberger d204ebe6a4 fix(codex): recover replies after compaction failure (#125895)
Preserve completed tool work when native Codex compaction fails, close failed compaction progress, and bypass unrelated model/auth failover before isolated finalization. Fixes #125789.
2026-08-18 10:22:35 -07:00
Peter Steinberger b9d0e13b5d fix(agents): share one delegation policy across agent runtimes (#125892)
The `## Delegation` guidance added in #125691 lived only in
buildAgentSystemPrompt, so Codex-runtime agents never received it: the
Codex harness builds its own developer instructions in
extensions/codex/src/app-server/thread-prompt.ts and imports nothing
from the system-prompt builders. Live A/B on gpt-5.6-luna had the native
runtime answer "spawn a visible session" while the Codex runtime
answered "spawn a hidden subagent".

Move the policy into src/agents/delegation-guidance.ts, owning both the
main-session mode resolver and the section text, and export it through
the agent-harness plugin SDK barrel that the Codex harness already uses.
The hidden-delegation vocabulary is injected by each runtime, so core
never names a plugin-owned tool: native passes `sessions_spawn`, Codex
passes native `spawn_agent`. Visible sessions stay `sessions_spawn`
with visible=true on both runtimes because Codex-native children are
never OpenClaw sessions.

Also narrows the Codex line that told the model to use `sessions_spawn`
only for OpenClaw/ACP delegation; it now scopes that to internal
legwork, so user-facing deliverables still route to a visible session.
2026-08-18 09:57:52 -07:00
Peter Steinberger 9e24399e82 fix(ci): stop the codex lane hanging on a cold real-tool graph (#125864)
* fix(ci): stop codex lane cold-graph hangs

The side-question domain-policy test loaded the complete agent-harness tool graph inside a one-second readiness race, making the serial non-isolated Codex shard fail or stay silent under cold imports. Build the test's web_search marker and real web_fetch tool from the narrow implementation, then synchronize on turn startup before issuing the tool call. Cap each Codex test process at 12 files so CI gets bounded time-to-first-output as defense in depth.\n\nRefs #125839

* fix(test): keep codex web fetch fixture on sdk boundary

Load the real web_fetch factory on demand through the existing local-only plugin test runtime. This preserves the narrow cold-graph fix without letting a bundled plugin test reach into core internals.
2026-08-18 09:15:38 -07:00
Peter Steinberger 1ed682f883 fix(codex): explain timed-out MCP approvals (#125860) 2026-08-18 08:02:54 -07:00
Peter Steinberger c7022eb117 feat: nudge progress cards only when visible (#125701)
* feat(agents): gate progress card adoption nudge

* fix(agents): gate progress-card nudge on tool policy

* fix(agents): keep tool factory within lint budget
2026-08-18 07:42:20 -07:00
Peter Steinberger efaa867d93 feat(nodes): publish exact runner slots (#125708)
* feat(nodes): publish exact runner slots

* docs(runners): link slot inventory PR

* fix(ui): keep session menus clickable under previews

* perf(protocol): keep runner slot schema off broad barrel

* test(codex): tolerate elapsed media startup budget

* test(codex): type media client factory mocks

* fix(protocol): reject impossible runner slot counts

* test(ci): stabilize loaded lifecycle checks

* test(ui): allow loaded bulk-delete scheduling

* test(ui): stabilize loaded interaction checks

* test(ui): isolate loaded update notice checks

* test(ui): colocate bulk-delete lifecycle coverage

* test(gateway): publish session config before async setup
2026-08-18 07:08:06 -07:00
Peter Steinberger 4589d8514c fix(gateway): stop agent terminal processes after session archive (#125784)
* fix(gateway): stop terminal PTYs on session archive

Bind agent terminals to the durable session incarnation, drain exact ownership during archive, and terminate every job-control process group in the PTY session.\n\nCloses #125769

* test(gateway): cover terminal cleanup on archive

* test(gateway): align terminal outcome assertions

* test(gateway): preserve session exports in invoke test

* fix(gateway): await terminal exit before archive

* test(codex): consolidate supervised instruction coverage

Move the duplicated two-attempt regression into the canonical thread lifecycle test so the exact two-worker extension shard stays bounded on low-core CI.\n\nRelated: #125783
2026-08-18 06:27:42 -07:00
Ayaan Zaidi d412c6b284 fix(codex): inherit agent workspace instructions in native subagents (#125783)
* fix(codex): inherit agent workspace instructions in native subagents via thread developer instructions

* fix(codex): satisfy lint on thread instruction changes

* fix(codex): persist frozen agent instructions across supervised materialization
2026-08-18 17:15:15 +05:30
Jason (Json) 7c65bbcee3 fix(sessions): track context window provenance (#124303)
* fix(sessions): track context window provenance

* fix(sessions): complete context provenance coverage

* fix(sessions): honor authored context window caps

* fix(agents): distinguish context source helpers

* fix(sessions): clear context provenance on model invalidation

* test(codex): preserve local operator authority provenance

* fix(context): clamp effective caps to native windows

* fix(cron): use the runtime model facade

* fix(status): honor session context provenance

* test(status): use public context token inputs

* test(status): split session row cases

* test(status): classify split cases as test support

* test(status): declare runtime context provenance

* fix(sessions): preserve context ownership through finalization

* fix(sessions): apply context provenance to listings

* fix(cron): preserve projected context ownership

* fix(sessions): scope locked context ownership

* fix(status): share session context projection
2026-08-18 05:03:01 -06:00
Peter Steinberger f72782d87b refactor(test): restore auth persistence integrity (#125699)
* test: restore auth persistence integrity

Restore the SQLite-backed auth wizard assertions traced to 43ea501f38 and consolidate duplicated message-action and temp-directory fixtures.

* test: support npm 12 pack results
2026-08-18 02:58:30 -07:00
ClawSweeper 1bf4c1d18c fix(sessions): inherit agent bootstrap outside workspace (#125675)
* fix(sessions): inherit agent bootstrap outside workspace

* fix(sessions): layer execution-dir project context over agent bootstrap

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-08-18 14:23:28 +05:30