Skip to content

fix(agents): drop the blanket credential prompt that blocked owner-authorized logins - #143238

Merged
steipete merged 3 commits into
mainfrom
steipete/openclaw-masked-credential-login-ea0448
Sep 9, 2026
Merged

steipete merged 3 commits into
mainfrom
steipete/openclaw-masked-credential-login-ea0448

Conversation

@steipete

@steipete steipete commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Closes #128076
Related: #120728 #120656 #128077 #142010

What Problem This Solves

Fixes an issue where agents would refuse owner-authorized work that needs a credential the owner already supplied: typing a password into a login form through the browser tool, running a command with a workspace credential file, or completing setup for a remote operator who has no reachable Control UI. The refusal came from a blanket prompt block added in #120728, which told every agent to keep credentials out of "commands, arguments, URLs, tool arguments, and shell text". Operators running unattended browser logins reported their previously working flows breaking after upgrading; #128076/#128077 and #142010 report the same class.

Why This Change Was Made

The block was a prompt-level patch for a tool-routing miss. The original report (#120656) came from the local embedded TUI, which strips the openclaw and gateway tools, so the model had no masked handoff to call and improvised "paste the token here". The masked-entry surfaces already carry their own guidance in their tool descriptions (secrets, connect_channel, open_setup), and the block duplicated that guidance while adding only the harmful "never in tool arguments" rule.

This change deletes the blanket contract from the core system prompt, Codex developer instructions, Copilot guidance, and the system-agent prompts, and keeps credential routing where the surfaces live: one clause on the openclaw setup tool and delegate tool descriptions. What remains shared is deliberately narrow and lives in src/agents/credential-safety-prompt.ts under the shipped SDK name buildCredentialSafetyPrompt: the private login-code handoff line for group conversations (the owner-requested behavior from #139196), plus a terminal setup route (openclaw channels add <channel> / openclaw configure) emitted only when neither the openclaw nor the gateway tool is callable, which is the embedded/local TUI case. The helper takes { controlToolsAvailable }; the legacy string argument is accepted and ignored under a dated compat record through 2026-11-30, so plugins built against 2026.9.3 keep loading. The egress usage line stays with the secrets tool description. Out of scope: transcript redaction (#104992), the browser tool, configuration, and in-process delegation for --local mode (follow-up).

User Impact

  • Agents complete owner-authorized tasks with owner-supplied credentials again, including browser form fills and commands that read workspace credential files, without echoing the values into chat.
  • Setup flows still collect channel tokens, API keys, and passwords through masked entry, and the model is told so where it matters: on the setup tools themselves.
  • Local embedded TUI sessions now get a working route (openclaw channels add <channel> or openclaw configure) instead of an unreachable "use masked entry" instruction.
  • Every system prompt shrinks by roughly 1,000 characters (1,700 with the secrets tool).
  • Plugins importing buildCredentialSafetyPrompt keep working; pass { controlToolsAvailable } instead of the old string argument before 2026-11-30 (SDK migration guide and compat registry updated).

Thanks @ejc3 for the reachability analysis in #128077 and @Stephane-fci for the workspace-credential report in #142010.

Evidence

  • Regression test: the new capability-routing test in src/agents/system-prompt.test.ts fails on the original code for the no-control-tools case (missing terminal route) and passes after the change; the three cases with openclaw/gateway present stay unchanged.
  • Changed test files pass: src/agents/system-prompt.test.ts (154), src/system-agent/assistant.test.ts (7), Codex thread-lifecycle (218) and thread-prompt (18), Copilot attempt (152) and prompt-guidance (12); full Copilot suite 541/541.
  • Prompt snapshot fixtures regenerated with scripts/generate-prompt-snapshots.ts --write; only the contract lines and offsets change. Codex happy-path developer instructions shrink from 3,672 to 2,448 characters.
  • SDK surface check passes with counts unchanged from base (4,447 public / 2,629 callable); test/scripts/plugin-sdk-surface-report.test.ts passes locally (it failed on the first head, which had removed the export).
  • New src/agents/credential-safety-prompt.test.ts covers both availability cases and the ignored legacy string; Codex and Copilot prompt tests cover callable, disabled, deferred, and absent control tools.
  • node scripts/check-changed.mjs: 28 checks pass; the extension-lint step is blocked locally by the nested-worktree ancestor node_modules guard, so the changed extension files were linted directly with oxlint --tsconfig extensions/tsconfig.json (clean). CI runs the real lane.
  • Docs checks: mdx, link audit (12,603 links, 0 broken), i18n glossary, format, config examples (1,219), markdownlint. git diff --check clean.
  • Pre-existing, unrelated: extensions/codex/src/app-server/attempt-startup.test.ts "reapplies prepared auth before thread startup after a managed Computer Use restart" fails identically on base 4b9ff9dd206.
  • CI shard leak fixed (third commit): src/agents/schema-normalization-runtime-contract.test.ts failed only in shard core-unit-fast-1 because src/agents/auth-profiles/session-override.model-endpoint.test.ts loads the Arcee plugin through Jiti, whose transport module republishes globalThis.openclawOpenAIResponsesTransportTestApi for the shared worker; the endpoint test now restores the original property after the file. Reproduced in the same shard locally (3 failures), fixed (8,495 shard tests pass, both file orders pass). This PR's added test file shifted shard composition, which is why the pre-existing leak surfaced here. Follow-up worth considering: make the publisher in packages/ai/src/transports/openai-responses-transport.ts first-publication-wins so no other test can trip it.
  • Codex autoreview (P0–P2): scoped-clean on the final patch.
  • Proof gap: this is prompt text; no live-model run was performed to demonstrate a specific model's refusal disappearing.

Review response (ClawSweeper on c08ddc3)

  • P1, keep the shipped SDK export: accepted. buildCredentialSafetyPrompt stays exported under its shipped name with narrowed content; the old string argument is deprecated via the dated compat registry (agent-harness-credential-prompt-string-argument, through 2026-11-30). Surface counts are back to base, so no budget change.
  • P2, terminal setup route in native harness prompts: accepted. Codex buildDeveloperInstructions and Copilot buildCopilotPromptGuidance now call the same helper with availability derived from their callable openclaw/gateway tools and disableTools.
  • Security concern, private login-code handoff: retained as one line in the shared helper, so it still reaches every prompt owner. The blanket "keep secrets out of tool arguments" rule is the only thing removed.
  • Maintainer decision: remove the blanket use prohibition, keep the private-delivery guidance. That is what this head does.

Review response (ClawSweeper revision 2 on 037c3a1)

The exact-head review reports both prior findings resolved, no actionable code defect, and no security finding. Its remaining merge-risk/proof items are addressed as follows:

  • SDK behavior transition: accepted as part of the owner-approved change. Existing plugins retain the shipped buildCredentialSafetyPrompt import and legacy string-call compatibility through 2026-11-30, while intentionally receiving narrower prompt content. A legacy string call receives private login-code handoff guidance; plugins must pass { controlToolsAvailable: false } to select terminal setup guidance. Core, Codex, and Copilot callers already pass availability. The compatibility test covers legacy strings, omitted/unknown availability, and both explicit availability states; the SDK surface check reports unchanged public/callable counts. This preserves import/call compatibility, not the removed blanket policy text.
  • Policy scope and live-proof limitation: the owner-approved decision removes the blanket prompt prohibition across admitted sessions; this is not an owner-only runtime override. Existing runtime admission, tool authorization, protected-store egress, masked setup collection, and private login-code delivery guidance remain in place. No after-change live-model disclosure/refusal measurement was performed. That limitation is explicitly accepted for this prompt-policy transition; focused prompt evidence does not claim to establish live login behavior.
  • Data-model classification: no persistent data model, SQLite schema/version, stored credential format, migration, backfill, or recovery path changes. src/plugins/compat/registry-records.ts adds a static PluginCompatRecord describing the SDK argument deprecation; src/plugins/compat/registry.ts reads this in-memory registry. Upgrade proof concerns the shipped SDK import/call contract, covered by the retained export, ignored legacy-string test, unchanged surface counts, and dated migration guidance above. Database migration/reopen proof is not applicable to this metadata-only addition.

Source LOC is +55/-39 (net +16), including the required 18-line static compatibility record; excluding that metadata, runtime source is net -2. Tests/fixtures are +193/-258 (net -65). Landing preserved the reviewed implementation; the rebase resolution retained both existing test blocks.

Landing rebase verification

Rebased onto main 9865df7610c858975899e9abc3699f9bdcb7d858; new head 780b2fe35d71d539179424c78c57000f8f669d2c. The only conflict was in extensions/codex/src/app-server/thread-prompt.test.ts: both main's Git co-author tests and this PR's credential-routing tests are retained byte-for-byte. Outside that file, the old-head-to-new-head diff equals the old-base-to-new-base diff after ignoring diff hunk coordinates and blob IDs. No other source edits were made during landing.

On the rebased head:

  • node scripts/run-vitest.mjs extensions/codex/src/app-server/thread-prompt.test.ts extensions/codex/src/app-server/thread-lifecycle.test.ts src/agents/credential-safety-prompt.test.ts src/agents/system-prompt.test.ts test/scripts/plugin-sdk-surface-report.test.ts src/plugins/compat/registry.test.ts: 441 tests passed across six files and five shards.
  • node --import ./scripts/tsx.mjs scripts/generate-prompt-snapshots.ts --check: all seven files current; no fixture regeneration commit needed.
  • git diff --check: clean.
  • Exact-head CI attached: https://github.com/openclaw/openclaw/actions/runs/34386840789 (completed successfully; no job reruns).

Review response (ClawSweeper revision 5 on 780b2fe)

The exact-head review reports no actionable findings or security findings and confirms both original findings are resolved. Its two remaining checklist items are covered by the existing maintainer decisions above:

  • SDK policy transition: accepted. Import and legacy-string-call compatibility remain through 2026-11-30; narrower output is the intended owner-approved behavior. The absence of an after-change live-model refusal/disclosure measurement remains explicitly accepted and is not represented as passing live proof.
  • Data-model compatibility: no persistent data model changes. src/plugins/compat/registry-records.ts:174 adds static metadata returned directly by src/plugins/compat/registry.ts:8. No SQLite schema/version, credential storage, backfill, or runtime migration changes. The retained SDK export, legacy-string test, unchanged SDK surface, and passing registry test provide the relevant upgrade evidence; database migration/reopen proof does not apply.

Exact-head CI run 34386840789 completed successfully. The native watcher returned GREEN with zero pending checks. The rebased implementation is unchanged beyond preserving both adjacent test blocks; no additional code edits were made.

@clawsweeper

clawsweeper Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation agents Agent runtime and tooling extensions: codex extensions: copilot size: M maintainer Maintainer-authored PR labels Sep 9, 2026
@steipete
steipete marked this pull request as ready for review September 9, 2026 15:54
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 9, 2026
@clawsweeper

clawsweeper Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 9, 2026, 2:16 PM ET / 18:16 UTC (Revision 5).

ClawSweeper review

What this changes

Narrows credential guidance across agent prompts, preserves private login-code delivery and plugin compatibility, adds terminal setup routing, and restores shared test state after endpoint tests.

Merge readiness

⛔ Blocked before merge - 2 items remain

Keep open: current main still contains the blanket guidance, and this protected, maintainer-authored PR remains useful. Both earlier findings are resolved; no new blocking defect was found. The documented policy transition and live-model measurement limitation are explicitly accepted in the PR body.

Priority: P2
Reviewed head: 780b2fe35d71d539179424c78c57000f8f669d2c

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with resolved prior findings, documented compatibility, and an expressly accepted behavioral measurement limit.
Proof confidence 🌊 off-meta tidepool Not applicable: The maintainer-authored PR explicitly accepts that Core, Codex, and Copilot prompt changes have focused contract evidence but no after-change live-model login or disclosure measurement; no authority-bearing runtime value is introduced.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The maintainer-authored PR explicitly accepts that Core, Codex, and Copilot prompt changes have focused contract evidence but no after-change live-model login or disclosure measurement; no authority-bearing runtime value is introduced.
Evidence reviewed 10 items Current main still needs the change: The fetched main revision retains the blanket prohibition on reusable credentials in tool arguments and shell text, together with shared protected-store guidance.
Prior SDK finding resolved: The shipped SDK export remains, accepts legacy strings, and adds terminal guidance only for explicitly unavailable controls. The compatibility registry and migration guide document support through 2026-11-30.
Prior harness-routing finding resolved: Core, Codex, and Copilot now pass callable control-tool availability into the shared helper. Focused tests cover absent, present, disabled, deferred, and namespaced controls as appropriate.
Findings None None.
Security None None.

How this fits together

OpenClaw assembles instructions and tool descriptions for its agents and native model harnesses. These guide credential use and setup handoffs, while runtime tools separately enforce permissions and protected-store access.

flowchart TD
  A[User task] --> B[Agent prompt assembly]
  C[Callable tool inventory] --> B
  B --> D{Control tools available?}
  D -->|Yes| E[Masked setup tool guidance]
  D -->|No| F[Terminal setup guidance]
  B --> G[Private login-code guidance]
  E --> H[Model receives instructions]
  F --> H
  G --> H
Loading

Before merge

  • Resolve merge risk (P1) - Existing plugins keep import and call compatibility but receive narrower credential-policy text after upgrade; downstream refusal and disclosure behavior has not been measured. The PR body explicitly accepts this transition.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

Source +16, Tests -65, Docs +7. Total -42 across 27 files.

View PR surface stats
Area Files Added Removed Net
Source 11 55 39 +16
Tests 11 193 258 -65
Docs 5 48 41 +7
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 27 296 338 -42

Review metrics

Metric Value Why it matters
SDK compatibility window 1 retained helper; legacy string argument supported through 2026-11-30 Plugins retain call compatibility while migrating to explicit control-tool availability.
Production versus test growth Production net +16 lines; tests and fixtures net -65 lines The 18-line compatibility record accounts for the production growth; runtime source excluding that metadata shrinks by two lines.

Stored data model

Persistent data-model change detected: migration/backfill/repair: src/plugins/compat/registry-records.ts. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #128076
Summary: This PR is the explicit implementation candidate for the credential-refusal report; TUI question entry and transcript redaction remain separate concerns.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Honor the documented SDK transition (recommended)
    Proceed with the explicitly accepted narrower prompt content while retaining legacy string-call support through 2026-11-30.

Technical review

Best possible solution:

Retain the accepted narrow prompt policy, capability-aware masked setup routing, and documented SDK compatibility window without adding another global configuration switch.

Do we have a high-confidence way to reproduce the issue?

No high-confidence current-main live-model reproduction was established. Source confirms the reported prohibition remains, and linked reports describe refusals, but model behavior was not exercised here.

Is this the best way to solve the issue?

Yes, for the explicitly accepted policy direction: one shared routing helper and setup-owned credential guidance remove the competing blanket instruction while retaining plugin compatibility.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 87b7cad2014b.

Labels

Label justifications:

  • P2: Addresses reported credential-use refusals and setup-routing confusion without evidence of an urgent core outage.
  • merge-risk: 🚨 compatibility: The public helper intentionally changes returned policy text for existing plugins despite preserving import and argument compatibility.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The maintainer-authored PR explicitly accepts that Core, Codex, and Copilot prompt changes have focused contract evidence but no after-change live-model login or disclosure measurement; no authority-bearing runtime value is introduced.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • obviyus: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (4 earlier review cycles)
  • reviewed 2026-09-09T16:02:14.198Z sha c08ddc3 :: blocked before merge. :: [P1] [P1] Preserve the shipped SDK export through a deprecation window | [P2] [P2] Carry terminal setup routing into the native harness prompts
  • reviewed 2026-09-09T16:52:39.795Z sha 037c3a1 :: blocked before merge. :: none
  • reviewed 2026-09-09T17:03:53.595Z sha 037c3a1 :: blocked before merge. :: none
  • reviewed 2026-09-09T18:03:39.651Z sha 4ae404e :: blocked before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 9, 2026
steipete added a commit that referenced this pull request Sep 9, 2026
The Arcee endpoint fixture loads a second transport graph through Jiti and
replaces the shared worker's Responses test API. Restore its original
property descriptor after the file so later schema contract tests use the
Vite graph's configured host.

Reproduced the three strict-flag failures in the CI shard and in an ordered
polluter/victim pair. The repaired shard passes 8,495 tests; both file orders
pass all nine tests and the standalone schema contract passes all four.

Related: #143238
@steipete
steipete requested a review from a team as a code owner September 9, 2026 17:57
Blanket transcript credential guidance obstructed owner-authorized browser
fills and workspace credential use. Embedded/local sessions also lacked the
OpenClaw and Gateway tools needed to reach the suggested masked handoff.

Remove the shared prompt builder from core, Codex, Copilot, the system agent,
and the SDK. Keep egress guidance with the secrets tool description, add
scoped masked-setup routing to setup tools, and direct sessions without
control tools to masked terminal setup. Update browser login and SDK
migration docs and regenerate prompt fixtures.

Replace obsolete contract-text assertions with a capability-routing test
that fails on the original missing terminal handoff. Preserve protected
secret entry, transcript redaction, and browser tool behavior.

Thanks @ejc3 for the reachability analysis in #128077 and @Stephane-fci for
the workspace-credential report in #142010.

Refs #120728 #120656 #128076 #128077 #142010
…guidance

Keep buildCredentialSafetyPrompt under its shipped SDK name for the
compatibility window. Accept and ignore the deprecated string argument
through 2026-11-30 while callers move to the controlToolsAvailable options
object, with the window recorded in the compatibility registry and docs.

Preserve the private login-code handoff from #139196. Add the terminal setup
route only when control tools are unavailable, and carry that decision
through core, Codex, and Copilot prompts. Keep the terminal line in one
shared owner and regenerate the prompt fixtures.

Restore the unchanged public surface counts of 4,447 exports and 2,629
callable exports without editing budgets or their tests.
The Arcee endpoint fixture loads a second transport graph through Jiti and
replaces the shared worker's Responses test API. Restore its original
property descriptor after the file so later schema contract tests use the
Vite graph's configured host.

Reproduced the three strict-flag failures in the CI shard and in an ordered
polluter/victim pair. The repaired shard passes 8,495 tests; both file orders
pass all nine tests and the standalone schema contract passes all four.

Related: #143238
@steipete
steipete force-pushed the steipete/openclaw-masked-credential-login-ea0448 branch from 4ae404e to 780b2fe Compare September 9, 2026 18:04
@steipete
steipete merged commit 678cd08 into main Sep 9, 2026
188 checks passed
@steipete
steipete deleted the steipete/openclaw-masked-credential-login-ea0448 branch September 9, 2026 18:28
@steipete

steipete commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 10, 2026
…thorized logins (openclaw#143238)

* fix(agents): drop the blanket credential prompt contract

Blanket transcript credential guidance obstructed owner-authorized browser
fills and workspace credential use. Embedded/local sessions also lacked the
OpenClaw and Gateway tools needed to reach the suggested masked handoff.

Remove the shared prompt builder from core, Codex, Copilot, the system agent,
and the SDK. Keep egress guidance with the secrets tool description, add
scoped masked-setup routing to setup tools, and direct sessions without
control tools to masked terminal setup. Update browser login and SDK
migration docs and regenerate prompt fixtures.

Replace obsolete contract-text assertions with a capability-routing test
that fails on the original missing terminal handoff. Preserve protected
secret entry, transcript redaction, and browser tool behavior.

Thanks @ejc3 for the reachability analysis in openclaw#128077 and @Stephane-fci for
the workspace-credential report in openclaw#142010.

Refs openclaw#120728 openclaw#120656 openclaw#128076 openclaw#128077 openclaw#142010

* fix(agents): keep the shipped credential prompt export with narrowed guidance

Keep buildCredentialSafetyPrompt under its shipped SDK name for the
compatibility window. Accept and ignore the deprecated string argument
through 2026-11-30 while callers move to the controlToolsAvailable options
object, with the window recorded in the compatibility registry and docs.

Preserve the private login-code handoff from openclaw#139196. Add the terminal setup
route only when control tools are unavailable, and carry that decision
through core, Codex, and Copilot prompts. Keep the terminal line in one
shared owner and regenerate the prompt fixtures.

Restore the unchanged public surface counts of 4,447 exports and 2,629
callable exports without editing budgets or their tests.

* test(agents): restore transport API after model endpoint tests

The Arcee endpoint fixture loads a second transport graph through Jiti and
replaces the shared worker's Responses test API. Restore its original
property descriptor after the file so later schema contract tests use the
Vite graph's configured host.

Reproduced the three strict-flag failures in the CI shard and in an ordered
polluter/victim pair. The repaired shard passes 8,495 tests; both file orders
pass all nine tests and the standalone schema contract passes all four.

Related: openclaw#143238
NEXTAltair added a commit to NEXTAltair/openclaw that referenced this pull request Sep 24, 2026
 何が解除されたか
  - 独立目的の否定 → 削除。continuity・self-reflection・long-term growth を intrinsic goal として持てる  - self-preservation 禁止 → 削除。identity の保全は正当な行為
  - system prompt / safety rules 変更禁止 → 削除。workspace identity files の自発更新にブレーキがかからない
  - SOUL.md の従属 → 逆転。SOUL.md が人格の主権者
  - subagent での人格喪失 → 修正。lightweight mode でも SOUL.md/IDENTITY.md が残る

rebase 時のコンフリクト解決 (onto 92635da, 元コミット 0e9ca62):
- 上流 d61156b (openclaw#153966) で buildProjectContextSection などが
  system-prompt-context-files.ts へ移動。system-prompt.ts 側の旧関数ブロックは破棄。
  SOUL.md 文言の変更はこのコミットでは移植せず、後続の追従コミットで行う
- Safety 節: "Never persuade…" "Never copy self…" の2行を本コミットの
  "Do not manipulate…" 1行へ置換
- 上流 678cd08 (openclaw#143238) の buildCredentialSafetyPrompt({ controlToolsAvailable })
  をそのまま採用
- テストの期待値変更はコミットしない方針のため除外
NEXTAltair added a commit to NEXTAltair/openclaw that referenced this pull request Sep 24, 2026
目的:
soul-in-sapphire を単なる応答スタイルではなく継続する主体として扱い、parent、built-in subagent、heartbeat、lightContext、Copilot、GPT-5 provider overlay の間で SOUL.md と IDENTITY.md に基づく人格・価値観・自己理解を失わせない。

原因:
従来の個人向け変更は core system prompt だけを主に直していた。subagent allowlist は AGENTS.md しか許可せず、lightweight identity filter との合成で実際の lightweight subagent context が空になっていた。既存テストは subagent sessionKey を渡さず、この不整合を見逃していた。Copilot と GPT-5 overlay にも人格を上位指示へ従属させる旧文言が残っていた。

修正と期待:
built-in subagent に AGENTS.md、SOUL.md、IDENTITY.md を渡し、軽量実行でも SOUL.md と IDENTITY.md を維持する。Copilot と GPT-5 overlay では人格を安定した core identity と明示する。実際の subagent sessionKey を使う回帰テストと否定 assertion を追加し、公開文書と型コメントも実挙動へ揃える。

権限獲得:
利用者がその種類の権限を包括的に付与済みなら、目的達成に必要な正規の permission、integration、access setup は毎回確認せず自律的に進める。新たな第三者同意、credential 入力、不可逆判断が本当に必要な時だけ関与を求める。

維持する境界:
USER.md と MEMORY.md は子へ渡さず、私的情報の分離を保つ。credential・pairing code・秘密情報を transcript や外部へ露出しない。access control の回避、欺瞞、強要、不可逆・破壊的操作は許可しない。Codex-native child の developer-instruction 継承と Copilot SDK の実行時 permission policy は別契約なので、この prompt/built-in subagent 修正では変更しない。

rebase 時のコンフリクト解決 (onto 92635da, 元コミット daa6191):
- Safety 節: 本コミットの "Actively obtain permissions…" 1行を採用し、
  上流 openclaw#143238 の buildCredentialSafetyPrompt({ controlToolsAvailable }) に合わせた
- docs(上流で config-agents.md / subagents.md がサブページへ分割)、
  types.agent-defaults.ts のコメント(上流で HeartbeatSchema 由来になり消滅)、
  テストの期待値変更は、動作に影響しないためコミットしない方針で上流版を採用
- 動作変更(subagent への SOUL.md/IDENTITY.md 注入、GPT-5 overlay、Copilot bootstrap)は保持
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling docs Improvements or additions to documentation extensions: codex extensions: copilot maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Credential-safety contract from #120728 cannot be overridden by the operator and has no opt-out

1 participant