agent-sessions not available if Gitlab Duo "Off by default" on instance, but "On" on project or group

Summary

On Gitlab EE On prem with Omnibus:

If Gitlab Duo Core is configured as "Off By Default", the Agent session menu will give a 404 even if Gitlab Duo Core is enabled on the Group or on the Project

It works if Gitlab Duo Core is "On By Default" on the instance

Steps to reproduce

  1. Go to Admin > Gitlab Duo > Change Configuration
  2. Put "GitLab Duo availability" to "Off by default"
  3. Check "Gitlab Duo Core" "Turn on Web and IDE features"
  4. Check "Feature preview" "Turn on experiment and beta GitLab Duo features"
  5. Check "Flow execution" "Allow flow execution"
  6. Check "Prompt Cache" "Turn on prompt caching"
  7. Go to the project you want to enable Gitlab Duo Core > Settings / General / Gitlab Duo
  8. Enable Gitlab Duo
  9. Enable Allow Flow Execution

"Automate / Agent session" menu will be available, but will show a 404.

What is the current bug behavior?

  • "Automate / Agent session" shows a 404 Page not found.
  • Issues shows the "Generate MR with Duo" button
  • By clicking on this button, it will create an empty Merge request

What is the expected correct behavior?

It should show the agent sessions list

Relevant logs and/or screenshots

Capture_d_écran_du_2025-10-06_13-30-20

Capture_d_écran_du_2025-10-06_13-30-26

Capture_d_écran_du_2025-10-06_13-30-34

Capture_d_écran_du_2025-10-06_13-30-39

Capture_d_écran_du_2025-10-06_13-30-46

image

Output of checks

Results of GitLab environment info

Expand for output related to GitLab environment info

System information
System:		Ubuntu 24.04
Proxy:		no
Current User:	git
Using RVM:	no
Ruby Version:	3.2.8
Gem Version:	3.7.1
Bundler Version:2.7.1
Rake Version:	13.0.6
Redis Version:	7.2.10
Sidekiq Version:7.3.9
Go Version:	unknown

GitLab information
Version:	18.4.1-ee
Revision:	270836848e7
Directory:	/opt/gitlab/embedded/service/gitlab-rails
DB Adapter:	PostgreSQL
DB Version:	16.10
URL:		https://[MASKED]
HTTP Clone URL:	https://[MASKED]/some-group/some-project.git
SSH Clone URL:	git@[MASKED]:some-group/some-project.git
Elasticsearch:	no
Geo:		no
Using LDAP:	no
Using Omniauth:	yes
Omniauth Providers: saml

GitLab Shell
Version:	14.45.2
Repository storages:
- default: 	unix:/var/opt/gitlab/gitaly/gitaly.socket
GitLab Shell path:		/opt/gitlab/embedded/service/gitlab-shell

Gitaly
- default Address: 	unix:/var/opt/gitlab/gitaly/gitaly.socket
- default Version: 	18.4.1
- default Git Version: 	2.50.1


Results of GitLab application Check

Expand for output related to the GitLab application check
Internal API available: OK
Redis available via internal API: OK
gitlab-shell self-check successful

Checking GitLab Shell ... Finished

Checking Gitaly ...

Gitaly: ... default ... OK

Checking Gitaly ... Finished

Checking Sidekiq ...

Sidekiq: ... Running? ... yes Number of Sidekiq processes (cluster/worker) ... 1/1

Checking Sidekiq ... Finished

Checking Incoming Email ...

Incoming Email: ... Reply by email is disabled in config/gitlab.yml

Checking Incoming Email ... Finished

Checking LDAP ...

LDAP: ... LDAP is disabled in config/gitlab.yml

Checking LDAP ... Finished

Checking GitLab App ...

Database config exists? ... yes Tables are truncated? ... skipped All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Cable config exists? ... yes Resque config exists? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Systemd unit files or init script exist? ... skipped (omnibus-gitlab has neither init script nor systemd units) Systemd unit files or init script up-to-date? ... skipped (omnibus-gitlab has neither init script nor systemd units) Projects have namespace: ... 1/1 ... yes 360/2 ... yes 1/3 ... yes 1/4 ... yes 360/5 ... yes 1/6 ... yes 360/8 ... yes 360/9 ... yes 1/10 ... yes 1/14 ... yes 1/20 ... yes 1/22 ... yes 1/23 ... yes 1/25 ... yes 360/26 ... yes 422/27 ... yes 422/28 ... yes 11/29 ... yes 11/30 ... yes 1/31 ... yes 21/40 ... yes 1/43 ... yes 1/44 ... yes 21/48 ... yes 11/50 ... yes 21/55 ... yes 32/66 ... yes 360/67 ... yes 360/68 ... yes 360/69 ... yes 35/71 ... yes 421/72 ... yes 421/73 ... yes 421/74 ... yes 421/75 ... yes 421/76 ... yes 421/77 ... yes 35/78 ... yes 35/80 ... yes 35/81 ... yes 421/82 ... yes 35/83 ... yes 35/85 ... yes 360/86 ... yes 35/94 ... yes 360/100 ... yes 43/101 ... yes 44/102 ... yes 44/103 ... yes 44/104 ... yes 44/105 ... yes 44/106 ... yes 46/114 ... yes 46/115 ... yes 46/116 ... yes 46/117 ... yes 46/118 ... yes 43/119 ... yes 46/120 ... yes 43/121 ... yes 47/123 ... yes 43/124 ... yes 43/125 ... yes 43/126 ... yes 43/127 ... yes 46/128 ... yes 1/136 ... yes 44/137 ... yes 360/139 ... yes 46/140 ... yes 56/141 ... yes 56/142 ... yes 57/143 ... yes 56/144 ... yes 112/145 ... yes 46/146 ... yes 46/147 ... yes 43/148 ... yes 43/149 ... yes 58/150 ... yes 58/151 ... yes 360/152 ... yes 360/153 ... yes 56/154 ... yes 360/155 ... yes 35/156 ... yes 35/157 ... yes 46/158 ... yes 44/159 ... yes 64/160 ... yes 46/161 ... yes 46/162 ... yes 44/163 ... yes 44/164 ... yes 44/165 ... yes 44/166 ... yes 44/167 ... yes 44/168 ... yes 1/169 ... yes 58/170 ... yes 46/171 ... yes 56/172 ... yes 56/173 ... yes 56/174 ... yes 56/175 ... yes 35/176 ... yes 47/177 ... yes 35/179 ... yes 35/180 ... yes 35/181 ... yes 35/182 ... yes 32/183 ... yes 73/184 ... yes 73/185 ... yes 73/186 ... yes 73/187 ... yes 58/188 ... yes 46/189 ... yes 43/190 ... yes 46/191 ... yes 46/192 ... yes 46/193 ... yes 46/194 ... yes 46/195 ... yes 80/196 ... yes 56/197 ... yes 46/198 ... yes 78/199 ... yes 46/200 ... yes 46/201 ... yes 360/202 ... yes 46/203 ... yes 46/204 ... yes 35/205 ... yes 81/206 ... yes 81/207 ... yes 46/208 ... yes 46/210 ... yes 46/211 ... yes 11/212 ... yes 81/213 ... yes 46/214 ... yes 46/215 ... yes 46/216 ... yes 360/217 ... yes 46/218 ... yes 46/219 ... yes 46/220 ... yes 86/221 ... yes 56/222 ... yes 46/223 ... yes 46/224 ... yes 81/225 ... yes 44/226 ... yes 78/227 ... yes 46/228 ... yes 46/229 ... yes 58/230 ... yes 78/231 ... yes 89/233 ... yes 89/234 ... yes 89/235 ... yes 89/236 ... yes 46/237 ... yes 46/238 ... yes 89/239 ... yes 89/240 ... yes 90/241 ... yes 46/242 ... yes 46/243 ... yes 360/244 ... yes 46/245 ... yes 86/246 ... yes 465/247 ... yes 44/248 ... yes 1/249 ... yes 89/250 ... yes 89/251 ... yes 43/252 ... yes 43/253 ... yes 46/254 ... yes 360/255 ... yes 56/256 ... yes 46/257 ... yes 81/258 ... yes 81/259 ... yes 81/260 ... yes 43/261 ... yes 96/262 ... yes 96/263 ... yes 46/264 ... yes 454/265 ... yes 97/266 ... yes 86/267 ... yes 97/268 ... yes 97/269 ... yes 97/270 ... yes 97/271 ... yes 101/272 ... yes 360/273 ... yes 46/274 ... yes 1/275 ... yes 46/276 ... yes 46/277 ... yes 46/278 ... yes 46/279 ... yes 81/280 ... yes 43/281 ... yes 46/282 ... yes 454/283 ... yes 46/284 ... yes 421/285 ... yes 421/286 ... yes 421/287 ... yes 56/288 ... yes 89/289 ... yes 46/290 ... yes 46/291 ... yes 112/292 ... yes 46/293 ... yes 46/294 ... yes 89/295 ... yes 46/296 ... yes 97/297 ... yes 46/298 ... yes 46/299 ... yes 56/300 ... yes 56/301 ... yes 89/302 ... yes 46/303 ... yes 46/304 ... yes 112/305 ... yes 86/306 ... yes 361/307 ... yes 89/308 ... yes 89/309 ... yes 89/310 ... yes 97/311 ... yes 86/312 ... yes 456/313 ... yes 46/314 ... yes 46/315 ... yes 361/318 ... yes 46/319 ... yes 360/320 ... yes 80/321 ... yes 46/322 ... yes 46/323 ... yes 44/324 ... yes 89/325 ... yes 89/326 ... yes 46/327 ... yes 456/328 ... yes 112/329 ... yes 112/330 ... yes 80/332 ... yes 80/333 ... yes 46/334 ... yes 44/335 ... yes 44/338 ... yes 453/339 ... yes 44/340 ... yes 46/341 ... yes 89/342 ... yes 78/343 ... yes 410/344 ... yes 410/345 ... yes 46/346 ... yes 89/347 ... yes 465/348 ... yes 86/349 ... yes 86/351 ... yes 427/352 ... yes 425/353 ... yes 410/354 ... yes 46/355 ... yes 97/356 ... yes 427/357 ... yes 427/358 ... yes 427/359 ... yes 427/360 ... yes 432/361 ... yes 427/362 ... yes 432/364 ... yes 361/367 ... yes 427/368 ... yes 432/369 ... yes 427/370 ... yes 453/372 ... yes 432/374 ... yes 427/375 ... yes 44/376 ... yes 465/377 ... yes 454/378 ... yes 361/379 ... yes 432/380 ... yes 46/381 ... yes 454/382 ... yes 465/393 ... yes 427/394 ... yes 432/395 ... yes 485/396 ... yes 485/397 ... yes 485/398 ... yes 46/399 ... yes 465/400 ... yes 46/401 ... yes 454/402 ... yes 465/403 ... yes 454/404 ... yes 46/405 ... yes 465/406 ... yes 86/407 ... yes 432/408 ... yes 427/409 ... yes 427/411 ... yes 46/412 ... yes 465/413 ... yes 46/414 ... yes 427/415 ... yes 427/416 ... yes 43/418 ... yes 425/419 ... yes 425/420 ... yes 425/421 ... yes 425/422 ... yes 425/423 ... yes 425/424 ... yes 425/425 ... yes 46/426 ... yes 46/427 ... yes 86/428 ... yes 465/429 ... yes 527/430 ... yes 527/431 ... yes 527/432 ... yes 427/433 ... yes 46/434 ... yes 425/435 ... yes 425/436 ... yes 46/437 ... yes 46/438 ... yes 90/439 ... yes 425/440 ... yes 427/441 ... yes 43/443 ... yes 42/444 ... yes 86/445 ... yes 46/446 ... yes 425/447 ... yes 90/448 ... yes 46/449 ... yes 42/450 ... yes 46/451 ... yes 557/452 ... yes 557/453 ... yes 46/454 ... yes 427/455 ... yes 425/456 ... yes 46/457 ... yes 46/458 ... yes 427/459 ... yes 427/460 ... yes 86/461 ... yes 46/462 ... yes 425/463 ... yes 46/464 ... yes 46/465 ... yes 46/466 ... yes 425/467 ... yes 46/468 ... yes 46/470 ... yes 425/471 ... yes 425/472 ... yes 427/473 ... yes 361/474 ... yes 46/475 ... yes 44/476 ... yes 42/477 ... yes 425/478 ... yes 44/479 ... yes 44/480 ... yes 46/481 ... yes 425/482 ... yes Redis version >= 6.2.14? ... yes Ruby version >= 3.0.6 ? ... yes (3.2.8) Git user has default SSH configuration? ... yes Active users: ... 17 Is authorized keys file accessible? ... yes GitLab configured to store new projects in hashed storage? ... yes All projects are in hashed storage? ... yes Elasticsearch version 7.x-9.x or OpenSearch version 1.x-3.x ... skipped (advanced search is disabled) All migrations must be finished before doing a major upgrade ... skipped (Advanced Search is disabled)

Checking GitLab App ... Finished

Checking GitLab subtasks ... Finished

Edited by 🤖 GitLab Bot 🤖