Fixes from the first live session of the new loop #119

Merged
dev-agent merged 1 commits from live-fixes into main 2026-10-08 01:01:05 +00:00
Collaborator

The first live session of the new loop (bring-up on nisse-testing-operator/nisse-bringup, Opus as driver) found three real bugs and two gaps. The feature flow (issue #1) went cleanly from start to finish; the bug issue (#3) hit these.

Fixes

  1. The prose nudge made a request end on the model's own reply. When the driver answered in prose, the "use a tool" nudge went into the system prompt and the model was called again, so the conversation ended on its prose. Opus 5.5 refuses that: "This model does not support assistant message prefill. The conversation must end with a user message." That's the 400 you saw. The nudge is now a harness fact in the conversation. The delegation harness's prose path had the same flaw and is fixed the same way.
  2. Every delegation would have failed on Opus. A helper's first request ended with its own delegation_started event, rendered as an assistant message. The helper now sees it as the harness handing over its task ("[orchestrator] your task: …"). The walk found this once the contract check was in place; the M2.6 tests' scripted helpers didn't check it.
  3. The contract check catches it from now on. model_contract.assert_renderable requires every request to end on the user's side. Every scripted model in the tests applies it. Fixes 1 and 2 were each checked by putting the old code back: the new tests fail.
  4. status and details in an item's thread were taken as replies. That woke the driver and cancelled the bug's countdown. They now answer at once and change nothing.
  5. The driver couldn't answer a remark without changing the item, so it answered in prose, which then failed via fix 1's bug. Any run woken by your message or a review comment now offers reply. It answers where asked (the thread, or the PR) and returns to the wait that was interrupted. The instructions say every reply is a tool call.

Also

  • scripts/bringup-repo.sh create|reset|delete makes the bring-up's test repository. make_repo and delete_repo were split out of fresh_repo for it.
  • Repositories it makes get the agent's labels (bug, discuss, design).

Tests

  • test_loop_live_fixes.py: one test per finding (the prose nudge, a helper's requests, status in a thread, a remark answered, a review comment answered without a fix).
  • Walk: it sends status into threads (new property status_changes_nothing), and its scripted driver sometimes answers remarks with reply.
  • Results: unit (732) and walk (48) pass, and the repo live tests pass.

This touches the loop's core (views, driver), so it may be worth labelling e2e:full.

🤖 Generated with Claude Code

https://claude.ai/code/session_01PPQ14L3LikyefCMFBqEbKE

The first live session of the new loop (bring-up on `nisse-testing-operator/nisse-bringup`, Opus as driver) found three real bugs and two gaps. The feature flow (issue #1) went cleanly from start to finish; the `bug` issue (#3) hit these. ## Fixes 1. **The prose nudge made a request end on the model's own reply.** When the driver answered in prose, the "use a tool" nudge went into the system prompt and the model was called again, so the conversation ended on its prose. Opus 5.5 refuses that: *"This model does not support assistant message prefill. The conversation must end with a user message."* That's the 400 you saw. The nudge is now a harness fact in the conversation. The delegation harness's prose path had the same flaw and is fixed the same way. 2. **Every delegation would have failed on Opus.** A helper's first request ended with its own `delegation_started` event, rendered as an assistant message. The helper now sees it as the harness handing over its task ("[orchestrator] your task: …"). The walk found this once the contract check was in place; the M2.6 tests' scripted helpers didn't check it. 3. **The contract check catches it from now on.** `model_contract.assert_renderable` requires every request to end on the user's side. Every scripted model in the tests applies it. Fixes 1 and 2 were each checked by putting the old code back: the new tests fail. 4. **`status` and `details` in an item's thread** were taken as replies. That woke the driver and cancelled the bug's countdown. They now answer at once and change nothing. 5. **The driver couldn't answer a remark without changing the item,** so it answered in prose, which then failed via fix 1's bug. Any run woken by your message or a review comment now offers `reply`. It answers where asked (the thread, or the PR) and returns to the wait that was interrupted. The instructions say every reply is a tool call. ## Also - **`scripts/bringup-repo.sh create|reset|delete`** makes the bring-up's test repository. `make_repo` and `delete_repo` were split out of `fresh_repo` for it. - **Repositories it makes** get the agent's labels (`bug`, `discuss`, `design`). ## Tests - **`test_loop_live_fixes.py`:** one test per finding (the prose nudge, a helper's requests, status in a thread, a remark answered, a review comment answered without a fix). - **Walk:** it sends `status` into threads (new property `status_changes_nothing`), and its scripted driver sometimes answers remarks with `reply`. - **Results:** unit (732) and walk (48) pass, and the repo live tests pass. This touches the loop's core (views, driver), so it may be worth labelling `e2e:full`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01PPQ14L3LikyefCMFBqEbKE
dev-agent added 1 commit 2026-10-08 00:03:03 +00:00
Fixes from the first live session of the new loop
CI / checks (push) Skipped
CI / checks (pull_request) Successful in 2m33s
CI / e2e (pull_request) Successful in 10m38s
659915d309
Found live on 2026-10-07 (bring-up on nisse-testing-operator/nisse-bringup,
Opus as driver):

- The driver's prose nudge went into the system prompt, so the retry ended
  on the model's own reply. Opus 5.5 refuses that ("does not support
  assistant message prefill. The conversation must end with a user
  message"). The nudge is now a harness fact in the conversation. The
  delegation harness's prose path did the same and is fixed likewise.
- A helper's first request ended with its own delegation_started event,
  rendered as an assistant message: every delegation would have failed on
  Opus. The helper now sees it as the harness handing over its task.
- model_contract checks that every request ends on the user's side, so
  scripted tests catch this from now on (each fix is mutation-checked).
- `status` (and `details`) in an item's thread were taken as replies: they
  woke the driver and cancelled a bug's countdown. They now answer at once
  and change nothing.
- The driver had no way to answer a remark without changing the item, so it
  answered in prose. Every run woken by a message (or a review comment) now
  offers `reply`, which answers where asked and returns to the very wait
  that was interrupted.

Also: scripts/bringup-repo.sh makes the bring-up's test repository
(make_repo/delete_repo, split out of fresh_repo), and made repositories get
the agent's labels (bug, discuss, design).

Tests: test_loop_live_fixes.py (one per finding); the walk sends `status`
into threads (status_changes_nothing) and its scripted driver sometimes
answers remarks with reply.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PPQ14L3LikyefCMFBqEbKE
dongar added the e2e:full label 2026-10-08 00:09:32 +00:00
dongar approved these changes 2026-10-08 00:10:01 +00:00
Dismissed
dongar approved these changes 2026-10-08 01:00:34 +00:00
dev-agent merged commit 613a2a7f72 into main 2026-10-08 01:01:05 +00:00
dev-agent deleted branch live-fixes 2026-10-08 01:01:05 +00:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dev/nisse#119