Let Send through when an agent asks a question mid-build while still marked working: once an open question has an answer or note staged the web console unlocks Send at once instead of waiting out quietMinutes, and building.md now says a question stops the build (set waiting in the same post and wait)

This commit is contained in:
jparkerweb committed 2026-10-04 14:12:52 -07:00
1 parent d4234fe20a
commit 13ded0910b
29 files changed
+309 -28

No files matched your search

+9 -2
View File
@@ -135,8 +135,15 @@ not questions. Put them in the phase doc as they happen, and in the report.
### When the workflow asks something
Publish it, set `"agent": { "status": "waiting", "quietMinutes": null }`, and
go into the wait loop. When the answer lands, set `working` again and carry on.
Publish it, set `"agent": { "status": "waiting", "quietMinutes": null }` in
the SAME post, and go into the wait loop. When the answer lands, set `working`
again and carry on.
A question stops the build. Never leave yourself `working` with a question
open, and never "carry on while you decide": the page reads `working` as "not
your turn", and the person is left looking at a question they cannot answer.
If there is other work the answer does not touch, finish it before you ask,
then ask and wait.
| Moment | `kind` | Notes |
| --- | --- | --- |
+13
View File
@@ -5658,6 +5658,19 @@ function sendState() {
: { disabled: true, why: "Your last answers are on their way. One moment.", short: "" };
}
if (agentWorking()) {
// A question the agent left open while still working is still a question,
// and its answer has nowhere better to wait than the server, which holds
// a send until the agent next looks. The contract says to switch to
// "waiting" before asking, but an agent that asks and carries on ("while
// you decide") must not lock the person out of answering for up to an
// hour of quietMinutes.
if (myTurn().length && (stagedCount() || pendingNotes().length)) {
return {
disabled: false,
why: "Plan2Code is still working. Your answers wait for it to look.",
short: "Still working · it reads this next",
};
}
const ms = workingMs();
if (ms > patience(WORKING_GRACE_MS)) {
// A stuck agent must not lock someone out of their own session, so the