Skip to content

fix(cli): refuse saved history only when another CLI account ran the session - #202428

Merged
obviyus merged 11 commits into
mainfrom
fix/claude-cli-history-account-check
Nov 20, 2026
Merged

obviyus merged 11 commits into
mainfrom
fix/claude-cli-history-account-check

Conversation

@obviyus

@obviyus obviyus commented Nov 20, 2026

Copy link
Copy Markdown
Collaborator

Problem

A fresh Claude CLI session only received a chat's saved history when OpenClaw could prove that every stored row was written by an earlier claude-cli run under the same account. Any row it could not attribute, such as turns written by Gemini or Codex, turns from a native Claude login without the attestation opt-in, legacy rows or imports, made the whole chat auth-unknown and refused for good.

As a result, switching an existing chat from another model to Claude dropped all context. The Gateway logged cli session history refused across auth boundary: reason=auth-unknown, and the new Claude session got only the current message. The rest of OpenClaw already replays the full conversation to Gemini, OpenAI and Codex on every switch without any such check.

The case #140294 actually guards against still matters: account A's history must not be replayed into a session for account B. Enforcing it took per-row coverage watermarks, a CLI history writer carried through every transcript write path, owner probes over SharedArrayBuffer in the SQLite workers, native-login rechecks at spawn, prompt send and prompt-hook time, refresh-due handling, a compaction coverage commit and a terminal write context. All of that existed only to keep the proof alive.

Solution

The session now records the first identified CLI account that runs it. That is a fingerprint of a resolved API key or token, a named OAuth account, or an attested native login. The account is checked once, when a turn is prepared:

  • No account recorded yet: history replays. This includes turns from other runtimes and from an unidentified login. The first identified account is recorded.
  • Same account as recorded: history replays.
  • Different or unidentified account after one was recorded: that turn runs without saved history and the session is marked mixed. Every later CLI turn in the session also runs without saved history, including a switch back to the original account. /new (a new session id) starts clean.

admitCliHistoryAccount is the single owner of this decision. Everything that existed only to keep the coverage proof alive is deleted: the writer async context, coverage advance in all worker and actor write paths, owner probes, the cliHistory patch guard, the compaction coverage commit, the native-login recheck hooks (assertReadable, assertPrivateInputCurrent, bindExecutionEnv, settleNativeLogin, the refresh-due handling), the node dispatch readable hook, and the CLI-only terminal write context (bindAgentRunTerminalWriteContext, runInAgentRunWriteContext, clearAgentRunTerminalWriteContext).

Stored data: no schema change. Existing known records keep their account fingerprint, which is derived the same way as before. Old unknown records mean "no proof", so they are treated as no account recorded. The new mixed state is never read as known by older binaries, so a downgrade fails closed.

Accepted edge case: if a chat runs on an unidentified login first and an identified account second, the unidentified turns replay to that account. These are the same session's own turns, and every other runtime already replays them.

Impact

  • Switching a chat from Gemini or Codex to claude-cli now carries its history into the fresh Claude session.
  • Native Claude logins without the attestation opt-in now recover history in chats that no other identified account has run.
  • An account change still keeps the earlier account's history out of the prompt. The transcript itself is untouched, and Claude can still read it through sessions_history when tool policy allows.
  • Production code: +455 −1,678 (net −1,223). Tests: net −2,102. Docs updated in docs/gateway/cli-backends.md and the anthropic plugin help text.

Evidence

Live E2E. Each side ran on an isolated scratch Gateway with a real Gemini model and a real claude-cli (Claude Code 2.x) on an Anthropic API-key profile pinned with sessions.patch anthropic/claude-sonnet-4-6@anthropic:manual.

Journey 1: 10 Gemini turns that set GOAL_TOKEN aurora-7 and DEPLOY_REGION QUARTZ-ZETA-41, then a switch to Claude asking for both values without using tools.

base 04d1dd10d05e head
Claude answer NOT_IN_CONTEXT GOAL_TOKEN: aurora-7 | DEPLOY_REGION: QUARTZ-ZETA-41
first Claude prompt current message only, refused (auth-unknown) <conversation_history> envelope, 30,874 chars, both facts, no tool calls

Journey 2: key A stores SECRET_A, then the session switches to a different key B, then back to A.

  • Base and head: key B's fresh session received no history; head logged refused ... auth-unknown, and B's prompt was 95 characters with no SECRET_A.
  • Back on key A: the run resumed A's own native Claude session, which already held the secret. Nothing was replayed.

Tests:

  • New: history-boundary.test.ts, which covers other-runtime replay, the A→B→A no-laundering case, an unidentified login after a recorded account, /new, and named versus identity-less OAuth. Also prepare-native-history.test.ts, which covers an unidentified native login.
  • Red on base: the other-runtime replay case was run against the base checkout and failed (no reseed prompt).
  • Green: tsgo:core, tsgo:extensions, check:test-types, oxlint, oxfmt, the line-cap ratchet and config:docs:check. Touched directories pass under ocx test: src/agents/cli-runner, src/config/sessions, src/agents/sessions, src/infra/outbound, extensions/anthropic, src/auto-reply/reply, src/agents/command, plus the Gateway lifecycle and fallback transcript tests.

Related: #140294 (the original boundary), #202341 (unified context handoff; these changes are independent).

@clawsweeper

clawsweeper Bot commented Nov 20, 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 gateway Gateway runtime agents Agent runtime and tooling extensions: anthropic size: XL labels Nov 20, 2026
@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components.

No secops approval is required. This comment is informational because the PR author has Maintain or Admin access.

  • Current SHA: 8a3d66687d8bf4a84162ef884557b33b3c47b2e7
  • Maintainer: @obviyus
  • Repository role: admin

These security sensitive changes were made:

  • src/agents/cli-credentials.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.

Carefully review these changes before merging.

@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. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. 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-repro Preliminary submission classification; full source review pending. labels Nov 20, 2026
@clawsweeper

clawsweeper Bot commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge.

What this changes

This PR replaces transcript coverage tracking with a session-level CLI account check for saved-history replay.

Example: After Gemini records GOAL_TOKEN aurora-7 and DEPLOY_REGION QUARTZ-ZETA-41, the chat switches to Claude CLI.

  • Before: Claude receives only the current request and answers NOT_IN_CONTEXT.
  • After: Claude receives saved conversation history and returns both values without tools.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) Meaningful live behavior evidence supports the repair, but incomplete consumer migration and stored-state upgrade validation prevent a merge-ready verdict.
Proof confidence 🦐 gold shrimp (3/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🦪 silver shellfish (2/6) 3 actionable review findings remain.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Switching an existing conversation into Claude CLI silently omits its saved context.
Reason: The live comparison establishes user value, and maintainer authorship supplies the direction decision for replacing coverage proof with account admission.

Merge readiness

⛔ Blocked before merge - 3 items remain

Keep open: this maintainer-authored PR addresses demonstrated context loss, but the remaining test and ratchet migrations need completion before merge.

Priority: P2
Reviewed head: 5469712bcddfcdb8a082d60f270f5ae109390841

Before merge

  • [P2] Migrate the remaining tests to the account-admission contract (P2) - Removing coverage advancement leaves compact.queued-successor.test.ts:271 expecting maxSeq to advance, and allowing previously unidentified history leaves prepare.existing-session.test.ts:402 expecting a metadata-only earlier-message notice. Exact-head CI fails on both expectations. Update these consumers to assert the new account and replay behavior while retaining transcript and customization preservation checks; restoring the retired coverage machinery would contradict the intended fix.
  • [P2] Prune the baseline entry for the removed history mock (P2) - The removed cli-history-boundary mock is still recorded at config/test-mock-exports-baseline.txt:1236. check-test-mock-exports.mts explicitly exits with failure for removed factories left in the baseline, and the exact-head baseline job reports mock-exports failing. Remove that retired entry and prune the corresponding decreased identity counts rather than adding exceptions.
  • Add data-model compatibility proof - The review found that existing stored data may not work after upgrade. Show that existing data still loads and works with this change.

Findings

  • [P2] [P2] Migrate the remaining tests to the account-admission contract — src/agents/cli-runner/prepare.ts:1382-1384
  • [P2] [P2] Prune the baseline entry for the removed history mock — src/agents/cli-runner/cli-run-transcript.admission.test.ts:37-38
  • [P3] [P3] Update the retained compaction description — docs/gateway/cli-backends.md:579

Tests

  • Missing end-to-end proof: Provide a redacted upgrade run from v2026.11.6 exercising existing known and unknown cliHistoryBoundary records, preserving transcript/settings and checking replay decisions after restart.
Agent review details

How this fits together

CLI preparation resolves the selected account, checks private session metadata, and supplies eligible saved conversation history to the native CLI execution path.

flowchart TD
A[Chat turn] --> B[Resolve CLI account]
B --> C[History admission]
D[Session account metadata] --> C
C --> D
C --> E[Prepare conversation context]
F[Saved transcript] --> E
E --> G[Native CLI execution]
Loading

Technical review

Best possible solution:

Keep the single admission owner and complete the existing test, baseline, documentation, and stored-state compatibility work.

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

Current-main source shows why other-runtime history is refused, and the supplied real-Gateway comparison demonstrates that failure on the pinned base; no target code was executed during this review.

Is this the best way to solve the issue?

The existing session-entry owner can hold the account decision without per-write coverage machinery, and the maintainer-authored proposal explains the changed privacy contract.

Full review comments:

  • [P2] [P2] Migrate the remaining tests to the account-admission contract — src/agents/cli-runner/prepare.ts:1382-1384
    Removing coverage advancement leaves compact.queued-successor.test.ts:271 expecting maxSeq to advance, and allowing previously unidentified history leaves prepare.existing-session.test.ts:402 expecting a metadata-only earlier-message notice. Exact-head CI fails on both expectations. Update these consumers to assert the new account and replay behavior while retaining transcript and customization preservation checks; restoring the retired coverage machinery would contradict the intended fix.
    Confidence: 0.99
  • [P2] [P2] Prune the baseline entry for the removed history mock — src/agents/cli-runner/cli-run-transcript.admission.test.ts:37-38
    The removed cli-history-boundary mock is still recorded at config/test-mock-exports-baseline.txt:1236. check-test-mock-exports.mts explicitly exits with failure for removed factories left in the baseline, and the exact-head baseline job reports mock-exports failing. Remove that retired entry and prune the corresponding decreased identity counts rather than adding exceptions.
    Confidence: 0.99
  • [P3] [P3] Update the retained compaction description — docs/gateway/cli-backends.md:579
    The next bullet still says compaction preserves the boundary only with complete transcript coverage and cannot make unknown history eligible. The new admission owner ignores coverage and explicitly permits old unknown records when no account is recorded, so this now contradicts both implementation and the updated account-boundary section. Describe compaction as preserving the session's recorded account or mixed state.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.91

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Saved-history eligibility changes intended behavior with a stated reason (e20b56c: Recover interrupted CLI conversations while excluding other-account and unverifiable transcript content.)
  • Native-login attestation and repeated owner checks changes intended behavior with a stated reason (29ce97a: Establish native Claude ownership from the actual credential and preserve coverage across native-login execution and persistence.)
  • Credential fingerprint identity keeps the original intent (e20b56c: Compare resolved static credentials or named OAuth identities independently of replaceable native bindings.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Vito Cappello: Raw commit e20b56c adds src/agents/cli-runner/history-boundary.ts:64 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: e20b56c0b26e; files: src/agents/cli-runner/history-boundary.ts)
  • Mitchell Etzel: Raw commit 29ce97a adds src/agents/cli-runner/history-boundary.ts:520 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 29ce97ac8d16; files: src/agents/cli-runner/history-boundary.ts)

PR surface

Source -1223, Tests -2102, Docs +6, Generated 0. Total -3319 across 75 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 51 455 1678 -1223
Tests 22 270 2372 -2102
Docs 1 15 9 +6
Config 0 0 0 0
Generated 1 2 2 0
Other 0 0 0 0
Total 75 742 4061 -3319

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:

  • add P2: This repairs demonstrated conversation-context loss when switching into Claude CLI.
  • add merge-risk: 🚨 security-boundary: Automatic history disclosure intentionally changes for unidentified accounts and previously unaccounted transcripts; the maintainer author explicitly accepts that tradeoff.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦐 gold shrimp and patch quality is 🦪 silver shellfish.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P2: This repairs demonstrated conversation-context loss when switching into Claude CLI.
  • merge-risk: 🚨 security-boundary: Automatic history disclosure intentionally changes for unidentified accounts and previously unaccounted transcripts; the maintainer author explicitly accepts that tradeoff.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦐 gold shrimp and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

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.

Reviewed November 20, 2026, 5:54 AM ET / 10:54 UTC.

@obviyus

obviyus commented Nov 20, 2026

Copy link
Copy Markdown
Collaborator Author

Maintainer override: the only red required job on head aae816436ef8 is not caused by this PR.

  • checks-node-changed-13 (and the openclaw/ci-gate aggregate) fails one test: src/gateway/x-publication-owner-composition.e2e.test.ts > "renews stale X authority for public creation and rejects revocation before commit".
  • That test fails the same way on the exact main commit this branch merged (6d8091f0242f), with no changes from this PR: vitest run --config test/vitest/vitest.e2e.config.ts src/gateway/x-publication-owner-composition.e2e.test.ts → 1 failed.
  • On this branch before merging main (base 04d1dd10d05e), the same e2e passed (Tests 1 passed).
  • This PR does not touch X publication, gateway publication owners, or any file that test imports for its authority path.

All other checks pass, and the local review of this exact head is clean (patch is correct, 0 findings).

obviyus and others added 6 commits November 20, 2026 19:47
…y-account-check

# Conflicts:
#	src/agents/cli-runner/history-boundary.test.ts
…y-account-check

# Conflicts:
#	config/session-identity-allowlist.txt
#	src/agents/cli-runner/execute-node-claude.ts
#	src/agents/cli-runner/execute-plugin.ts
#	src/agents/cli-runner/execute-process.ts
#	src/agents/cli-runner/execute.ts
#	src/agents/cli-runner/history-boundary.test.ts
#	src/agents/cli-runner/history-boundary.ts
…y-account-check

# Conflicts:
#	docs/.generated/config-baseline.sha256
@obviyus

obviyus commented Nov 20, 2026

Copy link
Copy Markdown
Collaborator Author

Maintainer override for head 8a3d66687d8b. Every red required job also fails on the exact main commit this branch merged (599bc4222a48), run under the CI Bun runtime (OPENCLAW_VITEST_RUNTIME=bun ocx test --no-memo <file>) with no changes from this PR:

Job Failing test On main 599bc4222a48
checks-node-changed-compact-large-34 src/agents/harness/mediated-delegation-effects.test.ts (revocation at the final exec/write boundary) fails
checks-node-changed-compact-large-11-2 src/auto-reply/reply/session-event-permissions.test.ts (retained-database-replacement) fails
checks-node-changed-compact-large-5-1 src/gateway/mcp-http.completion-lineage.test.ts fails
checks-node-changed-compact-large-17-1 src/agents/embedded-agent-runner/compact.queued-successor.test.ts (queued maintenance writer replacement) fails
checks-node-changed-13 src/gateway/x-publication-owner-composition.e2e.test.ts fails (also on 6d8091f0242f)

These jobs run on this PR only because it touches shared session/runner files, so the changed-scope lanes select these suites. The main push lanes don't run them.

The local review of this exact head is clean (patch is correct, 0 findings). Every other check passes.

@obviyus
obviyus merged commit 5ec2039 into main Nov 20, 2026
184 of 191 checks passed
@obviyus
obviyus deleted the fix/claude-cli-history-account-check branch November 20, 2026 17:40
@obviyus

obviyus commented Nov 20, 2026

Copy link
Copy Markdown
Collaborator Author

Landed as 5ec2039.

  • Bug: switching an existing chat to claude-cli from another model (Gemini, Codex) or from an unidentified native login gave the fresh Claude session none of the chat's history. The per-row account-coverage proof refused any row it could not attribute.
  • Fix: each session now records the first identified CLI account that runs it. Saved history replays unless a different account already ran the session. Forks keep the parent's record, and old unknown records keep refusing. The coverage machinery is removed (production −1.2k lines).
  • Proof: in a live scratch Gateway, 10 Gemini turns were followed by claude-cli on an API-key profile. On main, Claude answered NOT_IN_CONTEXT. With this change it received the full <conversation_history> envelope and answered correctly without tools. Switching to a different key still received no history.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 21, 2026
…session (openclaw#202428)

## Problem

A fresh Claude CLI session only received a chat's saved history when OpenClaw could prove that every stored row was written by an earlier `claude-cli` run under the same account. Any row it could not attribute, such as turns written by Gemini or Codex, turns from a native Claude login without the attestation opt-in, legacy rows or imports, made the whole chat `auth-unknown` and refused for good.

As a result, switching an existing chat from another model to Claude dropped all context. The Gateway logged `cli session history refused across auth boundary: reason=auth-unknown`, and the new Claude session got only the current message. The rest of OpenClaw already replays the full conversation to Gemini, OpenAI and Codex on every switch without any such check.

The case openclaw#140294 actually guards against still matters: account A's history must not be replayed into a session for account B. Enforcing it took per-row coverage watermarks, a CLI history writer carried through every transcript write path, owner probes over `SharedArrayBuffer` in the SQLite workers, native-login rechecks at spawn, prompt send and prompt-hook time, refresh-due handling, a compaction coverage commit and a terminal write context. All of that existed only to keep the proof alive.

## Solution

The session now records the first identified CLI account that runs it. That is a fingerprint of a resolved API key or token, a named OAuth account, or an attested native login. The account is checked once, when a turn is prepared:

- **No account recorded yet:** history replays. This includes turns from other runtimes and from an unidentified login. The first identified account is recorded.
- **Same account as recorded:** history replays.
- **Different or unidentified account after one was recorded:** that turn runs without saved history and the session is marked `mixed`. Every later CLI turn in the session also runs without saved history, including a switch back to the original account. `/new` (a new session id) starts clean.

`admitCliHistoryAccount` is the single owner of this decision. Everything that existed only to keep the coverage proof alive is deleted: the writer async context, coverage advance in all worker and actor write paths, owner probes, the `cliHistory` patch guard, the compaction coverage commit, the native-login recheck hooks (`assertReadable`, `assertPrivateInputCurrent`, `bindExecutionEnv`, `settleNativeLogin`, the refresh-due handling), the node dispatch readable hook, and the CLI-only terminal write context (`bindAgentRunTerminalWriteContext`, `runInAgentRunWriteContext`, `clearAgentRunTerminalWriteContext`).

**Stored data:** no schema change. Existing `known` records keep their account fingerprint, which is derived the same way as before. Old `unknown` records mean "no proof", so they are treated as no account recorded. The new `mixed` state is never read as `known` by older binaries, so a downgrade fails closed.

**Accepted edge case:** if a chat runs on an unidentified login first and an identified account second, the unidentified turns replay to that account. These are the same session's own turns, and every other runtime already replays them.

## Impact

- Switching a chat from Gemini or Codex to `claude-cli` now carries its history into the fresh Claude session.
- Native Claude logins without the attestation opt-in now recover history in chats that no other identified account has run.
- An account change still keeps the earlier account's history out of the prompt. The transcript itself is untouched, and Claude can still read it through `sessions_history` when tool policy allows.
- Production code: **+455 −1,678 (net −1,223)**. Tests: net −2,102. Docs updated in `docs/gateway/cli-backends.md` and the anthropic plugin help text.

## Evidence

**Live E2E.** Each side ran on an isolated scratch Gateway with a real Gemini model and a real `claude-cli` (Claude Code 2.x) on an Anthropic API-key profile pinned with `sessions.patch` `anthropic/claude-sonnet-4-6@anthropic:manual`.

**Journey 1:** 10 Gemini turns that set `GOAL_TOKEN aurora-7` and `DEPLOY_REGION QUARTZ-ZETA-41`, then a switch to Claude asking for both values without using tools.

| | base `1740e1e9be50` | head |
|---|---|---|
| Claude answer | `NOT_IN_CONTEXT` | `GOAL_TOKEN: aurora-7 \| DEPLOY_REGION: QUARTZ-ZETA-41` |
| first Claude prompt | current message only, refused (`auth-unknown`) | `<conversation_history>` envelope, 30,874 chars, both facts, no tool calls |

**Journey 2:** key A stores `SECRET_A`, then the session switches to a different key B, then back to A.

- **Base and head:** key B's fresh session received no history; head logged `refused ... auth-unknown`, and B's prompt was 95 characters with no `SECRET_A`.
- **Back on key A:** the run resumed A's own native Claude session, which already held the secret. Nothing was replayed.

**Tests:**
- New: `history-boundary.test.ts`, which covers other-runtime replay, the A→B→A no-laundering case, an unidentified login after a recorded account, `/new`, and named versus identity-less OAuth. Also `prepare-native-history.test.ts`, which covers an unidentified native login.
- Red on base: the other-runtime replay case was run against the base checkout and failed (no reseed prompt).
- Green: `tsgo:core`, `tsgo:extensions`, `check:test-types`, oxlint, oxfmt, the line-cap ratchet and `config:docs:check`. Touched directories pass under `ocx test`: `src/agents/cli-runner`, `src/config/sessions`, `src/agents/sessions`, `src/infra/outbound`, `extensions/anthropic`, `src/auto-reply/reply`, `src/agents/command`, plus the Gateway lifecycle and fallback transcript tests.

Related: openclaw#140294 (the original boundary), openclaw#202341 (unified context handoff; these changes are independent).

Co-authored-by: Ayaan Zaidi <[email protected]>
tideclaw-bot pushed a commit that referenced this pull request Nov 24, 2026
* fix: keep agent temporary files in owned scratch

* fix: preserve sandbox temp access and queued isolation custody

(cherry picked from commit f91bc99)

Release adaptation: keep the staged #202815 Git shim implementation and independently assert both Git shim execution and writable owned temp in its merged Docker/Podman fixture. Use the beta.3 isolated custody configuration (896f33d52174), not ambient sandbox inventory.

Companions: #193677 scratch expiry owner is present (99ba844); #202815 is present-equivalent (7d33d1a). #202122 is independent Git/scratch clone reclamation, #202428 is CLI history ownership, #202644 is host file-write authority, and #202874 is workspace cleanup scheduling; none prerequisite. Other later same-path commits concern separate template, sandbox, prompt, sharing, or run-lifecycle policy; see the lane companion audit.

Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit a4070bc5b669308210b62a0b80b92c16af768b34)
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: anthropic gateway Gateway runtime merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. security-sensitive-changed size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant