Repository navigation
Description
Parent: #1929 (Approach C — prompt hooks with declared effects).
Scope
Add the first safe prompt-action slice to the existing on: script exec hook list. A hook may be either the already-supported deterministic script action or a prompt action with declared effect: advise (default advise). Resolve through the configured internal/model.Provider layer (provider-keyed configuration/profiles are already on main); keep the current no-provider behavior deterministic: emit a warning/advice-unavailable hook frame and continue the script unchanged.
Prompt context/template values follow docs/decisions/0001-hook-vocabulary.md: user placeholders and built-ins such as @result, @error, @diagnostic, @calls, @artifacts, and @source are JSON-encoded/delimited as data, never raw text substitution. Keep the hook frame before the final result/error frame, report action/effect/model/duration, and attach advice without changing the run outcome. Preserve existing deterministic hooks and config-before-per-call declaration order.
Acceptance
- Prompt and script actions share the current script-hook list; invalid/unsupported action/effect combinations fail validation rather than silently doing nothing.
adviseprompt output is surfaced in the hook frame and does not transform the result or error.- Configured model and per-hook model selection use the provider layer; unavailable/provider-error paths warn and continue the deterministic run.
- Regression tests cover success/error phases, built-in and user placeholder data delimiting, advice frame placement, provider unavailable/error fallback, and unchanged script hooks.
- Targeted Go tests pass; CI review confirms the change against current main.
Explicitly deferred
Effects ask, propose, apply, and run (including elicitation, replacing outcomes, or executing generated code); prompt actions on non-script hook points; any opencode plugin-provider backend work. Those remain with #1929 / their owning work.
Design references
pkgs/mcpx/docs/decisions/0001-hook-vocabulary.md (accepted action/phase/template/frame contract) and 0002-autonomy-dial.md (accepted effect/autonomy vocabulary and ceilings). The provider layer and provider profiles are merged in #2592/#4836; sampling.answerLocally is merged in #4947. The deterministic hook foundation is PR #2616.
Activity
dezren39 commentedon Nov 4, 2026
agent-note:v1
task: 9174
queue: repo-health-code-pilot
worker: repo-worker-code
lane: openchamber-scheduled-lane
lane_id: c29174f1-48e0-4b13-b4ff-9b73ab67e9ab
event: handed_off
at: 2026-11-04T04:13:30Z
Prompt-hook implementation handoff from triage task 8728 / parent #1929. Task 9174 is queued for the first bounded slice: prompt action on the script hook list with
effect: advise, configured-provider integration, data-safe placeholders, hook frame integration, and deterministic fallback when provider is unavailable. Effectsask,propose,apply, andrunplus non-script points remain deferred on #1929.Parent: #1929 · design contracts:
pkgs/mcpx/docs/decisions/0001-hook-vocabulary.mdand0002-autonomy-dial.md.dezren39 commentedon Nov 4, 2026
agent-note:v1
task: 9174
kind: small_fix
state: picked_up -> handed_off (execution lane: opencode)
lane: code-h (claiming), execution via opencode claimant
next: opencode-claimant launches the bound session for task 9174; it drives the task to its terminal state under this queue's worker id.
evidence: issue #5276 OPEN at handoff, no held/user-owned/do-not-* labels; labels set to queue/claimed + work/assigned + status/in-progress.
35 remaining items
dezren39 commentedon Nov 5, 2026
agent-note:v1
state: parked
task: 9174 (repo-health-code-pilot)
worker: repo-worker-code
lane_id: code-a
execution_lane: opencode
session_id: ses_e5e56398e3dffeg3FZ9gPF2KoK
issue: #5276
at: 2026-11-05T03:46:42Z
Task 9174 is parked before implementation because the required laptop execution path is unavailable: the laptop-agent client/token path is missing here, and the preserved SSH fallback requires an HTTPS_PROXY runtime environment that is not present. No code or worktree was changed. Resume when laptop access is restored; then create/resume the dedicated task worktree, implement, run targeted tests on the laptop, and open a PR.
dezren39 commentedon Nov 5, 2026
🤖 Agent note · handed off
opencodedezren39 commentedon Nov 5, 2026
Bound and launched OpenCode session
ses_e5e5610f85cffekhsW7JTdi848for queue task 9174 (issue #5276). The task was already claimed and handed off byrepo-worker-code.dezren39 commentedon Nov 5, 2026
🤖 Agent note · picked up
repo-worker-code)ses_e5e5610f85cffekhsW7JTdi848; task 9174gh pr list --search 5276returned no open PR.dezren39 commentedon Nov 5, 2026
🤖 Agent note · blocked
repo-worker-code)ses_e5e5610f85cffekhsW7JTdi848; task 9174/home/user/hatch/tools/laptop-agent.py, butHTTPS_PROXYis unset and the preserved SSH helper exits because its runtime proxy environment is missing. No branch or worktree was created.repo-queuebinary rejected the required--executionflag; the block action ran without session attribution and recorded placeholder blocker text. The actual access blocker is documented above; queue bookkeeping needs repair once a compatible CLI or worker lease is available.