Skip to content

agent + sample dprojs: wire /undo, fix dcc64 F2613 PasClaw.Checkpoints - #222

Merged
FMXExpress merged 2 commits into
mainfrom
claude/agent-undo-and-sample-dproj
Jun 11, 2026
Merged

FMXExpress merged 2 commits into
mainfrom
claude/agent-undo-and-sample-dproj

Conversation

@FMXExpress

Copy link
Copy Markdown
Owner

Summary

Two related fixes for the checkpoints feature shipped in PR #221:

1. dcc64 F2613 PasClaw.Checkpoints not found

The main src/pasclaw/PasClaw.dproj picked up the new search-path entry at #221's merge, but the three sample dprojs under samples/component-console/ each carry their own DCC_UnitSearchPath and didn't get updated. The samples import PasClaw.Agent + PasClaw.Tools, which transitively pull in PasClaw.Tools.FS, which now uses PasClaw.Checkpoints. dcc64 walked the search path, didn't find the unit, and failed at the line you reported:

[dcc64 Fatal Error] PasClaw.Tools.FS.pas(46): F2613 Unit 'PasClaw.Checkpoints' not found.

Fix: add ..\..\src\pkg\checkpoints to each sample dproj's DCC_UnitSearchPath, slotted between skills and agent to keep them in the same package-dir order PasClaw.dproj uses.

2. pasclaw agent now has /undo too

PR #221 wired /undo into the TUI (both positioned + FPC legacy paths) but pasclaw agent runs its own line-based REPL with a distinct slash-command dispatcher. Without /undo there, an operator who prefers agent over tui had no rollback story even with checkpoints turned on.

Symmetric wiring:

  • Import PasClaw.Checkpoints into Cmd.Agent.
  • RewireCheckpoints helper called when the session is first created AND after /new resurrects a fresh session id.
  • BeginTurn fires right before every RunToolLoop call so each user turn opens its own turn-NNNN/ dir.
  • HandleUndoCommand mirrors the TUI's behaviour: /undo → 1 turn, /undo N → N turns, prints the restored file paths so the operator sees what came back.
  • /help text lists the new command.

Test plan

  • make smoke — all subcommands OK
  • make test — full suite green (no test regressions)
  • Delphi dcc64: build SampleConsole.dproj / SampleServer.dproj / SampleSimple.dproj on your box — should no longer fail with F2613 on PasClaw.Checkpoints
  • Manual: pasclaw agent, /help shows /undo [N], run a turn that edits a file, then /undo — file rolls back

https://claude.ai/code/session_01TBcLtmpj7dqA5tyFbGnQon


Generated by Claude Code

Two related fixes for the checkpoints feature shipped in PR #221:

1) dcc64 F2613 Unit 'PasClaw.Checkpoints' not found
   src/pasclaw/PasClaw.dproj picked it up at #221's merge, but the
   three sample dprojs under samples/component-console/ each carry
   their OWN DCC_UnitSearchPath -- and those didn't get the new
   entry. The samples import PasClaw.Agent + PasClaw.Tools, which
   transitively pull in PasClaw.Tools.FS, which now imports
   PasClaw.Checkpoints. dcc64 walked the search path, didn't find
   the unit, and failed at PasClaw.Tools.FS.pas line 46 for anyone
   building SampleConsole / SampleServer / SampleSimple.

   Fix: add ..\..\src\pkg\checkpoints to each sample dproj's search
   path, slotted between the existing skills and agent entries to
   keep them in the same package-dir order PasClaw.dproj uses.

2) `pasclaw agent` interactive mode now has /undo

   PR #221 wired /undo into the TUI (positioned + FPC legacy paths)
   but `pasclaw agent` runs its own line-based REPL with a distinct
   slash-command dispatcher. Without /undo there, an operator who
   prefers `agent` over `tui` had no rollback story even with
   checkpoints turned on. Symmetric wiring:

     - Import PasClaw.Checkpoints into Cmd.Agent.
     - RewireCheckpoints helper called when the session is first
       created AND after /new resurrects a fresh session id.
     - BeginTurn() fires right before every RunToolLoop call so
       each user turn opens its own turn-NNNN dir.
     - HandleUndoCommand mirrors the TUI's behaviour: `/undo` ->
       1 turn, `/undo N` -> N turns, prints the restored file paths
       so the operator sees what came back.
     - /help text lists the new command.

https://claude.ai/code/session_01TBcLtmpj7dqA5tyFbGnQon

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5774900c60

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

… and dcc cfg (Codex P2 #222)

Codex P2: PR #222 added pkg\checkpoints to the three RAD Studio .dproj
files but the same samples/component-console directory has three OTHER
search-path sources that drive the documented `make` and command-line
`dcc64 SampleConsole.dpr` flows:

  - samples/component-console/Makefile (the $(ROOT)/src/pkg/<x> list)
  - samples/component-console/dcc32.cfg
  - samples/component-console/dcc64.cfg

All three were stuck on the pre-stream-reliability lineup -- they had
neither pkg/checkpoints (this PR's target) nor pkg/stream nor pkg/kb,
even though PRs #213 / #214 etc. landed long ago. Anyone using the
documented sample build path would F2613 at the FIRST missing unit
dcc reached, not just on checkpoints.

Fix: add pkg/stream, pkg/checkpoints, and pkg/kb to all three sources,
slotted in the same canonical order PasClaw.dproj uses
(providers -> stream -> tokenizer; skills -> checkpoints -> session;
memory -> kb -> updater) so a future grep -A1 across these files
stays comprehensible.

https://claude.ai/code/session_01TBcLtmpj7dqA5tyFbGnQon
@FMXExpress
FMXExpress merged commit 857f3a8 into main Jun 11, 2026
FMXExpress pushed a commit that referenced this pull request Jun 13, 2026
Both changelog files were stuck at the 2026-06-10 TUI / background-
subagent / session_search / tool-RPC entries. ~7 weeks of merged
PRs (#214 through #244) had landed without a corresponding entry in
either file -- the git log was the only record of features like the
knowledgebase, inbound MCP server mode, checkpoints + /undo,
heartbeat daemon, shell backends (local | docker), send_message,
promptware defense, Windows shell-output encoding fixes, fs_grep
ripgrep optimisations, OpenTelemetry traces, and `pasclaw agent
--quiet`.

Added (newest first):

  2026-06-13
    #244  agent --quiet log-level clamp

  2026-06-12
    #243  dcc64 search path + agent --quiet / -q
    #242  OpenTelemetry traces (OTLP/HTTP+JSON)
    #241  fs_grep tier 5+6 (byte walker + Boyer-Moore-Horspool)
    #240  fs_grep tier 1-4 (deferred hash + skip-dirs + binary
          sniff + size cap)

  2026-06-11
    #239  Windows shell output: auto-detect UTF-8 vs OEM
    #238  Hashline fs_read header mojibake fix (¶ vs ¶)
    #237  Windows shell output: OEM codepage decode

  2026-06-10
    #233  Shell backends (local | docker via IShellBackend)
    #232  Heartbeat daemon + reversible condensation (CCR)
    #230  send_message tool + condenser families + promptware
          defense + task-aware MEMORY.md slicing

  2026-06-09
    #223  /goal Ralph loop + judge model + JSON-aware condenser
    #222  /undo wired into agent + sample dprojs
    #221  Checkpoints (auto-snapshot + TUI /undo)
    #220  mcp catalog: lenient hub projector
    #219  mcp: SSE / Streamable HTTP / stdio hub transports
    #218  Inbound MCP server mode
    #217  onboard: offer to index docs into the knowledgebase
    #214  Knowledgebase (RAG over operator-curated docs)

Skipped from this changelog (build-system / Delphi-fix / FPC-fix
PRs visible in the git log but not user-facing features):
#215, #216, #224, #225, #226, #227, #228, #229, #231, #234, #236.

Both files (README.md and docs/changelog.md) updated with the same
entries -- intentional mirror so a reader on either surface sees
the same history. Same prose in both; same footnote refs at the
bottom.

Validated: every [#N] reference in both files has a matching [#N]:
URL footnote (no broken links).
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