Repository navigation
Description
Narrowed after review. I originally proposed three hooks here. agents#2005 implements two of them (
CODE_JIRA_STARTED_TRANSITION,CODE_JIRA_PR_READY_TRANSITION) through derived-harnessenv.runner, so this issue now covers only what that PR leaves open. Two mechanisms for the same transition is worse than one.
What is already covered
| Hook | Implemented by |
|---|---|
| transition when a code run starts, before sandbox creation | agents#2005 CODE_JIRA_STARTED_TRANSITION |
| transition once the PR/MR is open and non-draft | agents#2005 CODE_JIRA_PR_READY_TRANSITION |
| close transitions from triage | shipped, JIRA_*_TRANSITION triage overlay |
agents#2005 states its own boundary: "Later draft-to-ready events and merged-PR transitions remain out of scope."
What is still missing
1. Merged → done
No agent runs when a PR merges, so no harness hook can cover it — the post-code script has finished long before. A Jira-sourced issue therefore stays in whatever status the code run left it, after the work is merged and deployed.
Concretely: on a demo project, TSTAPP-1 went New → In Progress at hand and → Closed (resolution Done) at hand, immediately after the PR merged. That is a two-click manual step every Jira user performs, on the artifact most of them opened Jira to watch.
The only events available are code-host ones, so this needs a managed workflow on pull_request_target (base-branch copy, as the shim does), converged by repos install like jira-poll-per-repo.yaml.
2. Gating a transition by issue type
A team rolling this out generally wants to start with one type and widen as trust grows — Bug first, then Story, then everything. Today the only lever is turning a transition on for the whole project.
This does not belong in agents#2005's scripts. The predicate is the same for every caller, and putting it in post-code.sh and pre-code-jira.sh means triage's close path and the merge hook each reimplement it. It belongs at the transition layer, so every existing and future caller inherits it:
fullsend issues transition --tracker jira --transition "In Progress" --if-issue-type Bug,StorySemantics: match issuetype.name or id; omitted means no filtering (today's behaviour, byte-for-byte). The type is already available from the issue read the transition path performs.
This is independent of the merge hook, needs no ADR, and could land as its own small PR that agents#2005 and the triage overlay adopt by passing a flag.
Proposed shape for the merge hook
Deliberately minimal, since the agent-stage hooks now live in the harness:
tracker:
jira:
status_sync:
pull_request:
on_merged:
status: "Closed" # or transition: "Done"
resolution: "Done" # required when the target needs one
issue_types: [Bug, Story]
branch_prefixes: [agent/] # optional narrowing; omit = any PR with a resolvable key- Names are config because they vary per project (
Closedhere,DoneorResolvedelsewhere).transitionandstatusare alternatives;fullsend issues transitionalready resolves a target status to its unique transition and rejects ambiguity. - Idempotent: read current status, skip when already there.
- Fail-soft, like
run_label— warn, never block the merge. - Opt-in: presence of
status_syncinstalls the workflow; absent changes nothing. - Bot-loop safe: writes by the poller/service account are classified as bot actions and do not re-dispatch agents.
Open questions
- Mechanism consistency. agents#2005 uses derived-harness
env.runner. A merge hook has no harness run, so it must be workflow + config. Is that split acceptable, or would maintainers prefer the merge setting to look like the others (astatus_sync-style block thatrepos installrenders into the managed workflow)? - ADR? This adds one managed workflow and a tracker write path outside any agent run. Verify Jira work items through the built-in PR lifecycle #8921's contract says PR stages "make no Jira API calls" — this deliberately amends that for one event.
- Fail-soft vs hard error.
run_label's precedent is warn-and-continue. For an explicitly configured close-on-merge, a silent warning may hide a broken board. Which posture? - Should the type predicate be
--if-issue-type, or folded into a broader predicate mechanism?
Acceptance criteria
- With
on_mergedconfigured, a merged PR closes its issue with the configured resolution; without the block, no workflow is installed and nothing changes. --if-issue-type Bugtransitions a Bug and no-ops on a Story, with the skip logged and a non-zero-free exit.- Re-running either path logs a skip, not an error.
- A failing transition warns; the merge itself is never blocked.
- Unknown keys fail at
repos install, not at runtime. - Tests: resolver (ambiguity, type filter, idempotency), config validation, install convergence, one behaviour test per path.
- Docs:
config-reference.md, plus the Jira guide's "what appears in Jira" table gaining the merge row.
Accepted risk
An agent PR can close its own issue with no human step. That is the point for projects that opt in, and should be stated in the docs. Dispatch authorization is unchanged.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
fullsend-ai-triage commentedon Nov 15, 2026
🤖 Finished Triage · ✅ Success · Started 8:20 PM UTC · Completed 8:22 PM UTC
Commit:
18b9476· View workflow run →Runtime: claude · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.14
fullsend-ai-triage commentedon Nov 15, 2026
This proposal is detailed enough to act on. The prerequisites it cites (#6704, #8920, #8921) are all closed, and no open PR or sub-issue currently addresses it. Open issue #9453 (ADR on Jira feature parity) is related context; the ADR this work needs should be coordinated with it.
Design points for maintainers (not blockers):
run_labelprecedent. Implementation can proceed on that default unless maintainers decide otherwise.status_synckey name and the plainissue_typeslist are open questions for maintainers; neither changes the overall implementation shape.Workflow-file warning: The PR hooks need a new managed reusable workflow on
pull_request_target, plus install convergence, modeled on the existing Jira poll per-repo template. The code agent cannot modify workflow files under current permissions, so that portion needs a human PR or maintainer action. The resolver, config validation, run-start hooks, docs, and ADR can be done separately and could land first.Proposed test case:
Next steps:
/fs-code— agent creates a PR to implement this issue/fs-code <your instruction>— agent implements with your specific guidanceifireball commentedon Nov 15, 2026
I do not thing the proposed configuration shape aligns well with how thigns are done in fullsend, first it assumes a very particular set of agents, and second it tightly couples things like issues state and Jira connectivity.
A more fullsend-native way to do this is to have an option in the agents themselves to move the issue state, jut like the same agents can set labels.
waynesun09 commentedon Nov 15, 2026
The need is real, and I think most of it fits the pattern the agents already use, which also answers the concern about the config shape above. Only the move on merge needs something new.
What already works this way
Triage's close cases follow "agent outputs an action, the post-script makes the Jira transition, the name comes from config":
JIRA_DUPLICATE_TRANSITION,JIRA_NOT_PLANNED_TRANSITIONandJIRA_SPLIT_TRANSITIONinharness/triage.yamlin the agents repo.Suggested split
fullsend issues transition. No agent decision is needed. It has to be in the code pre-script too, because a Jira issue can go straight to code without triageWith this, the mapping holds names only. It does not need to be keyed on a fixed set of stages or to add a second write path beside the agents.
Two details for the pre-script move:
The move on merge is a wider gap
Closing the Jira issue on merge needs an action that runs when a PR merges and looks outward to related work items. The code agent's run ended when the PR opened, and retro, which does trigger on a merged PR, looks back at the run and is not Jira-aware.
Several open issues appear to need the same hook: #9454 and fullsend-ai/agents#2009 (re-triage what the merge unblocked), #5924 (close linked issues for a non-default target branch), #9458 (fix agent PRs that now conflict), fullsend-ai/agents#586 (superseded PRs and issues). I would design that once, as a post-merge step these can all use, and make "close the Jira issue" one consumer of it, instead of a Jira-only
pull_request_targetworkflow.Proposal
Narrow this issue to the mapping plus the pre-script and post-script moves, and track the merge move with the post-merge design. That first part needs no new workflow file, so the code agent can do it.
jwm4 commentedon Nov 15, 2026
Related work: agents#2005 (from @ederign , open, waiting on review) is the code agent side of #6704. It adds two optional code agent settings,
CODE_JIRA_STARTED_TRANSITIONandCODE_JIRA_PR_READY_TRANSITION. Each names a Jira transition to run throughfullsend issues transition, and both are off by default. That is the approach ifireball describes above: an option in the agent itself.How it lines up with the proposal here:
code.on_start, andpull_request.on_openedfor PRs the code agent opens.pull_request.on_merged(the PR description lists merged-PR transitions as out of scope),triage.on_start, and theissue_typesfilter.So this issue reads to me as a follow-up to agents#2005 for those three pieces.
Posted by Bill Murdock with assistance from Claude Code.
waynesun09 commentedon Nov 15, 2026
Update after reading the retro and triage definitions in the agents repo. This replaces the "move on merge" part of my comment above and makes the whole request fit existing mechanisms.
Proposed shape
post-mergefleet agent, triggered onevent.entity.kind == "change_proposal" && event.transition.kind == "merged"Why a
post-mergeagent and not retro/fs-retro, and a repo can turn it off. Closing a ticket should not depend on it.post-mergeruns beside retro without changing it.Why it reuses the triage role
fixshares thecoderrole withcode, and custom agents run on the built-in roles. No new App to install.What else it can serve
The same agent gives a home to other post-merge requests: re-triage what a merge unblocked (#9454, fullsend-ai/agents#2009), close linked issues for a non-default target branch (#5924), and superseded PRs or issues (fullsend-ai/agents#586).
One thing maintainers need to decide
reusable-dispatch.ymlpasses the Jira credentials only to runs whose event source isjira. A merge event comes from the code host, so thepost-mergerun has no Jira token today. It needs the token on the runner side only, for the post-script, never in the sandbox. That is a small workflow change, but it widens where the token goes, so it should be an explicit decision.ADR
I don't think this needs one. The mapping and the pre- and post-script moves follow the pattern triage already uses, and
post-mergeis a new fleet agent on an existing role. The credential gate above is the only part that changes a boundary, and it can be decided on its own PR.[-]Configurable Jira status sync: move the work item as the pipeline runs and merges[/-][+]Jira status: close on merge, and gate transitions by issue type[/+]fullsend-ai-triage commentedon Nov 16, 2026
🤖 Finished Triage · ✅ Success · Started 11:03 AM UTC · Completed 11:05 AM UTC
Commit:
4dee2f2· View workflow run →Runtime: claude · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.20
fullsend-ai-triage commentedon Nov 16, 2026
This issue bundles two concerns that do not depend on each other, so it is being split. (1) An issue-type predicate on
fullsend issues transition, a small, well-specified change at the transition layer that every caller can inherit. (2) The close-on-merge Jira hook, where discussion since the first triage has shown the mechanism is still undecided: a Jira-specific managed workflow, an agent-level option, or a new post-merge fleet agent that other open requests could share. It also needs decisions on passing Jira credentials to code-host-sourced runs, on fail-soft versus hard-error behaviour, and on whether an ADR is required. An earlier triage note recommended the managed workflow plus ADR as the shape; that is superseded and should be settled in the merge-hook issue. Splitting lets the predicate move ahead while the merge design is worked out. Start/PR-ready transitions remain covered by the open agents#2005, which is related context for both. The new issues will be triaged on their own.Split into:
shairevivo commentedon Nov 17, 2026
Revised after #9536. That issue changes the premise of this proposal, so the config surface gets smaller — and the decision now belongs in an ADR with #9536 as its dependency.
What changes. The status mapping was going to carry names (
Closed,In Progress) because they vary per project. #9536 shows they're derivable: Jira returns every available transition with its target status and that status's category —new,indeterminate,done— and the categories are identical across projects.--state closedalready does this; #9536 adds--state started, prefers Jira's default names when several statuses fit, and returns a skip listing candidates when none resolves.Configuration then keeps only what Jira can't infer:
resolutionstill appears for AISDLC/TSTAPP: their Closed move accepts eleven resolutions and names no default, so the site-default rule in #9536 can't infer one.Dependency. The ADR declares #9536 as a hard dependency. Until #9536 lands, only
--state closedexists and thestartedhalf is unavailable, so the ADR should merge after, or together with, that implementation.Merge mechanism. The question stands, but it's narrower than it looked. With names out of config, the main job of a managed workflow — carrying per-project names — goes away. @ifireball's objection (it assumes a particular agent set and couples issue state to Jira connectivity) and @waynesun09's
post-mergeagent point the same direction. I'd take the post-merge agent:event.transition.kind == "merged"is already in the normalized-event schema, so no new event plumbing is needed.I have the ADR drafted and will open it as a PR alongside #9536, once the numbering settles — 0163, 0164 and 0171 are currently claimed by open ADR pull requests.