Skip to content

feat(agentic): resume_context tool + alias redirect for self-recovery (#714)#731

Merged
hartsock merged 1 commit into
mainfrom
feat/714-resume-context
Jun 28, 2026
Merged

feat(agentic): resume_context tool + alias redirect for self-recovery (#714)#731
hartsock merged 1 commit into
mainfrom
feat/714-resume-context

Conversation

@hartsock

Copy link
Copy Markdown
Member

What this PR does

On resume, recall excludes the current conversation by design, so the model had no self-callable way to read THIS conversation's own pre-interrupt work. Adds a read-only resume_context tool that renders this conversation's recent turns (via a new RecallSource::this_conversation_recent — the opposite of search's current_conversation_id filter), the current <plan> (plan_block), and the saved <state> (restored by #713). Degrades to a clear "no history" line when headless; advertised always.

resolve_tool_alias redirects the instinctive reaches (resume, where_were_we, where_did_we_leave_off, catch_me_up, recap) → resume_context; what_was_i_doing still → plan_get. recall's no-match text now points at resume_context (keeping the "no matches in past conversations" prefix so #717 telemetry still keys on it). The phantom-reach telemetry records the new aliases for free.

Test plan

resume_context renders turns+<plan>+<state> from a mock source (+ headless "no history", + turn-load error folded in); the 5 aliases rewrite to resume_context while the real name returns None (so a direct call isn't logged as a self-Rewrite in #717 telemetry — review fix); recall no-match text contains resume_context; a store-backed integration test proves this_conversation_recent returns the current conversation's own last-N turns, fenced. just check green: newt-core lib 442 + store + newt-tui, clippy -D warnings + fmt clean.

Out of scope (follow-ups)

Surfacing the compaction summary (memory_fetch, Frozen by default), the arg-based recall-query redirect, and the plan-ledger persistence (#713/#718).

Fixes #714

🤖 Generated with Claude Code

…#714)

On resume, recall excludes the current conversation by design, so the model had no
self-callable way to read THIS conversation's own pre-interrupt work. Adds a
read-only resume_context tool that renders this conversation's recent turns (via a
new RecallSource::this_conversation_recent — the opposite of search's filter), the
current <plan> (plan_block), and the saved <state> (now restored by #713); degrades
to a clear "no history" line when headless. Advertised always.

resolve_tool_alias redirects the instinctive reaches (resume, where_were_we,
where_did_we_leave_off, catch_me_up, recap) to resume_context; what_was_i_doing
still -> plan_get. recall's no-match text now points at resume_context (keeping the
"no matches in past conversations" prefix so #717 telemetry still keys on it).

The phantom-reach telemetry (#717) records the new aliases for free. Review fix:
the real name resume_context is NOT in the alias list — it returns None so a direct
call dispatches as a real tool, not a self-Rewrite that would pollute #717's signal.

Fixes #714

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@hartsock hartsock added the risk:low Low-risk change (scoped, tested, no CI/build/hook changes) label Jun 28, 2026
@hartsock hartsock merged commit dc69a42 into main Jun 28, 2026
16 checks passed
@hartsock hartsock deleted the feat/714-resume-context branch June 28, 2026 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:low Low-risk change (scoped, tested, no CI/build/hook changes)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(recall): let a resumed conversation recover its own pre-interrupt work

1 participant