Skip to content

fix(plan): keep read-only Git tools for planning children - #621

Merged
tt-a1i merged 2 commits into
openpi-dev:mainfrom
outlier27-cell:fix/plan-child-git-read
Sep 24, 2026
Merged

tt-a1i merged 2 commits into
openpi-dev:mainfrom
outlier27-cell:fix/plan-child-git-read

Conversation

@outlier27-cell

Copy link
Copy Markdown
Contributor

Problem

Relates to #27.

Plan Mode permits git_show, git_diff, and git_log in the parent read-only surface, and the child-session boundary already classifies them as child-safe. However, PLAN_MODE_CHILD_TOOLS omitted all three. A planning child therefore lost read-only Git inspection even when using a built-in plan-compatible investigator role.

Value

Planning children can inspect revisions, diffs, and history without leaving the enforced read-only Plan Mode boundary. This keeps parent and child investigation capabilities consistent while retaining the existing fail-closed restrictions.

Approach

  • Add the three existing Git-read tools to PLAN_MODE_CHILD_TOOLS.
  • Extend the Plan Mode allowlist test to assert those tools remain available to planning children.
  • Preserve the existing allowlist behavior: write, edit, bash, spawning, unknown tools, and all unlisted capabilities remain unavailable.

No new tool, configuration, model behavior, or lifecycle is introduced.

Validation

  • bun test tests/extensions/plan-mode/index.test.ts - 16 passed.
  • bun test tests/extensions/shared/child-session.test.ts - 19 passed.
  • bun run check - passed.
  • git diff --check - passed.
  • bun run test - started and ran through the suite, but the existing tests/extensions/post-edit/lifecycle.test.ts worker remained hung in this Windows environment. The same extension was outside this change and the run was stopped after confirming its process lineage; this PR does not claim the full suite passed.

Reproduced before the fix on origin/main@43cd2e94cc584f81cc1f27512ae99c9a4099b231: planModeChildTools(undefined) omitted exactly git_show, git_diff, and git_log from the existing read-only agent tool set.

Impact

  • User-visible behavior: planning subagents can perform existing read-only Git inspection.
  • Model-visible tools: only the three already registered Git-read tools become available inside a planning child.
  • Runtime/lifecycle: no change.
  • Persisted config/data: no change.
  • Compatibility/risk: low; the change only aligns two pre-existing read-only allowlists and retains the child fail-closed boundary.

@tt-a1i tt-a1i left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed updated head 0858a12 against current main. This adds only the existing read-only Git tools to the planning-child allowlist with focused coverage; no blocking findings. Awaiting exact-head CI.

@tt-a1i
tt-a1i merged commit 36c26b7 into openpi-dev:main Sep 24, 2026
10 of 11 checks passed
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.

2 participants