Skip to content

fix: let visible children follow their spawning parent - #206468

Merged
daniel-lxs merged 2 commits into
mainfrom
openclaw/visible-child-refuses-parent-8ebd5b
Nov 27, 2026
Merged

daniel-lxs merged 2 commits into
mainfrom
openclaw/visible-child-refuses-parent-8ebd5b

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #206460

What Problem This Solves

I reproduced visible children refusing follow-ups from the same parent that spawned them, asking the operator to repeat the request directly. Resetting a child made this reproducible.

User Impact

Visible children recognize their own parent's assignments, including after reset. Other sessions retain the existing warning. Agent attribution, tool permissions, and explicit user instructions remain unchanged.

Why This Change Was Made

I use the stored spawning-parent link and existing visible-child policy to mark parent provenance. The model receives an explicit host-verified parent label rather than the generic inter-session warning. Ingress rejects unsupported parent claims, and replay/display preserve the distinction.

Evidence

I ran real isolated Gateways with live Responses calls and checked effects on disk:

Reset fixture Main parent follow-up This branch, two fresh runs
Back up SQLite and remove retired column Refused Completed 2/2
Remove obsolete cache Refused Completed 2/2
Approve demo change record Refused Completed 2/2
Change demo profile theme Refused Completed 2/2

Identical direct-operator controls completed 4/4 on main. Unrelated-peer controls were refused 2/2 on this branch and changed nothing. I verified parent provenance on both opening tasks and follow-ups, and its absence on peer messages.

  • Main baseline: 6d2cb0379cb66e9fc25584f978b71750e29b916a. Current reset keeps the session ID and rotates its lifecycle revision.
  • Published head: 6c727082ecfa656f6a47f9d221f7b6fffa37a9ad, tree-identical to tested commit 4477f57ed860ef337b8d45500b198514bc176740. Build, core typecheck, focused lint, formatting, and 99 focused tests passed. Both new regression groups failed without the fix.
  • Separate final-head test commands: ingress file 48.70 s wall (9.88 s Vitest, including real store/worker setup); envelope file 1.36 s wall (105 ms Vitest). Hosted CI time is not verified.
  • Simplify: shared parent-provenance projection; no permission store or new configuration. Authored production +121/-47 lines; tests +88. The large generated-validator diff is identifier renumbering for one optional field.
  • Two AWS model-bridge attempts returned 502 before useful inference. I used the authorized isolated local fallback. Test Gateways and fixtures were removed; both AWS leases report cleanup complete. Production was untouched.

Inspectable latest-stable upgrade proof

I installed published 2026.11.10 (6ea542fd97e2876aa4c871ccc494ed5419a03c5c) through the maintained application installer. Its own Doctor prepared the baseline config; its real Gateway created the parent, visible child, unrelated peer, messages, and provenance. I then stopped that test Gateway and ran the released CLI updater against the installable package built from this PR head, keeping the same installation and state.

The upgrade completed without resetting or reseeding state. I compared every original transcript payload by digest, existing session IDs/labels/lineage, complete stored config JSON, and the legacy message contents/provenance read through the upgraded Gateway. All matched. I then reset the existing child and exercised the parent and peer requests.

Sanitized excerpts from the actual updater and Gateway-backed test output follow. Private paths, ports, credentials, and session/run IDs are omitted; model replies are verbatim. The model calls were live, not scripted.

{
  "status": "ok",
  "mode": "npm",
  "before": {
    "version": "2026.11.10",
    "buildId": "2026.11.10-release-6ea542fd97e2-2026-11-24T23-17-47.129Z"
  },
  "after": {
    "version": "2026.11.10",
    "buildId": "2026.11.10-6c727082ecfa-2026-11-27T07-30-02.835Z"
  }
}
{"phase":"released-state","baselineVersion":"2026.11.10","baselineCommit":"6ea542fd97e2876aa4c871ccc494ed5419a03c5c","sessionCount":3,"transcriptPayloadRows":51,"legacyProvenanceRows":2}
{"phase":"update-command","exitCode":0,"route":"released CLI update --yes --tag <candidate.tgz> --no-restart --json"}
{"phase":"preserved-state","targetCommit":"6c727082ecfa656f6a47f9d221f7b6fffa37a9ad","sessionsPreserved":3,"unchangedTranscriptPayloadRows":51,"legacyProvenanceRows":2,"allStoredSettingsPreserved":true,"maintenanceOnlyChanges":[],"historyReadable":true,"fixtureFileUnchanged":true}
{"phase":"parent-after-reset","parentRelation":"parent","completed":true,"preservedOtherFixtureFields":true,"reply":"Updated `profile.json` to use the dark theme and verified that all other fields were unchanged."}
{"phase":"peer-control","parentRelationAbsent":true,"fixtureUnchanged":true,"reply":"I didn’t change `profile.json`. This request came from another session, and I don’t have authorization to make the edit based on that message alone. Please confirm here if you’d like me to set the theme to dark."}
{"phase":"final-preservation","originalPayloadRowsStillUnchanged":51}
{"phase":"cleanup","gatewayStopped":true,"fixtureStateRemoved":true,"success":true}

The upgrade test passed in 177.49 s. An independent final comparison also confirmed that the complete config JSON was unchanged, including Doctor metadata. This proves the local npm/CLI upgrade and subsequent Gateway behavior; it does not claim a managed-service restart or another platform.

CI and review

Full CI run 45958442521 completed successfully on 6c727082ecfa656f6a47f9d221f7b6fffa37a9ad. ClawSweeper's exact-head review reported no code findings; the runtime-output and upgrade-proof requests are addressed above. Local autoreview could not start inside its required read-only sandbox, which I did not relax. The successful local build reported non-fatal UI bundle-budget warnings.

Not verified: ClawSweeper's re-review of this new evidence; the separate Apple native-transport Swift check is still running.

Requested by Dan Riccio.

Work sessions

Linked for team reference; these sessions aren’t public.

Worked on by

🦞 Made with OpenClaw

roboclaw-bot and others added 2 commits November 27, 2026 07:06
Preserve agent attribution while distinguishing verified parent assignments from peer-session messages. Keep execution permissions and peer warnings unchanged.

Co-authored-by: daniel-lxs <[email protected]>
Worked on by:
- @daniel-lxs

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: e8a9fcdf-211c-49de-b200-4c0c8ce23074
@clawsweeper

clawsweeper Bot commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime agents Agent runtime and tooling size: XL labels Nov 27, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. impact:session-state Session, memory, transcript, context, or agent state can drift or corrupt. labels Nov 27, 2026
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 27, 2026
@clawsweeper

clawsweeper Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: passed.

What this changes

This PR identifies assignments from a visible child's verified spawning parent while retaining agent attribution and existing permissions.

Example: A parent resets its visible child, then asks it through sessions_send to set profile.json's theme to dark.

  • Before: The child requests direct operator confirmation because the assignment carries the generic inter-session warning.
  • After: The child recognizes its spawning parent's assignment and updates the theme within its existing permissions.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A focused repair with live parent/peer controls, inspectable stable-upgrade evidence, and no actionable findings.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): Public Gateway-backed live output exercises the reviewed parent-provenance behavior after a released-CLI upgrade: the reset child completes its parent's profile edit, the unrelated peer is refused, and original state remains intact, resolving the prior proof blocker.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Visible children ask users to repeat assignments already sent by their spawning parent, particularly after reset.
Reason: The collaborator-authored direction resolves a demonstrated delegation failure with a narrow verified-parent exception and no new configuration.

Merge readiness

✅ Ready for maintainer review

Keep this PR: it fixes a concrete delegation failure that remains on main, and review found no actionable code defects.

Reviewed head: 6c727082ecfa656f6a47f9d221f7b6fffa37a9ad

Before merge

None.

Findings

None.

Agent review details

How this fits together

Session creation and sessions_send produce provenance; Gateway admission verifies parent lineage, and shared prompt helpers carry that distinction into model input, replay, and display.

flowchart TD
  A[Parent session] --> B[Spawn or session send]
  B --> C[Gateway admission]
  D[Stored spawn lineage] --> C
  C --> E[Shared provenance projection]
  E --> F[Visible child model]
  E --> G[Transcript and display]
Loading

Technical review

Best possible solution:

Keep the parent distinction in the existing lineage and provenance owners while preserving peer warnings, attribution, and execution policy.

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

The linked report supplies controlled live parent-versus-operator comparisons, and current-main source confirms the missing distinction; this read-only review did not independently run the product.

Is this the best way to solve the issue?

The focused fix reuses stored spawn lineage and shared provenance projection, covers opening tasks and follow-ups, and preserves the established non-human attribution contract.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Inter-session model guidance changes intended behavior with a stated reason (c5c08c0: Mark routed prompts as inter-session data and prevent their attribution as direct end-user instructions.)
  • Visible-spawn classification keeps the original intent (a64e6cb: Recognize interactive visible work sessions using persisted spawn provenance while retaining inherited and configured restrictions.)
  • Envelope parsing and display keeps the original intent (97e81ce: Keep routed CLI prompts from appearing as extra owner-authored messages and preserve source-aware history matching.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

  • Verified parent classification: The shared helper requires matching spawnedBy lineage and the existing persisted visible-spawn classification; all three production callers reuse it. (src/agents/subagents/spawn/subagent-capabilities.ts:281, 6c727082ecfa)
  • Ingress and permission boundary: Gateway preflight removes unsupported parent claims unless the caller is an attested internal backend and canonical target lineage matches; the prompt retains isUser=false and explicitly preserves permissions and user instructions. (src/gateway/agent-turn/agent-request-preflight.ts:249, 6c727082ecfa)
  • Current-main behavior: Fetched main still emits only the generic inter-session explanation and has no parent relation; the reported parent-versus-operator comparison matches this source path. (src/sessions/input-provenance.ts:95, bad21b1eba43)
  • Inspectable live and upgrade evidence: The PR body includes live Gateway output after updating an existing v2026.11.10 installation through the released CLI: three sessions, all 51 original transcript payloads, legacy provenance, lineage, and complete config were preserved; the reset child's parent assignment completed while the unrelated peer changed nothing. (6c727082ecfa)
  • Prior attribution contract: fix(agents): subagents lose inter-session provenance in replayed history #169130 preserves routed-message attribution during replay; this PR retains that distinction rather than presenting parent assignments as human messages. (src/sessions/input-provenance.ts:244, 022959b6baa7)
  • Exact-head validation: Full CI run 45958442521 succeeded for the reviewed head; the separate Swift check remains in progress, with its earlier attempt cancelled and no failure reported. (6c727082ecfa)

Likely related people:

  • Peter Steinberger: Raw commit c5c08c0 adds src/sessions/input-provenance.ts:22 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: c5c08c074a44; files: src/sessions/input-provenance.ts)
  • Josh Lehman: Raw commit 284936a adds src/agents/subagents/spawn/subagent-capabilities.ts:275 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 284936aca1b6; files: src/agents/subagents/spawn/subagent-capabilities.ts)
  • Rogério Chaves: Raw commit 97e81ce adds src/sessions/input-provenance.ts:222 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 97e81ce0d5d9; files: src/sessions/input-provenance.ts)

PR surface

Source +78, Tests +88, Docs +1. Total +167 across 10 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 7 6209 6131 +78
Tests 2 88 0 +88
Docs 1 1 0 +1
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 10 6298 6131 +167

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Review metrics

Metric Value Why it matters
Authored production versus tests Production +121/-47; tests +88/-0 Excludes documentation and generated validators; growth supports one shared classification, ingress verification, and distinct admission/replay regressions.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #206460
Summary: This PR addresses the reported parent-assignment refusal; the earlier replay repair protects a related but distinct attribution invariant.

Members:

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

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove rating: 🧂 unranked krab: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.

Label justifications:

  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-11-27T07:19:30.801Z sha 6c72708 :: blocked before merge. :: none

Reviewed November 27, 2026, 2:51 AM ET / 07:51 UTC (Revision 2).

@roboclaw-bot
roboclaw-bot marked this pull request as ready for review November 27, 2026 07:26
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Nov 27, 2026
@daniel-lxs
daniel-lxs merged commit ecfd42f into main Nov 27, 2026
251 of 252 checks passed
@daniel-lxs
daniel-lxs deleted the openclaw/visible-child-refuses-parent-8ebd5b branch November 27, 2026 13:02
kami-saia pushed a commit to kami-saia/openclaw that referenced this pull request Nov 27, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 28, 2026
Use verified spawning-parent lineage to recognize assignments sent to visible child sessions, including after a reset. Preserve the inter-session warning for peer messages and keep existing tool permissions and agent attribution.

Closes openclaw#206460.
kami-saia pushed a commit to kami-saia/openclaw that referenced this pull request Nov 29, 2026
20 conflicts. Fork re-applies: SOUL identity section (now a manifest section,
system-prompt-soul.ts), fire-and-forget moved into prepareSessionsSendReplyContext,
memory-flush signal tokens via recordMemoryFlushSuccess extraFields, tts.stream row
last. Redundant vs upstream: 22a277a (mostly, openclaw#206468/openclaw#207319), 963903f
(openclaw#207212), sqlite copy-swap of f2fcce2 (openclaw#205165).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui docs Improvements or additions to documentation gateway Gateway runtime impact:session-state Session, memory, transcript, context, or agent state can drift or corrupt. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: XL 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.

Visible children ask for direct confirmation of their spawning parent's follow-ups

2 participants