@@ -593,9 +593,9 @@ func (api *API) tasksList(rw http.ResponseWriter, r *http.Request) {
593593// @Security CoderSessionToken
594594// @Tags Experimental
595595// @Param user path string true "Username, user ID, or 'me' for the authenticated user"
596- // @Paramid path string true "Task ID" format(uuid)
596+ // @Paramtask path string true "Task ID" format(uuid)
597597// @Success 200 {object} codersdk.Task
598- // @Router /api/experimental/tasks/{user}/{id } [get]
598+ // @Router /api/experimental/tasks/{user}/{task } [get]
599599//
600600// EXPERIMENTAL: This endpoint is experimental and not guaranteed to be stable.
601601// taskGet is an experimental endpoint to fetch a single AI task by ID
@@ -605,7 +605,7 @@ func (api *API) taskGet(rw http.ResponseWriter, r *http.Request) {
605605ctx := r .Context ()
606606apiKey := httpmw .APIKey (r )
607607
608- idStr := chi .URLParam (r ,"id " )
608+ idStr := chi .URLParam (r ,"task " )
609609taskID ,err := uuid .Parse (idStr )
610610if err != nil {
611611httpapi .Write (ctx ,rw ,http .StatusBadRequest , codersdk.Response {
@@ -710,9 +710,9 @@ func (api *API) taskGet(rw http.ResponseWriter, r *http.Request) {
710710// @Security CoderSessionToken
711711// @Tags Experimental
712712// @Param user path string true "Username, user ID, or 'me' for the authenticated user"
713- // @Paramid path string true "Task ID" format(uuid)
713+ // @Paramtask path string true "Task ID" format(uuid)
714714// @Success 202 "Task deletion initiated"
715- // @Router /api/experimental/tasks/{user}/{id } [delete]
715+ // @Router /api/experimental/tasks/{user}/{task } [delete]
716716//
717717// EXPERIMENTAL: This endpoint is experimental and not guaranteed to be stable.
718718// taskDelete is an experimental endpoint to delete a task by ID.
@@ -733,7 +733,7 @@ func (api *API) taskDelete(rw http.ResponseWriter, r *http.Request) {
733733return
734734}
735735httpapi .Write (ctx ,rw ,http .StatusInternalServerError , codersdk.Response {
736- Message :"Internal error fetching workspace." ,
736+ Message :"Internal error fetchingtask workspace before deleting task ." ,
737737Detail :err .Error (),
738738})
739739return
@@ -784,10 +784,10 @@ func (api *API) taskDelete(rw http.ResponseWriter, r *http.Request) {
784784// @Security CoderSessionToken
785785// @Tags Experimental
786786// @Param user path string true "Username, user ID, or 'me' for the authenticated user"
787- // @Paramid path string true "Task ID" format(uuid)
787+ // @Paramtask path string true "Task ID" format(uuid)
788788// @Param request body codersdk.TaskSendRequest true "Task input request"
789789// @Success 204 "Input sent successfully"
790- // @Router /api/experimental/tasks/{user}/{id }/send [post]
790+ // @Router /api/experimental/tasks/{user}/{task }/send [post]
791791//
792792// EXPERIMENTAL: This endpoint is experimental and not guaranteed to be stable.
793793// taskSend submits task input to the tasks sidebar app by dialing the agent
@@ -796,7 +796,7 @@ func (api *API) taskDelete(rw http.ResponseWriter, r *http.Request) {
796796func (api * API )taskSend (rw http.ResponseWriter ,r * http.Request ) {
797797ctx := r .Context ()
798798
799- idStr := chi .URLParam (r ,"id " )
799+ idStr := chi .URLParam (r ,"task " )
800800taskID ,err := uuid .Parse (idStr )
801801if err != nil {
802802httpapi .Write (ctx ,rw ,http .StatusBadRequest , codersdk.Response {
@@ -866,17 +866,17 @@ func (api *API) taskSend(rw http.ResponseWriter, r *http.Request) {
866866// @Security CoderSessionToken
867867// @Tags Experimental
868868// @Param user path string true "Username, user ID, or 'me' for the authenticated user"
869- // @Paramid path string true "Task ID" format(uuid)
869+ // @Paramtask path string true "Task ID" format(uuid)
870870// @Success 200 {object} codersdk.TaskLogsResponse
871- // @Router /api/experimental/tasks/{user}/{id }/logs [get]
871+ // @Router /api/experimental/tasks/{user}/{task }/logs [get]
872872//
873873// EXPERIMENTAL: This endpoint is experimental and not guaranteed to be stable.
874874// taskLogs reads task output by dialing the agent directly over the tailnet.
875875// We enforce ApplicationConnect RBAC on the workspace and validate the sidebar app health.
876876func (api * API )taskLogs (rw http.ResponseWriter ,r * http.Request ) {
877877ctx := r .Context ()
878878
879- idStr := chi .URLParam (r ,"id " )
879+ idStr := chi .URLParam (r ,"task " )
880880taskID ,err := uuid .Parse (idStr )
881881if err != nil {
882882httpapi .Write (ctx ,rw ,http .StatusBadRequest , codersdk.Response {