oficina / equipo Public

headless: 4b_witness asks only a Claude step's kept session

The first live run placed this run's Engineering and Review on Codex
(codex-1, codex-2), and the ask was refused 409 not_askable. That is
the runner's design: a Codex step keeps no session (codexstep.go, "kept
sessions are Claude's for now"), so its steps are never askable.

Without EQUIPO_STAGING_ASK_TASK, 4b_witness now reads the newest
finished Engineering and Review steps of 3_engineering's task: on Codex
it skips and names the connection; on Claude a step that kept no
session fails, and otherwise both are asked as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by paul@keymail.dev 6b4892adb57df43ece432d8f61c63869282cb017 parent a7d091b
1 file changed, +20 −0
  • internal/headless/ask_test.go +20 −0
diff --git a/internal/headless/ask_test.go b/internal/headless/ask_test.go
index 0c1227a1..4829c8a0 100644
--- a/internal/headless/ask_test.go
+++ b/internal/headless/ask_test.go
@@ -190,6 +190,26 @@ func scenarioAskWitness(t *testing.T, env *Env) {
if err != nil {
t.Fatal(err)
}
+ if os.Getenv("EQUIPO_STAGING_ASK_TASK") == "" {
+ // Only a Claude step keeps its session (a Codex step keeps none,
+ // by design), and where this run's steps ran is the runner's call.
+ // The newest finished step of each is the one a question goes to.
+ newest := map[string]wire.Step{}
+ for _, st := range k.Steps {
+ if st.State == wire.StepDone && (st.Specialist == wire.SpecialistEngineering || st.Specialist == wire.SpecialistReview) {
+ newest[st.Specialist] = st
+ }
+ }
+ for _, name := range []string{wire.SpecialistEngineering, wire.SpecialistReview} {
+ st := newest[name]
+ if st.Family != "claude" {
+ t.Skipf("live: this run's %s ran on %s (%s), which keeps no session to ask", st.Specialist, st.Account, st.Family)
+ }
+ if !st.Askable {
+ t.Fatalf("a finished Claude step kept no session: %+v", st)
+ }
+ }
+ }
before := k.CandidateSHA
out := map[string]any{"task": id}
for _, q := range []struct{ name, text, specialist string }{