Skip to content

feat(manual-mode): make edits and writes also wait for users permissions - #122

Merged
itayinbarr merged 1 commit into
itayinbarr:mainfrom
marek2901:feat/manual-mode-file-edits
Sep 18, 2026
Merged

itayinbarr merged 1 commit into
itayinbarr:mainfrom
marek2901:feat/manual-mode-file-edits

Conversation

@marek2901

Copy link
Copy Markdown
Contributor

Hello,

another PR for manual mode 👋

Manual mode was only gating shell commands edit/write slipped through without confirmation. Fixed: they now prompt Apply/Deny like shell does (native diff still shows, we just wire the gate).

Added Apply all (this session) for convenience if you don't want to review every edit, one click opts out for the rest of the session. Headless still denies by default.

🙇

@itayinbarr
itayinbarr merged commit 771ced4 into itayinbarr:main Sep 18, 2026
1 check passed
itayinbarr pushed a commit that referenced this pull request Sep 18, 2026
…ject AGENTS.md (#104)

Fixed
- #127 a multi-line `edit` no longer deadlocks the run. pi's JSON-string
  recovery is a bare JSON.parse, which throws on the raw newlines a small
  model writes inside oldText/newText; with `write` refused for an existing
  file, a model that had diagnosed the bug had no way to deliver the patch.
  Validation runs before the tool_call hook, so this is a patch-pi.mjs patch.
- #121 behind a router each model keeps its own context window. The probe
  asked about models[0] rather than the declared default, and then stamped one
  value onto every model. The window drives read-guard and the context budget,
  and nothing was logged because the probe "succeeded".
- #96 a tool call in prose is no longer "recovered". Names are checked against
  ctx.getAllTools(): a tool that is not registered cannot be re-issued
  natively by anyone, so the nudge was an instruction nobody could follow.
- #128 compaction no longer arrives late on Ollama, which reports its prompt
  size after truncating it. For that provider only, the watchdog measures what
  is in context and compacts on the larger of the two figures.
- skill cards actually load in the pi package: skill-inject and
  knowledge-inject counted directories up to find skills/, which is wrong in
  the built package layout and failed silently.

Added
- #104 project-context reads the nearest AGENTS.md (then CLAUDE.md), capped at
  4000 chars, injected once as a hidden tail message so the cached prefix
  survives (#73). Never loads little-coder's own AGENTS.md.
- #95 `little-coder -p --plan-mode` works. The clarifying questions are
  answered from the research and the assumptions stated in the plan, which is
  written to .pi/approved-plan.md for a later /implement.
- #93 LITTLE_CODER_SUBCODER_ACCESS=write gives sub-coders edit/write. Off by
  default; dispatch is withheld at both levels.
- #62 pi-little-coder, the extension and skill layer as a pi package, by
  @dbmrq. Published alongside each release.

Changed
- #122 manual mode asks about edit and write too, by @marek2901.
- `true` and `false` are whitelisted, so `2>/dev/null || true` is not refused.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ptq8zPmvafKeTBJevPsQdr
@itayinbarr

Copy link
Copy Markdown
Owner

Merged, shipped in v1.20.0. Second one of these from you, and it closes the gap the first one left.

You are right that this was the more serious half. manual gating shell commands while edit and write went through unprompted means the mode asked permission for ls and not for overwriting a source file, which is close to the opposite of what the name promises.

The Apply all (this session) option is the part I would not have added myself and am glad you did. A mode that cannot be escalated out of gets turned off entirely at the first ten-edit task, which costs the user the gate for the rest of the session rather than for the rest of the task.

Headless denying by default is the right call and matches the precedent #90 set: a mode built around a human in the loop should refuse when there is no human, not silently proceed. Sub-coders are unaffected since they are pinned to auto.

Thank you, and the tests were a pleasure to review. The per-instance latch isolation test is the one that would have caught a real bug if the confirmer had been module-level state.

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