feat: add --previous-interaction-id to research commands#75
Merged
NormallyGaussian merged 4 commits intomainfrom Mar 12, 2026
Merged
feat: add --previous-interaction-id to research commands#75NormallyGaussian merged 4 commits intomainfrom
NormallyGaussian merged 4 commits intomainfrom
Conversation
Thread previous_interaction_id through the research CLI and core to enable follow-up research that reuses context from a prior task run. - Core: create_research_task() and run_research() accept and forward previous_interaction_id to the SDK; all result dicts now include interaction_id from the API response. - CLI: research run accepts --previous-interaction-id; research status and completed output display the interaction_id with usage hints. - Tests: 4 new tests covering the option in no-wait/wait modes, display in human output, and presence in JSON output.
Thread previous_interaction_id through the full enrichment pipeline: batch.py → processors → runner → CLI. Each run in a task group receives the same previous_interaction_id, enabling enrichment that builds on context from a prior research or enrichment task.
Add follow-up context reuse to features list, agent patterns section, and a new dedicated section with step-by-step examples showing research → research and research → enrich chaining.
Use the same help string for both research and enrich commands.
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
--previous-interaction-idoption to bothresearch runandenrich runCLI commands, enabling follow-up tasks that reuse context from a prior taskinteraction_idin all research output (JSON and human-readable) so users know what to pass for follow-upsprevious_interaction_idthrough the full stack: CLI → core/runner → processors → batch → SDKTest plan
research run "What is the capital of France?"thenresearch run "What is the population of that city?" --previous-interaction-id <id>— correctly resolved "that city" as Parisresearch run "top 3 AI companies"thenenrich run --data '[...]' --previous-interaction-id <id>— enrichment received context from prior research--no-wait+--previous-interaction-id— task group created successfullyinteraction_idfieldprevious_interaction_idreturns clear API error:"Invalid interaction id: ..."(exit code 4, no special handling needed)