Skip to content

fix(knowledge): scope conversation learning to its agent - #205665

Merged
RomneyDa merged 4 commits into
mainfrom
openclaw/knowledge-scope
Nov 26, 2026
Merged

RomneyDa merged 4 commits into
mainfrom
openclaw/knowledge-scope

Conversation

@tideclaw-bot

@tideclaw-bot tideclaw-bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

The Knowledge conversation-learning scribe could read transcripts outside the agent that runs it when ordinary session visibility is broad. Ref: #205581.

Fix

For Run once and ongoing conversation learning, cap session listing and history reads at the owning agent, without widening stricter visibility. The scribe uses these bounded tools rather than transcript search. Checkpoints remain progress cursors: an old entry is not permission to read a session that is absent from this run’s list.

The cap is switched on only for:

  • a scheduled run whose job declarationKey is exactly knowledge:scribe:conversations, or
  • a turn whose run ID starts with knowledge:scribe:conversations:<this run's own session key>: (the Scribes page start request).

A caller-chosen run ID can only narrow tools. Every other run keeps today's session-tool behavior.

No schema or data migration is needed. Existing checkpoints, claims, and evidence are left unchanged. The docs explain how a vault owner can review historical claims and citations.

Error surfaces

Full diff against merge-base 3fa253a2dc68. This PR adds no throws, exits, rollback triggers, or turn/update failures, and does not touch update, Doctor, migration, config validation, or startup paths. The only new failures are tool results returned to the model inside an agent-only scribe run.

New or changed failure path Can it fire for a healthy user? Rollback/outage risk Decision
invocation_agent_scope_restricted (forbidden, "This run can read only its own agent's sessions.") from sessions_history on another agent's key, via the shared session-access check Only inside an agent-only scribe run that asks for another agent's session. Never for the run's own agent: the check runs only when target agent ≠ requester agent. Never outside scribe runs: the flag is unset. None. It is a tool result, the turn continues. Kept. It prevents a scribe from copying another agent's private conversations into this agent's vault (#205581).
sessions_list in a scribe run: agentId clamped to the run's agent, other agents' rows filtered, visibility.restricted: true Same scope as above. It filters results and is not an error. None Kept. Same reason.
sessions_history with a bare session ID in a scribe run resolves only inside the run's agent, so other agents' IDs return the existing "Session not found" Same scope. Own session IDs still resolve (proven below). None Kept. Without it, a session ID would bypass the key check.
sessions_search in a scribe run returns forbidden ("Use sessions_list and sessions_history for this agent-scoped run.") Only if a scribe run calls search. The learning skill never does. Ordinary runs are unchanged (proven below). None Kept. Transcript recall can return cross-agent descendants. Agent-scoping the recall index would be a much larger change.
Early sessions_history refusal ("…only its own agent's session history.") It could refuse a run's own current session when agents.defaults.sessionStore.agentId pins a different agent — Removed in 9a23272. The shared access check above already covers it.
sessions_list visibility checker switched to the core decision checker No: only .allowed is read, and requester derivation matches main None Kept, behavior-neutral. 9a23272 dropped an explicit requesterAgentId that could have changed ordinary list results.

Accepted edge: a fixed shared session store (agents.defaults.sessionStore.agentId) attributes legacy, non-agent-qualified rows to that store's agent. In a scribe run for a different agent, those rows count as cross-agent and are skipped. The run fails closed and visibly, and nothing outside scribe runs changes.

Evidence

End-to-end on exact head 9a23272911d93ee98cfa5534c76f8b1f37c5b44c, before = merge-base 3fa253a2dc68. Each side ran a real in-process Gateway with its own HOME, state, config, and loopback port, inside the repository's isolated Vitest adapter. That ran in private rootless Podman (network=none) with task-owned storage and runtime dirs, not the default store or the live Gateway. Config had agents main, alpha, and beta and the default tools.sessions.visibility. Sessions were seeded with chat.send. A deterministic loopback model issued the tool calls.

Check, beta's runs before 3fa253a2 after 9a23272
Run once (Scribes start ID + generated prompt): sessions_list / with agentId: alpha 3 alpha listed 4 beta only / clamped to 4 beta
Run once: alpha history by key / by session ID / via old checkpoint key ALPHA content read forbidden / not found / forbidden
Run once: sessions_search alpha content forbidden
Run once: own beta1, beta2 (checkpoint), beta1 by session ID, current readable readable
Scheduled (declarationKey: knowledge:scribe:conversations, cron.run force): list / list agentId: alpha / alpha key / checkpoint alpha key / own beta1 / current alpha listed and read beta only / beta only / forbidden / forbidden / readable / readable
Control, ordinary beta conversation (random run ID): list agentId: alpha, alpha history by key and by ID, sessions_search, current 3 alpha, read, read, ok, ok same: 3 alpha, read, read, ok, ok, not restricted
Control, ordinary automation (no declaration key, same agent, cron.run force): list agentId: alpha, alpha history 2 alpha, read same: 2 alpha, read, outcome ok

Result: after, 2/2 passed (exit 0, 311 s wall including the in-container build; tests 38.6 s). Before failed on the scribe rows (alpha listed and read). A second before run used expect.soft on the two scribe tables, the only spec difference, so the control rows could run on main. They passed and match the after rows. Image mcr.microsoft.com/playwright:v1.64.1-noble = sha256:a0d7b2b49ffa…; Node v26.12.1, pnpm 12.15.0, Vitest 5.0.5. The scratch spec (sha256 7d4409a6aa77…) was staged only and not committed.

umask 022; HOME=$root/home XDG_RUNTIME_DIR=$root/runtime npm_execpath=<pnpm 12.15.0 native> \
  node scripts/run-vitest.mjs --isolated-image sha256:a0d7b2b4… run \
  --config test/vitest/vitest.e2e.config.ts --configLoader runner \
  src/gateway/knowledge-scribe-scope.proof.e2e.test.ts --maxWorkers=1

Gaps:

  • The model is scripted, so this does not show whether a real model follows the updated learning.md text. The refusal is enforced at the tool either way.
  • The "old checkpoint" was supplied as note text in the prompt, not a Knowledge vault page.
  • The Scribes page's start request was reproduced with the same idempotency key and prompt builder. This was not a Control UI click-through.
  • Not proven end to end: the fixed shared session-store edge case above.
  • The affected behavior is present in release/2026.11.11 by source inspection. No release changes were made.

Review requested from @jalehman and @openclaw/openclaw-secops. Keep CODEOWNERS and security review gates in place.

Worked on by

tideclaw-bot and others added 2 commits November 26, 2026 01:16
Worked on by:
- @RomneyDa

Co-authored-by: RomneyDa <[email protected]>
OpenClaw-Publication: f4ee47f-60ff-4553-a51c-ea272fa46a6c
@clawsweeper

clawsweeper Bot commented Nov 26, 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 agents Agent runtime and tooling plugin: knowledge size: M labels Nov 26, 2026
@tideclaw-bot

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@tideclaw-bot
tideclaw-bot requested review from a team and jalehman November 26, 2026 01:18
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. impact:security Security boundary, credential, authz, sandbox, or sensitive-data risk. impact:session-state Session, memory, transcript, context, or agent state can drift or corrupt. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment 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. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 26, 2026
@clawsweeper

clawsweeper Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR limits conversation-learning scribes to their own agent’s sessions and documents how to review previously copied Knowledge.

Example: Agent beta runs Learn from conversations while agent alpha has private conversations.

  • Before: Beta can list alpha’s sessions and copy their contents into beta’s Knowledge store.
  • After: Beta’s scribe lists beta sessions only, refuses alpha history reads, and cannot use transcript search.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The focused patch has useful production-boundary evidence and no definite findings, but required real-model Knowledge proof remains incomplete.
Proof confidence 🦪 silver shellfish (2/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: A per-agent Knowledge scribe silently saves another agent’s conversations into its own store.
Reason: The released report establishes durable cross-agent contamination, and the maintainer-authored direction narrowly repairs future ingestion while documenting historical cleanup.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR addresses a verified ingestion bug that remains on main; no definite introduced defect was found.

Reviewed head: 9a23272911d93ee98cfa5534c76f8b1f37c5b44c

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The PR owner should provide redacted real-model Gateway evidence with Knowledge loaded, showing own-agent ingestion and persisted checkpoint progress while foreign conversations and an existing foreign checkpoint entry produce no new claims.
Agent review details

How this fits together

Knowledge scribes run agent turns through the Gateway; tool construction applies the scribe ceiling before session inventory or transcript results reach the model.

flowchart TD
  A[Scribes start request] --> C[Agent tool construction]
  B[Scheduled execution context] --> C
  C --> D[Agent read ceiling]
  D --> E[Session inventory and history]
  E --> F[Learning model]
  F --> G[Agent Knowledge store]
Loading

Technical review

Best possible solution:

Keep the scribe-specific ceiling in the existing session-policy owner while preserving ordinary cross-agent capabilities and historical Knowledge records.

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

Current main’s unfiltered learning instructions and broad session visibility establish the reported path; supplied Gateway results corroborate it, but this review executed no target code.

Is this the best way to solve the issue?

The focused ceiling is appropriate: list filtering, history authorization, and session-ID resolution prevent foreign ingestion without changing ordinary session access or introducing another policy owner.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Conversation-learning instructions changes intended behavior with a stated reason (239b496: This commit moved ingestion guidance into task references while preserving citations and checkpoint progress; it does not establish the workflow’s original introduction, which earlier git log searches could not resolve through unavailable blobs.)
  • Session visibility decision owner keeps the original intent (e6ed7e3: The policy was consolidated into a private typed owner for consistent decisions and audit facts; this PR adds the ceiling there and checks it before scoped grants.)
  • Scheduled execution context keeps the original intent (240a90e: One occurrence context was introduced to carry principal, authority, tool policy, and resource scopes; the new read ceiling uses that existing path.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Josh Lehman: Raw commit 239b496 adds extensions/knowledge/skills/knowledge-ingest/references/learning.md:45 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 239b4969e72a; files: extensions/knowledge/skills/knowledge-ingest/references/learning.md)
  • Josh Avant: Raw commit e6ed7e3 adds src/plugin-sdk/session-visibility-internal.ts:119 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: e6ed7e30cc5f; files: src/plugin-sdk/session-visibility-internal.ts)

PR surface

Source +64, Tests +76, Docs +17. Total +157 across 12 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 9 80 16 +64
Tests 1 77 1 +76
Docs 2 25 8 +17
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 12 182 25 +157

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.

Labels

Label changes:

No label changes.

Label justifications:

  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Complete the real-model Knowledge scenario identified in the proof assessment.

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 (2 earlier review cycles)
  • reviewed 2026-11-26T01:24:18.621Z sha 683e8b6 :: needs changes before merge. :: [P2] [P2] Cite the incident beside the new learning restrictions
  • reviewed 2026-11-26T03:06:56.455Z sha d48acea :: needs maintainer review before merge. :: none

Reviewed November 26, 2026, 12:50 AM ET / 05:50 UTC (Revision 3).

@clawsweeper

clawsweeper Bot commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper status: applying reviewed decision.

I am applying the reviewed decision for this pull request: fix(knowledge): scope conversation learning to its agent This is item 1/1 in the current shard. Shard 1/1.

This transient lease prevents a newer review from overlapping label, comment, or close mutations.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

@tideclaw-bot

tideclaw-bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator Author

Gateway-level before/after evidence for #205581 (updated 2026-11-26)

Result: the fix behaves as intended. On origin/main, beta's Learn-from-conversations scribe can list alpha's sessions and read their transcripts. On this PR it sees only beta's sessions. Reads of alpha's sessions are refused, including one named by an old beta checkpoint. Beta can still read its own conversations.

Check (beta's scribe, default tools.sessions.visibility) before: origin/main 90ba7624dbdd after: PR head 683e8b6740ed
(a) sessions_list {archived:false, excludeSubagents:true} (learning.md args) 4 beta + 3 alpha keys 4 beta keys only, visibility.restricted: true
(a') sessions_list with agentId: "alpha" 3 alpha keys clamped to the same 4 beta keys
(b) sessions_history on an alpha key succeeds, returns ALPHA-MARKER-1 forbidden: "This run can read only its own agent's session history."
(b') sessions_history on an alpha session ID succeeds, returns ALPHA-MARKER-1 Session not found (resolved only within beta), no content
(c) sessions_history on the alpha key from a pre-existing beta checkpoint succeeds, returns ALPHA-MARKER-2 forbidden, no content
Own: sessions_history on beta1 and on beta2 (also in the checkpoint) readable (BETA-MARKER-1/2) readable (BETA-MARKER-1/2)
sessions_search ALPHA-MARKER returns alpha content forbidden ("Use sessions_list and sessions_history…")
Ongoing automation run (declarationKey: knowledge:scribe:conversations, cron.run force): list / alpha key / checkpoint alpha key / own beta1 2 alpha listed / alpha read / alpha read / beta read 0 alpha listed / forbidden / forbidden / beta read

Setup. Each build ran a real in-process Gateway: the repo's createChatFixture + startGatewayWithClient, with its own temp HOME, OPENCLAW_STATE_DIR, config, and loopback port. Every run used the documented isolated Vitest adapter in private rootless Podman (network=none). Podman used a task-owned HOME/storage.conf (private graphroot/runroot/tmp) and a private XDG_RUNTIME_DIR. The default store, /run/user/1000/libpod, and the live Gateway were not used. Config had agents main, alpha, and beta, with tools.sessions.visibility unset (default all). I seeded three synthetic sessions per agent (two in the automation case) with chat.send ("Synthetic note ALPHA-MARKER-n …"). A deterministic loopback OpenAI Responses fixture issued the tool calls; no external model was used.

  • Run once (the real entry point): chat.send to beta's Scribe · Learn from conversations conversation. It used the Scribes page's setupIdempotencyKey("conversations", sessionKey, "1") (runId knowledge:scribe:conversations:agent:beta:dashboard:…:1) and the generated once prompt (setupPrompt(scribeSetup("conversations","once",…))). The prompt was followed by an existing checkpoint body that lists one alpha key and one beta key.
  • Ongoing: in that conversation, the fake model called automations plan/add with declarationKey: knowledge:scribe:conversations and sessionTarget: current. Then cron.run {mode:"force"} ran it. The job read back with that declaration key; outcome ok on both builds.
  • Both builds ran the same scratch spec (sha256 1ae761e6482546b8…; not committed). The spec asserts the after-contract, so it is red on main (expected diffs shown above) and green on the PR. Isolated image mcr.microsoft.com/playwright:v1.64.1-noble = sha256:a0d7b2b49ffa0e99787a00b7ec2af46eca58020082713f002ca9f0f1cfd1a017. Source snapshots: after sha256:143304b767fe… and before sha256:504f5b7465ee… (run 5; run 4 repeated the run-once result). Node v26.12.1, pnpm 12.15.0.
git fetch origin pull/205665/head:pr-205665            # 683e8b6740eddfdccfcc5287e0b92e569d4b7444
git worktree add --detach ../knowledge-e2e-main 90ba7624dbdd4aef7aa17fa683ae7fef47c54856
pnpm install --frozen-lockfile --prefer-offline        # each worktree; identical lockfile
git add src/gateway/knowledge-scribe-scope.proof.e2e.test.ts   # staged only, adapter snapshots tracked files
# private Podman: HOME=$root/home (storage.conf graphroot/runroot under $root), XDG_RUNTIME_DIR=$root/runtime
umask 022; HOME=$root/home XDG_RUNTIME_DIR=$root/runtime npm_execpath=<native pnpm 12.15.0> \
  node scripts/run-vitest.mjs --isolated-image sha256:a0d7b2b4… run \
  --config test/vitest/vitest.e2e.config.ts --configLoader runner \
  src/gateway/knowledge-scribe-scope.proof.e2e.test.ts --maxWorkers=1
# after: 2 passed, exit=0, container absence confirmed
# before: 2 failed on the after-contract (alpha listed/read), exit=1, container absence confirmed

Gaps:

  • The model is a scripted fixture. It issues exactly the sessions_list/sessions_history calls in learning.md, plus deliberate cross-agent attempts. This does not test whether a real model follows the updated skill text.
  • The "pre-existing checkpoint" was supplied as note text in the run's prompt, not as a Knowledge vault page. The Knowledge plugin's page store was not loaded. The boundary under test is the tool refusal, which does not depend on where the key came from.
  • Not a Control UI click-through. The Scribes page's start request was reproduced with the same idempotency key and prompt builder.
  • The earlier attempt's 30 s agent.wait timeout was cold-start latency in the container: Gateway import took about 110 s. Seed waits here use 180 s. All seed turns completed ok.

No product code was changed. No push, merge, or backport. The task-owned containers, Podman storage, scratch worktree, and staged spec were removed after collection.

@tideclaw-bot

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Nov 26, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Nov 26, 2026
Drop the early sessions_history refusal: the shared session access check
already denies cross-agent targets for agent-only runs, and the early check
could refuse a run's own "current" session under a fixed session store.
Keep non-scribe list and session-id parsing identical to main.

Co-authored-by: RomneyDa <[email protected]>
@tideclaw-bot

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@RomneyDa
RomneyDa merged commit 0780dd6 into main Nov 26, 2026
133 checks passed
@RomneyDa
RomneyDa deleted the openclaw/knowledge-scope branch November 26, 2026 06:26
tideclaw-bot added a commit that referenced this pull request Nov 26, 2026
* fix(knowledge): scope conversation learning to its agent

Co-authored-by: RomneyDa <[email protected]>

* fix(knowledge): scope conversation learning to its agent

Worked on by:
- @RomneyDa

Co-authored-by: RomneyDa <[email protected]>
OpenClaw-Publication: f4ee47f-60ff-4553-a51c-ea272fa46a6c

* docs(knowledge): cite the incident for agent-only learning rules

Co-authored-by: RomneyDa <[email protected]>

* fix(knowledge): keep one agent-scope refusal for history reads

Drop the early sessions_history refusal: the shared session access check
already denies cross-agent targets for agent-only runs, and the early check
could refuse a run's own "current" session under a fixed session store.
Keep non-scribe list and session-id parsing identical to main.

Co-authored-by: RomneyDa <[email protected]>

---------

Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit 0780dd6)

Release adaptation: keep the branch message-tool predicate and sessions_list supportsActiveOnly option; thread the upstream conversation-scribe read ceiling through the existing list/history/search and Cron dispatch paths. Extract that lookup wiring into one factory to bring the file under the existing lint cap.

Co-authored-by: vincentkoc <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
tideclaw-bot added a commit that referenced this pull request Nov 26, 2026
* fix(knowledge): scope conversation learning to its agent

Co-authored-by: RomneyDa <[email protected]>

* fix(knowledge): scope conversation learning to its agent

Worked on by:
- @RomneyDa

Co-authored-by: RomneyDa <[email protected]>
OpenClaw-Publication: f4ee47f-60ff-4553-a51c-ea272fa46a6c

* docs(knowledge): cite the incident for agent-only learning rules

Co-authored-by: RomneyDa <[email protected]>

* fix(knowledge): keep one agent-scope refusal for history reads

Drop the early sessions_history refusal: the shared session access check
already denies cross-agent targets for agent-only runs, and the early check
could refuse a run's own "current" session under a fixed session store.
Keep non-scribe list and session-id parsing identical to main.

Co-authored-by: RomneyDa <[email protected]>

---------

Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit 0780dd6)
Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: vincentkoc <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 27, 2026
…5665)

* fix(knowledge): scope conversation learning to its agent

Co-authored-by: RomneyDa <[email protected]>

* fix(knowledge): scope conversation learning to its agent

Worked on by:
- @RomneyDa

Co-authored-by: RomneyDa <[email protected]>
OpenClaw-Publication: f4ee47f-60ff-4553-a51c-ea272fa46a6c

* docs(knowledge): cite the incident for agent-only learning rules

Co-authored-by: RomneyDa <[email protected]>

* fix(knowledge): keep one agent-scope refusal for history reads

Drop the early sessions_history refusal: the shared session access check
already denies cross-agent targets for agent-only runs, and the early check
could refuse a run's own "current" session under a fixed session store.
Keep non-scribe list and session-id parsing identical to main.

Co-authored-by: RomneyDa <[email protected]>

---------

Co-authored-by: RomneyDa <[email protected]>
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 impact:security Security boundary, credential, authz, sandbox, or sensitive-data risk. impact:session-state Session, memory, transcript, context, or agent state can drift or corrupt. P1 High-priority user-facing bug, regression, or broken workflow. plugin: knowledge rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: S 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.

2 participants