feat(v1): import interaction history - #2142
Closed
hallerite wants to merge 1 commit into
Closed
Conversation
hallerite
marked this pull request as ready for review
July 27, 2026 12:32
Contributor
ApprovabilityVerdict: Needs human review Unable to check for correctness in 31110ca. New feature that adds history import capability to the interaction system. Introduces new You can customize Macroscope's approvability policy. Learn more. |
hallerite
force-pushed
the
codex/history-import
branch
3 times, most recently
from
July 27, 2026 14:34
0cccd71 to
3ee3c50
Compare
hallerite
force-pushed
the
codex/history-import
branch
from
July 27, 2026 16:19
3ee3c50 to
3665ad5
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 3665ad5. Configure here.
hallerite
force-pushed
the
codex/history-import
branch
from
July 27, 2026 16:58
3665ad5 to
31110ca
Compare
Member
Author
|
closing for now, as only Tau needs this |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Agent.interaction(..., history=...)for pre-existing, role-preserving conversation context that remains unsampled in the traceMessagesbootstrap only for the statelessnullandbashharnesses; unsupported harnesses reject history import earlyCodex is intentionally unchanged and does not opt into history import in this PR.
Validation
uv run ruff check --fix .uv run ruff format --check .uv run ty check verifiersuv run pytest tests/— 909 passed, 63 credential-gated tests skippeduv run pre-commit run --all-filesNote
Add interaction history import to v1 agent and harness
history: Messages | Noneparameter toAgent.interactionandRolloutRun, passing imported conversation context to the harness on the first step only.Harness.bootstrap()as a default mechanism to merge imported history with a live opening turn before callinglaunch(), gated by a newSUPPORTS_HISTORY_IMPORTclass flag.BashHarnessandNullHarnessopt in by declaringSUPPORTS_HISTORY_IMPORT = True; other harnesses raise aValueErrorif history is provided without overridingbootstrap().EchoUserSimEnvfixture to seed interactions with a system message and assistant greeting via the new history parameter, and updates its reward to require exactly one imported greeting message.historyto a harness that does not declare support now raise aValueErrorat setup time.Macroscope summarized 31110ca.
Note
Medium Risk
Touches core rollout and harness segment routing; mistakes could mis-order conversation or double-count system prompts, though unsupported harnesses are rejected up front and only stateless null/bash opt in.
Overview
Adds
history=onAgent.interaction(and episode agents) so rollouts can start with pre-existing, role-preserving messages before the first live user turn. Those messages land in the trace as unsampled context, not as model turns.The harness layer gets a
bootstrap()path whenhistoryis set on the first segment: default behavior merges imported messages with the opening turn and **launch()**es (with system-prompt de-duplication likeresume()). Harnesses must declareSUPPORTS_HISTORY_IMPORTor overridebootstrap();nullandbashopt in. Unsupported harnesses fail early via_check_interaction_support.RolloutRuncarries history only through the firststep(), then clears it so later segments use normal launch/resume.E2E coverage uses the echo user-sim fixture with a seeded assistant greeting and asserts imported system/assistant nodes in the trace.
Reviewed by Cursor Bugbot for commit 31110ca. Bugbot is set up for automated code reviews on this repo. Configure here.