Skip to content

FE-559: Migrate: @anthropic-ai/claude-agent-sdk query() -> @anthropic-ai/sdk client.messages.stream()#25

Merged
lunelson merged 31 commits into
mainfrom
ln/fe-559-migrate-sdk
Apr 7, 2026
Merged

FE-559: Migrate: @anthropic-ai/claude-agent-sdk query() -> @anthropic-ai/sdk client.messages.stream()#25
lunelson merged 31 commits into
mainfrom
ln/fe-559-migrate-sdk

Conversation

@lunelson
Copy link
Copy Markdown
Contributor

@lunelson lunelson commented Apr 3, 2026

Stack Context

This stack finishes the SDK migration branch and then layers the flexible turn-response model on top of it.
PR #25 is the parent branch for that work; PR #27 carries the response-model changes.

What?

  • migrate the interview and observer path onto the current SDK/tooling seam
  • harden the workspace, controller, rendering, and test boundaries around that seam
  • project the live turn card before route invalidation so follow-on response-model work has a stable UI boundary

Why?

The FE-564 response-model work needed to be split out on top of a3c46d1.
That makes this PR the foundation branch again: it now owns the migration, workspace stabilization, and live turn-card projection that the child branch depends on.
Updating the metadata keeps the stack legible after the branch split.

@linear
Copy link
Copy Markdown

linear Bot commented Apr 3, 2026

FE-559 Migrate: `@anthropic-ai/claude-agent-sdk query()` -> `@anthropic-ai/sdk client.messages.stream()`

An ad-hoc migration and re-adaptation due to discovering significant known bugs in claude agent SDK

Copy link
Copy Markdown
Contributor Author

lunelson commented Apr 3, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@lunelson lunelson changed the title spike: raw Anthropic SDK for reliable tool execution (D30) FE-559: Migrate: @anthropic-ai/claude-agent-sdk query() -> @anthropic-ai/sdk client.messages.stream() Apr 7, 2026
@lunelson lunelson marked this pull request as ready for review April 7, 2026 15:30
@augmentcode
Copy link
Copy Markdown

augmentcode Bot commented Apr 7, 2026

This pull request is abnormally large and would use a significant amount of tokens to review. If you still wish to review it, comment augment review and we will review it.

Copy link
Copy Markdown
Contributor Author

lunelson commented Apr 7, 2026

Merge activity

  • Apr 7, 4:18 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Apr 7, 4:22 PM UTC: Graphite rebased this pull request as part of a merge.
  • Apr 7, 4:22 PM UTC: @lunelson merged this pull request with Graphite.

@lunelson lunelson changed the base branch from ln/fe-538-entity-sidebar to graphite-base/25 April 7, 2026 16:19
@lunelson lunelson changed the base branch from graphite-base/25 to main April 7, 2026 16:20
lunelson and others added 7 commits April 7, 2026 16:21
Agent SDK MCP tool registration broken (A2 invalidated). Spike proves
@anthropic-ai/sdk client.messages.stream() with tool_choice forcing
reliably calls ask_question. 3/3 tests pass:

1. Forced tool_choice → structured question args
2. Raw stream events match content_block_start/delta/stop format
3. Observer JSON extraction works via direct API call

New: A26 (validated), D30. Invalidated: A2, A24, A25.
Unblocks slices 7+ (phase transitions and beyond).

Amp-Thread-ID: https://ampcode.com/threads/T-019d4eaf-1eb6-75cf-ab50-c2acf1c59c14
Co-authored-by: Amp <amp@ampcode.com>
@lunelson lunelson force-pushed the ln/fe-559-migrate-sdk branch from a3c46d1 to 5014c7c Compare April 7, 2026 16:21
@lunelson lunelson merged commit 018eaa4 into main Apr 7, 2026
2 checks passed
lunelson added a commit that referenced this pull request Apr 7, 2026
## Stack Context

This stack continues from PR #25 by remodeling choice-turn replies into structured turn responses.
PR #25 establishes the migration and live-turn-card seam; this PR carries the flexible response model above it.

## What?

- persist choice-turn replies as structured `data-turn-response` parts with a human-readable summary seam
- support zero, one, or many selected options plus optional free-text
- keep transcript hydration, resume, and interviewer-context projection aligned with the structured response shape

## Why?

The old flow assumed one immediate option selection mapped to one scalar answer string.
This branch retires that assumption so the interview UI can capture richer responses without losing persistence, hydration, or context coherence.
It also formalizes the split from `a3c46d1`, so the response-model work now lives on its own FE-564 branch and PR.
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