You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
goal mode: keep a long-running session working until the goal's exit criteria hold (like Codex /goal) #99
Codex has /goal: the agent gets a goal and keeps working until it is reached, often for days, spinning off its own subagents (Gergely Orosz, "Inside OpenAI's agentic software factory", 2026-09-15). ytstack has the pieces of this but not the clamp:
ytstack:coordinate is the long-running session that owns a plan and dispatches lanes.
autonomy: loop chains plan-task, TDD, verification and summarize inside a slice.
Every milestone has exit criteria in M###-CONTEXT.md.
What is missing: nothing keeps the session going. A turn ends whenever the model thinks it is done. No check asks whether the goal's exit criteria hold, and if not, whether there is a real blocker or an open question for the person. In the meinKontext coordinator run, lanes sat idle overnight with nobody holding them (#84).
Proposal
ytstack-goal set <milestone>|"<sentence>" [--until <ISO UTC>|--rounds N] writes the goal as a session marker, out of tree like the coordinate marker. A milestone goal takes that milestone's exit criteria. A sentence goal needs at least one checkable criterion, given as a command with exit 0 or a file that must exist. ytstack-goal status and ytstack-goal clear complete the command.
The Stop hook blocks the stop while a goal is open, with the unmet criteria listed. It lets the stop through when:
a question to the person is open and asked (ytstack-questions);
a blocker is recorded;
work in the background is pending (running lanes, a watched PR);
the bound (--until or --rounds) is reached; the hook then says so once.
stop_hook_active is respected, and a goal never blocks twice in a row without a tool call in between, so it cannot loop.
coordinate sets the plan's current milestone as the goal at its start, unless one is set. The checklist says to clear it when the milestone closes.
Codex: where the host has its own /goal, the skill text says to use it and ytstack does not register the hook.
Related: #79 (once the lane state lives on the host and with the session rather than in repo files, the long-running session needs this clamp), #83 (rotation), #84 (liveness).
Activity
fix: coordinate names no host in its goal-mode instructions (#99)
docs: research note on the full OpenAI software factory article (#100)
feat: the host is the ledger of a lane, goal mode (#79, #99) (#102)