Skip to content

feat(harness): stream aikit events through loop - #20

Merged
sanchitrk merged 12 commits into
devfrom
harness-stages-3+1
Aug 16, 2026
Merged

sanchitrk merged 12 commits into
devfrom
harness-stages-3+1

Conversation

@sanchitrk

Copy link
Copy Markdown
Contributor

Summary

  • add an Effect-native aikit provider stream with model resolution, transport cancellation, and terminal draining
  • publish token and thinking updates live while projecting terminal assistant messages into durable session history
  • rebuild provider context from persisted entries for each turn and preserve interruption recovery
  • refresh the generated model catalog used by the live gpt-5.5 configuration

Impact

Provider requests now stop when their owning Effect is interrupted, while the terminal stream tail still commits partial output. Finalized thinking is persisted with the assistant message; streaming deltas remain non-durable. Provider-only turns no longer require sandbox services.

Validation

  • vp run typecheck
  • vp check --no-fmt — 0 errors; existing diagnostics remain warnings
  • vp test test/runner.llm.live.test.ts --reporter verbose — 2 passed with real OpenAI gpt-5.5 requests
  • vp test test/runner.cycle.live.test.ts --reporter verbose — full input, loop, interruption, durable projection, and recovery cycle passed

The full formatting check still reports existing Harness formatting issues outside the files changed by the final implementation pass.

Publishing an event assigns the aggregate's next sequence, runs its projectors,
and writes the row in one transaction, so a projection that rejects an event
rolls it back along with its side effects.
Session.prompt records a prompt in session_input durably and idempotently;
promoting it appends the user entry in the same commit. The inbox and the entry
tree both take their positions from the log, so they share one sequence space.
Add an Effect-native LLM stream boundary with cancellation and terminal draining.

Project terminal responses into durable session history while keeping deltas live.

Verify real OpenAI thinking persistence, interruption, and recovery flows.
@sanchitrk
sanchitrk marked this pull request as ready for review August 16, 2026 13:41

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

ℹ️ 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 packages/harness/src/db/migrations.ts
Comment thread packages/harness/src/runner/loop.ts
@sanchitrk
sanchitrk merged commit 0b86bd1 into dev Aug 16, 2026
@sanchitrk
sanchitrk deleted the harness-stages-3+1 branch September 2, 2026 08:40
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