Repository navigation
fix: run a task tool once when its activeForm write is refused - #469
Merged
Merged
Conversation
Docked with Todo on, ctui runs TaskCreate and TaskUpdate itself, then keeps the task's activeForm in $.state. A refused write failed the hook with no next result to stand on, so core ran the tool again and one TaskCreate made two tasks. Both hooks now discard that failure; the row shows the subject until the next TaskUpdate. Refs: #449, #452
This was referenced Oct 24, 2026
Merged
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.
What changed
Docked with the
todosection on, a refusedactiveFormwrite no longer makes core runTaskCreateorTaskUpdatea second time.Refs: #449, #452
Summary
This is rule 3 of the refused-call policy (#460,
docs/adr/0004-guard-every-engine-call.md). If the write is refused, the row shows the task'ssubjectuntil the nextTaskUpdate.Evidence
Two new tests in the docked task scenario (
tests/todo-sidebar.test.tsx). The test's ownstate.sethook answers{ deny }for theactiveFormskey and passes every other key on.ctui's tool.call hook was skipped: ctui: $.state.set: refused by acme. OneTaskCreateansweredTask #2 created successfully: alpha, so core had run it again. TheTaskUpdateanswer carried core'stexttoo.After: both pass. Each answers
{ result }alone,callerslists onlyctui(core did not run the tool again), and the list still reloads ( alpha,alpha).node scripts/check.tsexits 0.Merge Danger
Door: two-way
Blast Radius: none
It only changes the path where the write is refused. Every other path, including the inline Sidebar, a subagent's call, Todo off and a deny from ctui's own call, is unchanged and held by the existing tests.
Reports
Live checks
N/A
Evals
N/A