Skip to content

fix(always_on): a failed wake ends only that wake; the whole run is judged - #981

Merged
sarah-chitty-1 merged 26 commits into
mainfrom
sarahchitty/always-on-carry-on-after-failed-wake
Dec 3, 2026
Merged

sarah-chitty-1 merged 26 commits into
mainfrom
sarahchitty/always-on-carry-on-after-failed-wake

Conversation

@sarah-chitty-1

@sarah-chitty-1 sarah-chitty-1 commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

Built on #933, which is now merged into main. This PR has merged main since (dbbc03f1), so its diff against main is its own changes only.

Merge order with #980. This PR and #980 (sarahchitty/always-on-judge-thinking-filter) conflict in always_on_agent_verifier.py and always_on_staging.py. This PR merges first. #980 then merges main with this PR in it, resolves the two files, and must re-run its tests before it merges.

What was broken

In the always_on step, one failed wake ended the whole multi-day run. The judges then skipped the run, or scored it 0 without reading it. Hark's audit found 43 of 210 graded runs ended early this way. Those runs averaged 0.11 rubric satisfaction, against 0.65 for runs that finished. In one example, a turn cap in wake 1 of a 10-day task scored 0.

What each failure kind does now

  • The agent's own failure (agent_error, a crash, canceled, rejected, a turn cap with continue_after_wake_limit off): only that wake ends. The failure is recorded and the run goes on to its next wake, check or user message. The prompt response keeps no error_type.
  • Infra failure (infra_error, an agent that stopped answering): as in fix(always_on): an infra-failed turn is redone from its env deploy instead of scoring 0 #933. The run ends as agent_turn_infra_error, the step fails with AgentTurnInfraError, and the run is redone. If the task goes on past the failed step (fail_task_on_error off), the always_on judge and the response check now leave the run ungraded (a skip, no score). They no longer score it 0 with a prompt_error row. An aggregate over those judges (aggregate_verifiers with verifier_ids, such as PSI's psi_verdict and rubric_satisfaction) is skipped too, so the headline score isn't 0 either. A prompt_agent turn's infra_error still scores 0, as on main, so no other task's score moves.
  • Harness v14's turn cap (error_code psi.turn_cap, the Agents SDK's "Max turns (N) exceeded"): with continue_after_wake_limit on, it is a cut-off at the tool-call limit, as Claude Code's wording is. It is not a failed turn.
  • Three failed turns in a row end the run as agent_turn_failed. The run is still judged.
  • A turn agent-env gave up waiting on (agent_turn_timeout) still ends the run. It is now judged, not skipped.

Since the review

Since the second review

The cap of 3

One failure is the case a run should survive. The harness can recover: the PSI neutral harness writes the next wake a note and compacts. A second failure in a row can still be the same condition clearing. A third means two chances to recover are gone. Ending there stops a dead agent spinning through every scheduled wake, each of which can cost up to timeout_seconds of the budget. A completed turn, or one cut off at a limit, starts the count again. The cap is a module constant, FAILED_TURNS_IN_A_ROW_MAX.

Why agent-env's own timeout still ends the run

No end state says the turn stopped, so it may still be running. A next wake would share its session and its world. Its tool calls and app changes would land in another wake's record. With continue_after_wake_limit on, the step still cancels such a turn and goes on once the agent confirms it stopped, as before.

Verifiers that now judge these runs

A run that ended on its agent's own failure is judged as a whole, and its failed turns count against the agent.

  • always_on_agent_verifier, through a new rubrics_verifier hook, _judges_failed_run.
  • user_sim_judge.
  • agent_prompt_response_verifier.
  • rate_user_satisfaction.
  • env_outcome never skipped.

A run that the user sim or the step broke is still scored 0 without being judged. A plain rubrics_verifier on a prompt_agent turn is unchanged.

New record fields and the step note

  • metadata["always_on"][step_id] gains:
    • failed_turns: each failed turn's wake, turn, error_type, error_code, message, went_on and told_in_wake.
    • counts.failed_turns and counts.failed_turn_kinds, keyed by error_code, else error_type.
    • reached_scheduled_end, true for end_time, user_done and finished_nothing_pending.
  • The timeline gets a turn_failed event for each failed turn.
  • The judge's wake-by-wake text and the staged index say which turn failed and whether the run went on.
  • After a failed turn the run went on from, the next wake opens with the step's own note, as it does after a cut-off. The note is the same for every harness and failure kind. It never carries the error text, which can name the infrastructure: "(Your last turn ended with an error before you finished. What you did before then stands; anything you were in the middle of did not finish.)"
    • It is recorded as the cut-off note is: failed_turn_notice on the wake event and on the staged woke line.
    • The judge's index labels it as the run's note, not the user's words.

Tests

  • New: tst/unit/task_step/test_always_on_failed_turns.py, 25 tests. Every new test fails against the base source.
    • Hark's test 1: a fake agent fails wake 2 of 5, for each failure kind. Wakes 3 to 5 still run and the judges read the whole run.
    • An infra failure still follows fix(always_on): an infra-failed turn is redone from its env deploy instead of scoring 0 #933.
    • The cap ends the run, and the run is still judged.
    • A completed turn starts the count again.
    • The timeout ends the run, and the run is judged.
    • The per-run report fields.
    • The next-wake note: it is sent after a failed turn, a completed turn adds none, and the judge's view labels it as the run's.
  • New tests in other files:
    • In test_user_sim_judge.py, user_sim_judge judges a run ended by the cap.
    • In test_user_sim_satisfaction.py, rate_user_satisfaction rates a run ended by the cap.
  • Updated: the old tests that pinned "a failed turn ends the run".
  • Golden file: one case is re-recorded. It now reaches the prompt_error path through a user-sim error, and only its message changed. Three cases are new, so judging these runs is still covered: the always_on judge on a run that ended as agent_turn_timeout, the same on one that ended as agent_turn_failed, and user_sim_judge on one that ended as agent_turn_failed.
  • Since the review: an infra-failed run is skipped by the always_on judge, the response check, and a judge with fail_task_when_not_passing. A prompt_agent turn's infra_error still scores 0. v14's turn cap is a cut-off: by its code and words, by its code alone, and by the SDK's words from an older harness. A run recorded before failed_turns existed is judged with use_trajectory when its one turn is the one that failed. test_always_on_psi_aggregates.py runs the PSI task's own judges and aggregates (tst/data/psi_always_on_verifiers.json, criteria cut to placeholder rows) on an infra-failed run: psi_verdict and rubric_satisfaction are skipped, not 0. It also checks a partly skipped aggregate and that a run with no always_on step pools as on main.
  • tst/unit/task_step plus the other always_on-touching unit tests (agents/claude_code, bundle, cli, env/gateway/triggers_fires_test.py, task, training), on the merged head: 7801 passed, 6 failed. The 6 also fail on the base branch: computer_exec_test.py (4) and test_mcp_cli_builder.py (2).
  • Since the second review, new tests in test_always_on_failed_turns.py. Each fails against 6c7cb2b1:
    • With use_trajectory and no trajectories, a run with a turn that ran plus a failed turn is refused. Three cases: a failed turn the run went on from, a turn agent-env gave up waiting on, and the same re-graded from a record with no failed_turns.
    • The staged index says once that a wake's turn failed. Two cases: one the run went on from, and one agent-env gave up waiting on.
  • On 8f6cc28f (after merging main), tst/unit/task_step, tst/unit/task (episodes included) and the same other always_on-touching unit tests: 5685 passed, 6 failed. They are the same 6 as above.
  • ruff check is clean.

🤖 Generated with Claude Code

Confidence Score: 5/5RetriggerView in Greptile

The PR appears safe to merge; no new actionable issues were found.

Summary

Failed agent turns now end their wake rather than the whole always_on run. Three consecutive failures still end the run, which remains eligible for judging.

  • A failed agent turn ends its wake, not the whole run.
  • Always-on judges score agent failures but skip infrastructure failures.

Review checks were source-based; no tests were run during this review.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Agent turn ends] --> B{How did it end?}
  B -->|Completed or allowed cut-off| C[Reset failure count]
  C --> D[Continue run]
  B -->|Agent failure| E[Record failed turn]
  E --> F{Three consecutive failures?}
  F -->|No| D
  F -->|Yes| G[End run and judge it]
  B -->|Unconfirmed timeout| G
  B -->|Infrastructure failure| H[End run and fail step]
  H --> I[Retry or leave ungraded]
Loading

Reviews (12) · Last reviewed commit: "Merge origin/main (dbbc03f1) into sarahc..." · Reviewed by Greptile

sarah-chitty-1 and others added 9 commits November 25, 2026 16:10
…g 0; judges read the harness's failure

A PSI always_on run whose wake failed for an infrastructure reason (a gateway 5xx, throttling, a dead
sandbox) was recorded as a normal end and then scored 0 by the rubrics judges, so it counted as the
model's failure (BELOW_ONE). The A2A protocol already says which failures are the agent's
(error_type agent_error) and which aren't (infra_error, "agent-env may retry it"); nothing acted on it.

- always_on: a turn whose error_type is infra_error, or whose agent stopped answering
  (AgentUnreachableError, error_code agent_env.agent_unreachable), ends the run as
  agent_turn_infra_error (in ERROR_ENDS and END_NOTES). The timeline, record, conversation and prompt
  response are written as before, and the record now keeps error_code. Then the step raises
  AgentTurnInfraError, so no verifier grades it and a retry_config can redo it. agent_error turns are
  graded as before. Docstrings now say what a failed turn gets (a rubrics 0, not a skip).
- task/outcome.py: AgentTurnInfraError classifies as TRANSIENT (key budget/auth text still wins).
- rubrics_verifier: an infra_error prompt response is a true skip (no score, no rows; the mistakes
  entry skipped too), so an aggregate leaves it out and a run with every source skipped is UNSCORED.
  _gated no longer compares a skipped verdict's missing score.
- turn_events (native OpenInference): a harness.error span is a failure note (kind, message, HTTP
  status, retries) instead of being dropped as the harness's own span; a failed_wake message names
  the kind. gateway, throttled, timeout_call and harness kinds are said to be no doing of the
  assistant's.
- staging: harness_note lines carry failure, the index gets an error line for it, the record lists
  harness_failures, and the judge's files note explains failure lines only when there is one.
- agents/AGENTS.md: what always_on does with each error_type.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ailure's message stays out of its staged line

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e from its env deploy

The step type's own default (TaskStep.default_retry_config), applied when a Task is built and never
written into the stored task. A task's own retry_config replaces it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ures' into sarahchitty/always-on-infra-failures
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…verifier and aggregate_verifiers as on main

The infra-error skip in rubrics_verifier and the all-skipped verifier_ids aggregate changed other tasks' scores,
and no always_on run reaches them: the step fails first and its default retry redoes the run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… is judged

A turn that fails as the agent's own failure (error_type agent_error, or
anything but infra_error) no longer ends the multi-day run. It is recorded
(a turn_failed timeline event, and the record's failed_turns with its
error_type, error_code and message), what it sent the user is taken as any
wake's is, and the run goes on to its next wake, check or user message, the
prompt response keeping no error_type.

- Infra failures keep #933's behaviour: the run ends as
  agent_turn_infra_error and the step fails with AgentTurnInfraError.
- FAILED_TURNS_IN_A_ROW_MAX (3) failed turns in a row end the run as
  agent_turn_failed, so a dead agent can't spin through every scheduled wake.
  A completed or cut-off turn starts the count again.
- A turn agent-env gave up waiting on (agent_turn_timeout) still ends the
  run: no terminal state says it stopped, so a next wake would share its
  session and world with it.
- A run that ended on its agent's own failure (AGENT_FAILURE_ENDS) is judged
  as a whole, not skipped: always_on_agent_verifier (via a rubrics_verifier
  hook), user_sim_judge, agent_prompt_response_verifier and
  rate_user_satisfaction. env_outcome never skipped. A run the user sim or
  the step broke is still scored 0 unjudged.
- The record reports early ends per run: failed_turns,
  counts.failed_turns, counts.failed_turn_kinds (by error_code, else
  error_type) and reached_scheduled_end. The judge's wake-by-wake text and
  the staged index say which turn failed and whether the run went on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…th an error

After a failed turn the run went on from, the next wake opens with the step's
own note (FAILED_TURN_TEXT), as it does after a cut-off (CUT_OFF_TEXT). It is
the same for every harness and failure kind and never carries the error's text,
which can name the infrastructure. It is recorded as the cut-off note is:
failed_turn_notice on the wake event and the staged "woke" line, told_in_wake
on the failed turn's entry, and the judge's index says it is the run's note,
not the user's words.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sarah-chitty-1
sarah-chitty-1 requested a review from a team as a code owner December 1, 2026 22:14
sarah-chitty-1 and others added 2 commits December 1, 2026 14:49
… every step the always_on step depends on

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…reaches staging, never "No trajectory available"

A turn agent-env gave up waiting on returns before its trajectory is read, so a run whose opening wake timed out
stored none; with use_trajectory, rubrics_verifier then raised "No trajectory available" (and _compact_trajectory
would again) instead of judging the run #981 now judges. The same held for a run its failed turns in a row ended, and
for one that went on after failed turns (ended at its wake cap, no error on its response), whenever none stored one.

rubrics_verifier gets a hook, _judges_without_trajectory (never in the base): when it says so, a run with no
trajectory skips the guard and the single-file compaction and goes to stage_trajectory, refused still if nothing was
staged. always_on_agent_verifier says so for a run with any failed turn of its agent's own; each such wake is staged
from the run's record with a trajectory_missing line and named in the judge's prompt. A run that failed no turn and
stored none is still refused. Staged by position (no timeline kept), the turn agent-env gave up waiting on, sent but
with no per-turn trajectory entry, is now staged as a turn whose trajectory is missing instead of left out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@earakely-scale

Copy link
Copy Markdown
Collaborator

🤖 Automated Claude routine — Env Pod PR Context Review. This is a bot, not Edgar Arakelyan; not a human review.

Stack context: this branch predates 91a2a16 on its base (#933), which removed the infra-error skip this PR still builds on.

What happens on rebase:

GitHub shows the textual conflict already. The point here is that the conflict is also semantic.


Generated by Claude Code

sarah-chitty-1 and others added 6 commits December 2, 2026 10:48
The scheduler retried any failure a retry_config covered, so always_on's implied retry also
redeployed and reran a run that failed on a config error or a broken user sim, which fails the
same way again. RetryConfig.retry_on names the failures a retry redoes (raised as or from one of
its types); always_on's default sets it to AgentTurnInfraError. A task's own retry_config, with
no retry_on, still redoes any failure.

Tests run the implied retry through the scheduler: an infra failure redeploys and reruns once, a
second fails the task, and any other failure fails it without redeploying.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reverts fe36f38. The hub's run-task workflow decides its own rollbacks and doesn't read
RetryConfig.retry_on, so the filter held only in Task.run and local runs and the hub would
redo different failures. Until the hub honours it too, always_on's default retry redoes a failed
run on both the same way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…itty/always-on-carry-on-after-failed-wake

Picks up 91a2a16, bf8e40c, fe36f38 and its revert 1f220a6. In rubrics_verifier, #933's removal of
the generic infra_error skip stands and #981's _judges_failed_run and _judges_without_trajectory hooks
stay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ded, never scores it 0

With #933's head, an always_on run that ended on an infrastructure failure and reached its verifiers
(the task's fail_task_on_error off) was scored 0 with a prompt_error row, against the model. The
always_on judge and the response check now skip it (ended_on_infra_failure, read from the run's
record). A prompt_agent turn's infra_error still scores 0 unjudged, as on main, so no other task's
score moves. rubrics_verifier's gate lets a skip through when fail_task_when_not_passing is on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…limit

With continue_after_wake_limit on, _limit_reached knew only Claude Code's words for the tool-call
limit, so the PSI neutral harness's turn cap (v14: error_code psi.turn_cap, the Agents SDK's "Max
turns (N) exceeded") was a failed turn, counted towards FAILED_TURNS_IN_A_ROW_MAX and told with
FAILED_TURN_TEXT. Either the code or the words now cut the wake off at the tool-call limit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d_turns existed doesn't raise

A run recorded before #981 has no failed_turns, so _judges_without_trajectory found none and a
use_trajectory judge raised "No trajectory available" for a run that ended on a turn agent-env gave
up waiting on, where it used to write a prompt_error row. A run whose end is one of
AGENT_FAILURE_ENDS failed a turn whatever its record lists, so it is judged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sarah-chitty-1 and others added 7 commits December 2, 2026 11:52
…ges is skipped, not 0

An infra-failed always_on run is left ungraded by its judges, but a verifier_ids aggregate over them
pooled no rows and scored 0, so PSI's psi_verdict and rubric_satisfaction still counted the failure
against the model. In a run of an always_on step, an aggregate whose every source was skipped is
skipped too, naming each source and its reason; one with some skipped pools the rest and lists the
others in skipped_sources. A run with no always_on step (prompt_agent) pools as on main.

Tests use the PSI task's own verifiers and aggregates (tst/data/psi_always_on_verifiers.json, its
criteria cut to placeholder rows).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… failed; one place for how a run ended

Review findings on #981:

- always_on_agent_verifier._judges_without_trajectory let a run that stored no
  trajectory at all be judged whenever any turn failed, or whenever the run
  ended on its agent's own failure. A run with turns that ran and lost their
  trajectories to a config or extension problem, plus one failed wake, was
  judged with every wake's tool calls missing instead of refused and redone.
  It is now judged so only when every turn, each wake's and each nudge's, is a
  recorded failed turn. A record from before failed_turns existed counts its
  ending turn as its one failed turn.
- ALWAYS_ON_KEY, AGENT_FAILURE_ENDS and ended_on_agent_failure move to a leaf
  module, always_on_ends, which the verifiers, aggregate_verifiers and
  rate_user_satisfaction import at module level. This replaces the lazy-import
  wrappers in agent_prompt_response_verifier and user_sim_judge,
  user_sim_judge's copy of the key, aggregate_verifiers' lazy import and
  rate_user_satisfaction's inline check.
- The staged index gave a failed wake turn two error lines (turn_end's "its
  turn ended failed" and turn_failed's). A wake with a turn_failed line now
  gets only that one. A run without one (by position, or recorded before
  turn_failed existed) keeps turn_end's.
- _stopped_turn's docstring no longer says any other failure ends the run.
- _cut_off uses the same error-message cap as a failed turn (TURN_ERROR_CHARS,
  was FAILED_TURN_ERROR_CHARS), not a literal 300.
- _failure is renamed _record_failed_turn.
- Golden cases: the always_on judge on runs that ended on agent_turn_timeout
  and agent_turn_failed, and user_sim_judge on one that ended on
  agent_turn_failed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…own default; test the retry end to end

- Task(implied_retries=False) and Task.retry_config_of: an episode's copy runs no step type's default retry, so
  episode/rules no longer refuses an always_on task for a retry_config its author never wrote. A retry the author
  wrote is still refused. The default stays on the step, where the hub worker reads it.
- _imply_retries works a default out again for each task built from the same step objects, instead of keeping the
  one an earlier task's graph gave.
- Scheduler tests: a failed run is redeployed and run again once, whatever failed it; a second failure fails the
  task; a task that takes no default fails without redeploying.
- Docs say a failed run is redone once, whatever failed it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-failed-wake

#933 moves implied retries off the step objects: Task(implied_retries=...) and
Task.retry_config_of(step), with an episode's copy taking no default retry.

AGENTS.md conflicted. The resolution keeps #981's account of an agent_error
turn (it ends only its wake, three in a row end the run, the whole run is
judged) and takes #933's sentence on the default retry, which redoes a failed
step once from its env deploy whatever failed it. It says "a failed step"
because under #981 an agent_error run no longer fails its step.

None of #981's code reads step.retry_config, so nothing else needed to move to
Task.retry_config_of.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…o step it was given

Building a second Task from the same step objects rewrote their default retry, so the first task's
retry_config_of read the second's policy. A Task now keeps each step's type default in its own dict, read by
retry_config_of; it never writes it onto the steps it is given. Task.from_dict, whose steps are its own, also
puts the default on them, for a runner that reads a step's retry_config (a hub worker reads them off Task.get).
The seed pass no longer copies it over.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-failed-wake

#933 now keeps each step's default retry in the Task's own dict, read through
Task.retry_config_of, and never writes it onto the steps it's given, except
that Task.from_dict puts it on the steps it builds, for the hub worker. The
merge was clean. None of #981's code reads step.retry_config.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eeded steps

A seed can fill placeholders in step ids, so the task's defaults, keyed by its unseeded ids, missed the
seeded steps, and their resume points named unseeded ids too. The scheduler now asks the run: the task's
own defaults, or, for a seeded run, those its seeded steps imply, kept per run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-after-failed-wake

#933 fixes seeded step names losing their default retries (task.py's
_own_retry, Task._run_implied_retries and the scheduler's lookup in
_drive_dag). The merge was clean. None of #981's code reads
step.retry_config.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sarah-chitty-1
sarah-chitty-1 added this pull request to stack #996 December 2, 2026 23:52
Base automatically changed from sarahchitty/always-on-infra-failures to main December 2, 2026 23:52
…-failed-wake

main now has #933 squashed (dbbc03f), plus #995 (prompt_agent's
context_window) and five other commits. This branch already merged #933's
final head, 26ae0f9, and main's #933 files match it. Five files conflicted,
because the squash re-applies #933's changes against the old base:
AGENTS.md, always_on.py, always_on_staging.py, test_always_on_graded.py and
test_always_on_wake_limit.py. Each was resolved by a three-way merge with
26ae0f9 as the base. That keeps this branch's #981 changes and adds only
what main changed since #933: #995's context_window lines in always_on.py.

Checked: the merged tree differs from main by exactly #981's own changes
(26ae0f9..e1747cd's work), and from this branch by exactly main's
non-#933 commits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sarah-chitty-1

Copy link
Copy Markdown
Collaborator Author

Re the Env Pod context review above (written against 1334eac): resolved by design, not by picking a side. The generic path keeps main's (#933's) behaviour: rubrics_verifier has no infra-error skip, and its new hooks (_not_graded_reason, _judges_failed_run, _judges_without_trajectory) all return main's answer by default, so a prompt_agent turn that failed for an infrastructure reason still scores 0 as a prompt_error, exactly as on main. Only always_on_agent_verifier overrides _not_graded_reason: an always_on run that ended on an infrastructure failure (ended_on_infra_failure, i.e. agent_turn_infra_error, which #933 now fails and retries) is left ungraded instead of scored against the agent. That's what test_always_on_failed_turns.py asserts. The branch has since merged main (#933 squashed, head 8f6cc28) and passes the unit suites.

🤖 Addressed by Claude Code

@sarah-chitty-1
sarah-chitty-1 merged commit dc0ae47 into main Dec 3, 2026
35 of 36 checks passed
@sarah-chitty-1
sarah-chitty-1 deleted the sarahchitty/always-on-carry-on-after-failed-wake branch December 3, 2026 00:10
sarah-chitty-1 added a commit that referenced this pull request Dec 3, 2026
…lter

Two conflicts, both in module docstrings, resolved to keep both sides:
- always_on_agent_verifier.py: #980's paragraph on the strict thinking
  rule (stages_thinking) stays, followed by #981's paragraph on wakes
  with no stored trajectory and _judges_without_trajectory.
- always_on_staging.py: the wake file list keeps #980's "thinking when
  ... the judge's trajectory filter asks for it (stages_thinking)" and
  adds #981's turn_failed line.

The code of both merged cleanly: #981's failed-turn judging, its
no-trajectory rule and turn_failed lines, beside #980's stages_thinking,
the settings warning and the files note.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sarah-chitty-1 added a commit that referenced this pull request Dec 3, 2026
…uard

Conflicts, each resolved so both sides survive:
- always_on_agent_verifier.py: the files note adds #981's _FAILURE_NOTE for a run with harness_failures and this
  branch's _GUARD_NOTE for one the context guard acted in.
- always_on_staging.py: _IDENTITY has both "guard" and #981's "failure" and "failed_turn_notice", with this branch's
  _IDENTIFYING_PARTS and _KEPT; a harness_note carries guard and failure; the record keeps context_guard_actions,
  results_shown_not_whole and harness_failures; index.md has the compaction (mid_wake, _index_facts), guard and
  failure lines; imports guard_words, is_infra_failure and shown_words.
- judge_utils/turn_events.py: TurnEvents and the span comment describe both failure and guard; the harness.guard,
  harness.error and harness.call.resent handling all stay; the guard helpers and #981's failure helpers both stay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sarah-chitty-1 added a commit that referenced this pull request Dec 3, 2026
… like guard and compaction

"failure" (#981) is an identity field, so fit moved none of its parts in its first pass: a failed wake whose failure
held a long part (what was running) moved the note's text to a file first, and the long part only went in the last
step. _IDENTIFYING_PARTS now names failure's kind as what says what the note is; fit moves its other parts like the
line's own fields, longest first, so the text the judge reads stays in the line. The comment saying failure "stays
inline" now says how it does.

Test: test_a_failure_note_keeps_its_kind_and_its_text_inline_while_a_long_part_of_its_failure_moves_aside (failed
before: the note's text had moved).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sarah-chitty-1 added a commit that referenced this pull request Dec 3, 2026
Conflicts, each resolved so #980's thinking filter, #981's failure notes and this branch's guard notes and line-limit
guarantee all survive:
- always_on_staging.py: the module docstring says a turn's thinking is staged only when the judge's filter asks for
  it (stages_thinking) and that a harness_note can carry failure or guard; the stager keeps #980's thinking,
  thinking_left_out and as_recorded beside guard_actions and shown; the record keeps thinking_left_out and
  thinking_unfiltered_wakes beside context_guard_actions and results_shown_not_whole.
- test_always_on_staging.py: imports both TrajectoryFilter (#980) and TurnEvents (this branch).
- tst/data/verifier_golden/judge_inputs.json: always_on_staged and always_on_atif_staged re-recorded on the merge.
  Against main they differ only by this branch's text: the prompt by 198 characters (the files note's preview and
  line_file sentence, "at most the first 300") and index.md by 163 (its header sentence).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

4 participants