Repository navigation
Make the finish_session mandate the last thing a non-interactive agent reads - #211
Merged
Merged
Conversation
…an agent reads Non-interactive agents were skipping the call that ends their session. The mandate was there, but as a subsection buried inside <critical-rules> at the very top of a context that then runs for thousands of tokens — and the sections that DID render last were the reference listings of shell tools and MCP servers. It now has its own builder and its own section, and the section carries a new :footer position that sorts below even the bottom-of-context listings, so it is the last thing in the prompt. The wording states the cost rather than only the instruction: the container keeps burning budget until the sweeper reaps it, the workflow step waiting on the session stalls for that whole time, and the work is recorded as a stale failure. The block at the top is now a short pointer to it. The renderer's sort was not stable, so two sections with the same (position, priority) rendered in an arbitrary order — which is precisely the property this change depends on. It now breaks ties by builder order. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Signed-off-by: Artem Petrov <[email protected]>
aixle-com Bot
pushed a commit
that referenced
this pull request
Nov 8, 2026
…nd their kept state (task #211) Signed-off-by: Aixle Flow <[email protected]>
This was referenced Nov 8, 2026
aixle-com Bot
pushed a commit
that referenced
this pull request
Nov 8, 2026
…nd the session's locks, heal counters under the lock, a real-shell snapshot test (task #211, CR round 1) - Sessions::AuthPause#pause! and #unpause! lock the workflow run, then the session, and change the marker and the run's state in one transaction. A delivery can no longer land between the marker and the run's pause, and two sessions of one run unpaused at once resume it. - #resume! returns the unpause's result and logs only what happened. The resume prompt is still typed before the compare-and-set. - #heal! counts its attempt under the session's row lock, re-reading the counter and, from the pass, heal_due? there. - A test runs Snapshot::Command#argv through /bin/sh with stub tmux and stat. Signed-off-by: Aixle Flow <[email protected]>
aixle-com Bot
pushed a commit
that referenced
this pull request
Nov 8, 2026
…es (task #211, CR round 1) Checks::NoOutput#message redacts the whole screen with Sessions::SecretRedactor.for_session before AuthErrorDetector reads it, as LiveLogReader#tail did. Checks::Base#fail_session redacts the final message too, which also covers the quota, blocking-prompt and turn-end messages. Signed-off-by: Aixle Flow <[email protected]>
aixle-com Bot
pushed a commit
that referenced
this pull request
Nov 9, 2026
… and turn-end confirmation, a threaded unpause test (task #211, CR round 2) - Sessions::AuthPause#pause! redacts the banner before storing auth_pause_reason. - #expire! and #unpause_quietly take the auth_paused_at the pass observed and act only if the locked row still holds it; #expire! computes the expiry from the locked row. - Checks::TurnEnd#give_up requires turn_end_screen and turn_end_seen_at to match the confirmation it acts on, under the lock. - The two-sessions-of-one-run unpause test moves to auth_pause_concurrency_test.rb, on two threads with their own connections. Signed-off-by: Aixle Flow <[email protected]>
aixle-com Bot
pushed a commit
that referenced
this pull request
Nov 9, 2026
…he concurrency test's sessions have a prompt (task #211, CR round 2) Signed-off-by: Aixle Flow <[email protected]>
This was referenced Nov 9, 2026
NOX73
added a commit
that referenced
this pull request
Nov 9, 2026
…ks for the quota scan's checks (task #211, step 1) (#671) * feat(sessions): one snapshot per session per pass, and Sessions::Checks for the quota scan's checks (task #211, step 1) Signed-off-by: Aixle Flow <[email protected]> * docs(sessions): the session monitor, its parts registry, the checks and their kept state (task #211) Signed-off-by: Aixle Flow <[email protected]> * fix(sessions): pause and unpause in one transaction under the run's and the session's locks, heal counters under the lock, a real-shell snapshot test (task #211, CR round 1) - Sessions::AuthPause#pause! and #unpause! lock the workflow run, then the session, and change the marker and the run's state in one transaction. A delivery can no longer land between the marker and the run's pause, and two sessions of one run unpaused at once resume it. - #resume! returns the unpause's result and logs only what happened. The resume prompt is still typed before the compare-and-set. - #heal! counts its attempt under the session's row lock, re-reading the counter and, from the pass, heal_due? there. - A test runs Snapshot::Command#argv through /bin/sh with stub tmux and stat. Signed-off-by: Aixle Flow <[email protected]> * fix(sessions): redact the auth banner, act only on the observed pause and turn-end confirmation, a threaded unpause test (task #211, CR round 2) - Sessions::AuthPause#pause! redacts the banner before storing auth_pause_reason. - #expire! and #unpause_quietly take the auth_paused_at the pass observed and act only if the locked row still holds it; #expire! computes the expiry from the locked row. - Checks::TurnEnd#give_up requires turn_end_screen and turn_end_seen_at to match the confirmation it acts on, under the lock. - The two-sessions-of-one-run unpause test moves to auth_pause_concurrency_test.rb, on two threads with their own connections. Signed-off-by: Aixle Flow <[email protected]> * test(sessions): the redaction case attaches its secret to the step, the concurrency test's sessions have a prompt (task #211, CR round 2) Signed-off-by: Aixle Flow <[email protected]> --------- Signed-off-by: Aixle Flow <[email protected]> Co-authored-by: Aixle Flow <[email protected]>
aixle-com Bot
pushed a commit
that referenced
this pull request
Nov 10, 2026
Conflicts resolved: - Files touched on staging only by the pre-squash branches of task #209 (PR #669) and task #211 (PRs #667/#668) take develop's version, which carries the reviewed, merged form of the same work (#670, #671, #672). - test/integration/web/company/billing_test.rb: keeps the billing redesign's (#646) test body with develop's 14-day trial values (#678). - CHANGELOG.md: develop's 1.11.0 entry for the 14-day trial; the billing redesign entry already present above is kept once. Signed-off-by: Alex <[email protected]>
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.
Non-interactive agents keep skipping the call that ends their session.
The mandate was already in the context — as a subsection buried inside
<critical-rules>at the very top, ahead of thousands of tokens of workspace, board, tool and skill context. What actually rendered last were the reference listings: shell tools and MCP servers.What changed
ContextBuilders::SessionCompletion(non-interactive only) owns the mandate as its own<session-completion>section.:footerposition onContextSection, sorting below even the bottom-of-context listings — so the mandate is the last thing in the prompt.fail_session.sort_byis not, so two sections with the same(position, priority)rendered in an arbitrary order — exactly the property this change depends on. Ties now break by builder order.OutputRuleskeeps its one-line reminder: three mentions of the same rule is deliberate here, not drift.Checks
docker compose exec -T web make check_all— green.🤖 Generated with Claude Code