GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Agent lifecycle hooks: mutability is too narrow to own the agent workflow, not just gate individual actions · coder/coder · Discussion #29034

Agent lifecycle hooks: mutability is too narrow to own the agent workflow, not just gate individual actions #29034

Christiantyemele started this conversation in Coder
Agent lifecycle hooks: mutability is too narrow to own the agent workflow, not just gate individual actions #29034
@Christiantyemele Christiantyemele
Sep 7, 2026 · 2 comments
Return to top
Discussion options
  • Uh oh!

    There was an error while loading. Please reload this page.

Christiantyemele
Sep 7, 2026

I've been building on the agent-lifecycle-hooks experiment and want to share feedback from real use, in the hope it shapes the contract. The good news: the hook model is the right shape for us. We run a fleet of "coder agents" that collaborate (a builder FORGE, a reviewer SENTINEL, etc.). Hooks give us a single place to enforce policy and audit every agent, and the fail-closed design is exactly what we want. That part is great.

My feedback is about what the consumer can and cannot do. Right now the contract is: only user_prompt_submit and pre_tool_use are mutable, and everything else (post_tool_use, pre_compact, post_compact, stop) is observe-only. For pure action gating that's fine. But it's not enough to own the workflow itself which is the bigger reason hooks are useful.

Concrete example for our usecase(openflows): FORGE finishes "planning", hands off to SENTINEL

We want the control plane to know "FORGE finished its plan, now SENTINEL reviews it." In an ideal hook design, the consumer could observe what actually happened (FORGE wrote PLAN.md, ended its turn) and deterministically advance the workflow. Instead, today:

  1. We must rely on the model remembering to run a state command (openflows-harness status set planning) to signal the transition. That's the most fragile link in the whole system: it depends on the model's memory, not on observed behaviour.

  2. We can't act on the phase boundary where it's actually observable. stop and post_tool_use are observe-only, so we can't record "the plan artifact now exists" or gate a premature "I'm done."

  3. There's no structured, consumer-readable lifecycle/workspace state. The consumer can't persist "planning is done" into a place the orchestrator trusts; we end up inventing our own side channel (Redis) and hoping the agent uses it.

So today the design is "enforce that the agent must remember the ceremony," rather than "derive the transition from behaviour the hooks already see."

What I'd like to see which would help alot

  1. Make stop mutable (or at least advisory). We want to refuse a premature "I'm done" our FORGE must not claim done without a PR/artifact. A gateable stop would let the consumer reject that.

  2. Make the phase boundary observable and actionable. Allow the consumer to derive and persist state from post_tool_use (e.g. "a Write/Edit produced PLAN.md") and feed it back, rather than requiring the model to report it.

  3. Expose a small structured, consumer-writable lifecycle/workspace state in meta or a companion API. A key/value the consumer can set and the orchestrator can read would replace the "tell the model to notify us" pattern entirely.

Why it matters

In short: the current contract is great at saying no to a bad tool call, but it can't yet drive a workflow forward from observed behaviour. If you widen what a consumer can see and act on for stop and the tool-result events, plus a small consumer-writable state hooks stop being a guardrail and become a real orchestration primitive. That's what makes them compelling for multi-agent setups.

Thanks for building this. Happy to provide more detail or test with you.

You must be logged in to vote
All reactions
  • 👍 12
  • 🚀 6

Replies: 2 comments

Comment options
  • Uh oh!

    There was an error while loading. Please reload this page.

bpmct
Sep 13, 2026
Maintainer

Thanks for sharing, this is useful feedback as we take hooks out of our experimental state. I'm forwarding this feedback to the Coder Agents team :D

You must be logged in to vote
All reactions
0 replies
Comment options
  • Uh oh!

    There was an error while loading. Please reload this page.

Christiantyemele
Oct 9, 2026
Author

We will appreciate if we can have this as priority

Make stop mutable (or at least advisory). We want to refuse a premature "I'm done" our FORGE must not claim done without a PR/artifact. A gateable stop would let the consumer reject that.

You must be logged in to vote
All reactions
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
📒
Coder
Labels
None yet
2 participants
@Christiantyemele @bpmct
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.