Skip to content

feat: make research resumable across agents - #150

Merged
filocosta46 merged 3 commits into
mainfrom
codex/reliable-research
Sep 9, 2026
Merged

feat: make research resumable across agents#150
filocosta46 merged 3 commits into
mainfrom
codex/reliable-research

Conversation

@filocosta46

@filocosta46 filocosta46 commented Sep 8, 2026

Copy link
Copy Markdown
Owner

What this does

An agent can retain research sources, write a cited result, and leave verified progress in an authorized work folder so another agent can continue without the previous conversation.

  • Follow the exact context or selected-project Markdown behind a clipped brief/search excerpt, with bounded pages, source-version checks and current memory scope.
  • Capture public HTML/text originals and readable copies through ingest --workdir, with qualified destinations, redirects, size limits and deadlines.
  • Discover and update research through plan start/checkpoint/inspect --workdir. Preserve the agreed goal, limits, completed steps, sources, results and next action; detect changed evidence and refuse stale or inconsistent completion records.
  • Connect the commands through the bundled research workflow. Keep user prose and existing files intact; recover from interrupted saves.

Includes the reviewed reconciliation of the context admission and coverage work from #146, #147 and #148. The implementation keeps network access in the CLI adapters and source/continuation policy with their existing core owners. See docs/research-continuation.md and docs/source-follow.md.

What this does not do

This is the first research-and-continuation slice. Background execution, a general Work Plane, automatic personal-memory promotion, writable MCP, and universal host certification remain outside its scope. This PR does not publish a package release or activate the development runtime in a user's AIOS.

How you checked

  • npm test: 2,760 passed, 0 failed, 9 skipped.
  • npm run smoke.
  • npm run check and npm pack --dry-run --json; new modules, workflow and linked docs are included, private planning/evidence is excluded.
  • Tests ran in an isolated clean Git fixture with the exact committed tree 6addaa1c63e231600ab626a0be113876aa2f9f34, reusing existing dependencies.
  • Separate Standards and Spec reviews: all findings resolved, zero open findings.
  • Synthetic end-to-end proof with CommonMark and RFC 7763: retain four source files and an unfinished result, then give a fresh native agent only the ordinary project/outcome request. It produced the final cited recommendation and copyable example without an owner question. Fourteen independent checks confirmed preserved goal/limits, prior progress, original source/result bytes and user prose, plus a verified new result.
  • Rechecked exact-source follow and completed-plan inspection against the final code.

The fresh-agent proof used the current host's native worker. The older standalone Codex CLI could not run its configured model; no global upgrade or configuration change was made. Windows path normalization has a portable regression, but native Windows was not available for local validation.


Supersedes #146, #147, #148

This branch carries the reconciled work from those three open PRs, including the root-identity repair that
was never pushed to #146. Do not merge their heads — they are older and now conflict with this branch.
Close them as superseded when this merges. #149 is independent and merges cleanly on top.

Verified equivalence: this branch retains 18/18 of #146's added tests, 6/6 of #147's, and 9/9 of #148's
(one renamed). #146's public head e5b95e8 contains no occurrence of projectRootBindingIsCurrent;
this branch has it in packages/core/src/projects.mjs.

Review round 1 — applied in 4d1141d

Independent review found the compact brief was spending ~1,250 characters of its fixed 6,000-character
visible budget on base64 follow locators, which displaced the whole Active Project section from a
real, full AIOS folder. Fixed here:

  • Follow locators left the visible projection. The brief renders readable
    > Source: <path> (excerpt; sha256:…) provenance only; locators are published beside it as
    contextSources in compact CLI and hook JSON, listing only sections that survived the budget so text
    and reference stay atomic. New explicit 8,192-character allowance, asserted in the envelope. search
    text output is unchanged and still prints > Follow:.
  • The MCP working-context result is deliberately unchanged, preserving its fixed 1,024-character
    non-memory metadata bound. An MCP caller reaches a reference through search_aios query results.
  • Three missing [Unreleased] changelog entries added: the removed vault/research/deep/ research
    save, the new status: active requirement for implicit project resolution with its upgrade impact,
    and search <query> --json now being rejected rather than silently ignored.
  • The bundled research skill regained its plain-language section and its find out everything about
    trigger, and now offers a destination when no authorized work folder is available instead of reporting
    the result unsaved. official-skills.json regenerated.

Two new regression tests lock the invariant: no locator in the visible digest, and published references
match exactly the sections that survived the budget.

Verification at 4d1141d

  • npm test: 2,771 tests — 2,762 passed, 0 failed, 9 skipped (supersedes the 2,760 figure above).
  • npm run smoke, npm run check, npm run syntax-check: pass.
  • Real brief --compact --memory shared against a copy of a full AIOS folder: Active Project restored,
    zero locators in the visible text, three readable > Source: lines, and all three references present
    in contextSources.

Evidence that is not in this repository

The standards/spec review artifacts and the fresh-agent continuation proof referenced above are local
only
, by the repository's documented policy of keeping local evidence out of public commits. They are
not checkable from this PR page. The Windows path-normalization fix is in the diff but was never executed
natively.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 33a32b46-2890-4968-bb54-0af98f1e07d2


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Review findings on PR #150. Three merge-gating fixes, no scope added.

The compact brief spent 1,258 of ~5,850 rendered characters on three base64
follow locators, which displaced the whole Active Project section from the
owner's Shared projection. The visible projection now renders readable
provenance only (`> Source: <path> (excerpt; sha256:...)`), and the locators
are published beside it as `contextSources` in compact CLI and hook JSON.
Only sections that survived the visible budget are listed, so text and
reference stay atomic. The block carries its own fixed 8,192-character
allowance and never enters the visible budget. Search text output is
unchanged and still prints `> Follow:`; the MCP working-context result is
deliberately untouched so its 1,024-character metadata bound still holds, and
an MCP caller reaches a reference through `search_aios` query results.

The bundled research skill regained its plain-language section and the
"find out everything about" trigger, and it now offers a destination when no
authorized work folder is available instead of reporting the result unsaved.

Adds the three missing Unreleased changelog entries: the removed
`vault/research/deep/` save, the new `status: active` requirement for implicit
project resolution and its upgrade impact, and `search <query> --json` now
being rejected rather than ignored.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@filocosta46
filocosta46 merged commit 33e8379 into main Sep 9, 2026
9 checks passed
@filocosta46
filocosta46 deleted the codex/reliable-research branch September 9, 2026 08:29
filocosta46 added a commit that referenced this pull request Sep 9, 2026
Cuts 2.0.20 from the unreleased work on main: the resumable-research
increment (#150) and the launch-path reliability fixes (#145). Bumps the
pinned install version across README, INSTALL, and docs, the package and
shrinkwrap version, and the public-contract release constant.

The bundled dependency graph is unchanged since 2.0.19, so
THIRD-PARTY-NOTICES.md and its admission digest are untouched.

Co-authored-by: Filippo Costa <209793088+filocosta46@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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.

1 participant