Skip to content

engine-v2: refresh canonical prompt metadata on resume - #2869

Merged
henrypark133 merged 4 commits into
v2-engine-callable-only-cleanupfrom
v2-engine-prompt-lifecycle-alignment
Apr 23, 2026
Merged

henrypark133 merged 4 commits into
v2-engine-callable-only-cleanupfrom
v2-engine-prompt-lifecycle-alignment

Conversation

@henrypark133

Copy link
Copy Markdown
Collaborator

Summary

  • removes duplicated callable-tool prose from the engine v2 system prompt
  • refreshes canonical capability metadata across resume/checkpoint paths
  • preserves step-0 knowledge and skill appends when the engine-owned prompt is refreshed

Verification

  • cargo fmt --all
  • cargo test -p ironclaw_engine refresh_preserves_step_zero_system_appends --lib
  • cargo test -p ironclaw_engine resume_refreshes_checkpointed_system_prompt_metadata --lib
  • cargo test --test engine_v2_skill_codeact skill_prompt_context_survives_pause_and_resume

Refs: #2767 (comment)

Stacked on #2868.

@github-actions github-actions Bot added size: XL 500+ changed lines risk: low Changes to docs, tests, or low-risk modules contributor: core 20+ merged PRs labels Apr 22, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request implements a system for refreshing and persisting system prompts during the execution loop, specifically handling thread resumes and checkpoints. It introduces a marker-based identification for engine-owned prompts and adds utility functions to update these prompts while maintaining user-appended data. Review feedback highlights opportunities to optimize JSON state updates by reducing redundant lookups and string allocations, and suggests using more robust token-based detection for prompt boundaries to avoid fragility in substring matching.

Comment thread crates/ironclaw_engine/src/executor/loop_engine.rs
Comment thread crates/ironclaw_engine/src/executor/prompt.rs

@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: 9473524534

ℹ️ 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".

Comment thread crates/ironclaw_engine/src/executor/prompt.rs Outdated
Comment thread crates/ironclaw_engine/src/executor/prompt.rs Outdated
Comment thread crates/ironclaw_engine/src/executor/loop_engine.rs Outdated
Comment thread crates/ironclaw_engine/src/executor/loop_engine.rs Outdated
* Add engine v2 action discovery metadata

* fix(engine): address action discovery review (#2876)

* fix(engine): address follow-up review comments (#2876)

* fix(engine): satisfy clippy in orchestrator lookup

* fix(engine): propagate action snapshots in executor paths (#2876)

* fix(bridge): restrict tool_info to callable actions (#2876)

* [codex] Finish engine v2 deferred action inventory cleanup (#2889)

* Add deferred action inventory groundwork

* fix(engine): address deferred action inventory follow-up

* fix(engine): address deferred inventory review feedback

* test: fix fmt and clippy failures
@github-actions github-actions Bot added scope: channel/web Web gateway channel scope: tool Tool infrastructure scope: tool/builtin Built-in tools scope: tool/wasm WASM tool sandbox scope: llm LLM integration scope: extensions Extension management risk: medium Business logic, config, or moderate-risk modules and removed risk: low Changes to docs, tests, or low-risk modules labels Apr 23, 2026
@henrypark133
henrypark133 merged commit 7a4bd6e into v2-engine-callable-only-cleanup Apr 23, 2026
15 checks passed
@henrypark133
henrypark133 deleted the v2-engine-prompt-lifecycle-alignment branch April 23, 2026 21:55
henrypark133 added a commit that referenced this pull request Apr 25, 2026
…#2868)

* engine-v2: make available_actions callable-only for blocked providers

* fix(engine): address review fixture tempdir leak (#2868)

* engine-v2: refresh canonical prompt metadata on resume (#2869)

* fix(engine): align prompt metadata refresh with resume state

* fix(engine): finish prompt refresh compaction coverage (#2869)

* fix(engine): preserve prompt refresh on resume (#2869)

* Add engine v2 action discovery metadata (#2876)

* Add engine v2 action discovery metadata

* fix(engine): address action discovery review (#2876)

* fix(engine): address follow-up review comments (#2876)

* fix(engine): satisfy clippy in orchestrator lookup

* fix(engine): propagate action snapshots in executor paths (#2876)

* fix(bridge): restrict tool_info to callable actions (#2876)

* [codex] Finish engine v2 deferred action inventory cleanup (#2889)

* Add deferred action inventory groundwork

* fix(engine): address deferred action inventory follow-up

* fix(engine): address deferred inventory review feedback

* test: fix fmt and clippy failures

* engine-v2: trim unused callable discovery payload

* tests: restore env vars in review-fix cases

* engine-v2: populate callable snapshots consistently

* Unify v2 integration enablement on tool_activate

* engine-v2: tighten tool_info inventory and approvals

* llm: normalize tool_info hint syntax

* engine-v2: tighten tool_activate install approval lookup

* tests: align gmail settings-first flow with approval contract

* engine-v2: fix remaining tool surface review issues

* engine-v2: restore auto-approve defaults

* fix(engine): align v2 tool permissions with defaults

* fix(engine): close v2 callable snapshot gaps

* fix(bridge): label latent-only providers accurately
theredspoon pushed a commit to theredspoon/ironclaw that referenced this pull request Jun 21, 2026
…nearai#2868)

* engine-v2: make available_actions callable-only for blocked providers

* fix(engine): address review fixture tempdir leak (nearai#2868)

* engine-v2: refresh canonical prompt metadata on resume (nearai#2869)

* fix(engine): align prompt metadata refresh with resume state

* fix(engine): finish prompt refresh compaction coverage (nearai#2869)

* fix(engine): preserve prompt refresh on resume (nearai#2869)

* Add engine v2 action discovery metadata (nearai#2876)

* Add engine v2 action discovery metadata

* fix(engine): address action discovery review (nearai#2876)

* fix(engine): address follow-up review comments (nearai#2876)

* fix(engine): satisfy clippy in orchestrator lookup

* fix(engine): propagate action snapshots in executor paths (nearai#2876)

* fix(bridge): restrict tool_info to callable actions (nearai#2876)

* [codex] Finish engine v2 deferred action inventory cleanup (nearai#2889)

* Add deferred action inventory groundwork

* fix(engine): address deferred action inventory follow-up

* fix(engine): address deferred inventory review feedback

* test: fix fmt and clippy failures

* engine-v2: trim unused callable discovery payload

* tests: restore env vars in review-fix cases

* engine-v2: populate callable snapshots consistently

* Unify v2 integration enablement on tool_activate

* engine-v2: tighten tool_info inventory and approvals

* llm: normalize tool_info hint syntax

* engine-v2: tighten tool_activate install approval lookup

* tests: align gmail settings-first flow with approval contract

* engine-v2: fix remaining tool surface review issues

* engine-v2: restore auto-approve defaults

* fix(engine): align v2 tool permissions with defaults

* fix(engine): close v2 callable snapshot gaps

* fix(bridge): label latent-only providers accurately
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor: core 20+ merged PRs risk: medium Business logic, config, or moderate-risk modules scope: channel/web Web gateway channel scope: extensions Extension management scope: llm LLM integration scope: tool/builtin Built-in tools scope: tool/wasm WASM tool sandbox scope: tool Tool infrastructure size: XL 500+ changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants