Skip to content

Guide subagents to private session scratch - #1956

Merged
Aaronontheweb merged 1 commit into
devfrom
plan/subagent-session-scratch-guidance
Aug 14, 2026
Merged

Guide subagents to private session scratch#1956
Aaronontheweb merged 1 commit into
devfrom
plan/subagent-session-scratch-guidance

Conversation

@Aaronontheweb

@Aaronontheweb Aaronontheweb commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • announce the bound private session_dir in Personal and Team subagent working context while preserving Public redaction and malformed-path fail-closed behavior
  • tell disposable child shell work to pass that directory explicitly as WorkingDirectory
  • add deterministic authority and prompt-refresh coverage without changing shell grants, persistence, or public APIs
  • replace the prescribed scratch answer with a delegated alignment eval that rejects omitted or inexact working directories

Live evidence

Post-0.26.0 traffic contained 69 prompts across 285 shell calls. The largest avoidable cluster was 15 read-heavy prompts from one headless subagent working beneath shared platform temp even though its execution scope already owned private session scratch.

Eval correction

The first reported 5/5 result was invalid: all ten child shell calls omitted WorkingDirectory and passed through the existing ShellTool fallback. Replaying that archive under the corrected assertion yields 0/5.

Fresh run a1077feb-6bd7-413c-8a90-c651aa5a03df passed 4/5 against deepseek-v4-flash-dspark. Four children passed the exact bound session directory on both Git diagnostics. One omitted it and failed as intended. The separate de-tautologized parent eval remains 3/5 alignment evidence, not a passing gate.

Validation

  • freshly published CLI, daemon, and Docker image from the current source
  • focused subagent actor/integration suite: 75/75
  • delegated model eval: 4/5 with exact WorkingDirectory assertions
  • strict OpenSpec validation for both affected changes
  • Bash syntax, headers, changed-file formatting, diff, and changed-file Slopwatch gates pass
  • Slopwatch reports only the pre-existing PowerShellHostProbeTests timing warning outside this diff

Scope

No shell policy authority, grant meaning, persistent schema, session-directory lifecycle, or public API changes.

@Aaronontheweb
Aaronontheweb force-pushed the plan/subagent-session-scratch-guidance branch 2 times, most recently from 465313e to cab0124 Compare August 14, 2026 18:46
public async Task Session_scratch_context_does_not_authorize_headless_prompt_worthy_shell()
{
using var netclawHome = new DisposableTempDir();
var sessionDirectory = Path.Combine(netclawHome.Path, "sessions", "example");
@Aaronontheweb
Aaronontheweb force-pushed the plan/subagent-session-scratch-guidance branch 4 times, most recently from 7d8d954 to 99a8c3b Compare August 14, 2026 19:37
@Aaronontheweb
Aaronontheweb enabled auto-merge (squash) August 14, 2026 19:37
@Aaronontheweb
Aaronontheweb force-pushed the plan/subagent-session-scratch-guidance branch from 99a8c3b to afe0902 Compare August 14, 2026 19:45
@Aaronontheweb
Aaronontheweb merged commit c1ded6a into dev Aug 14, 2026
23 checks passed
@Aaronontheweb
Aaronontheweb deleted the plan/subagent-session-scratch-guidance branch August 14, 2026 20:16
Aaronontheweb added a commit that referenced this pull request Aug 20, 2026
* Sync delta specs for the last two completed changes

Apply the redirect-shared-temp-to-session-scratch delta to session-cwd and
tool-approval-gates. The OpenSpec CLI applied both files.

Merge the surface-reminder-schedule-failures delta into netclaw-scheduling by
hand. PR #2024 already corrected that requirement against the merged code, so a
programmatic apply would undo those corrections. Keep the corrected text and add
the scheduling-failure content:

- An execution failure and a scheduling failure share one ConsecutiveFailures
  count.
- A successful reschedule alone does not reset the count.
- An unattended reschedule site emits ReminderScheduleFailed at Warning severity,
  and ReminderAutoDisabled at Critical severity on the threshold.
- The set_reminder create path and update path return the error to the caller
  and emit no alert.

Drop three stale delta claims. The merged code disables a reminder. It does not
set a "paused" status and it does not write tasks.json. ReminderExecutionActor
has no ExecutionTimeoutSeconds constant, so the one-hour absolute limit stands.

* Archive the last two completed OpenSpec changes

Move each change to openspec/changes/archive/2026-08-19-<name>/. The code of
both changes is merged on dev.

- surface-reminder-schedule-failures: PR #1886.
- redirect-shared-temp-to-session-scratch: PRs #1890, #1925, #1926, #1945, and
  #1956.

Tick task 4.3 of redirect-shared-temp-to-session-scratch. The full pr_validation
suite ran green on Windows against current dev.

Leave the other boxes unticked. The maintainer accepts tasks 4.5 and 4.6 of
surface-reminder-schedule-failures as guaranteed by construction. The maintainer
accepts task 6.4 of that change and task 4.4 of
redirect-shared-temp-to-session-scratch as an eval-credentials gap.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant