[BUG] Agents view: ultracode never reaches dispatched sessions — dropped from --effort during dispatch serialization (children get plain xhigh)

Open 💬 0 comments Opened Jul 9, 2026 by pradeep-mj

Environment

  • Claude Code v2.1.204 (CLI, native install)
  • macOS (Darwin 25.5), terminal TUI

Summary

Ultracode (xhigh effort + standing dynamic-workflow orchestration) cannot be enabled for sessions dispatched from the agents view (claude agents). --effort ultracode works for a directly launched session, but the ultracode bit is silently stripped during dispatch serialization: dispatched children receive at most --effort xhigh, which is not ultracode.

Steps to reproduce

  1. claude --effort ultracode agents — accepted without warning; the agents-view session itself runs ultracode
  2. Dispatch a background session from the agents view
  3. In the dispatched session, run /effort (or check the effort indicator)

Expected: the dispatched session runs ultracode, since that was the launch-time default effort for dispatched sessions.

Actual: the dispatched session runs plain xhigh; ultracode is off.

Also observable on disk: the dispatched job's ~/.claude/jobs/<id>/state.json shows "respawnFlags": [..., "--effort", "xhigh"] — even when ultracode was explicitly enabled inside that session via /effort ultracode, so a daemon respawn drops it again too.

Root cause (traced in the v2.1.204 bundle)

Ultracode rides in two representations: effortValue (always a plain low|medium|high|xhigh|max) and a separate ultracode boolean. The boolean is set only when the raw CLI effort string is literally "ultracode" (ymi: ERr(e)==="ultracode") or merged settings contain ultracode: true. But every dispatch/respawn path serializes only the normalized plain effort value:

  • CLI normalization maps ultracode → xhigh (qGl={ultracode:"xhigh"} via BPn)
  • the dispatch-defaults sanitizer accepts only the five plain values (hYpNke(s) with TI=["low","medium","high","xhigh","max"]), so "ultracode" is silently dropped
  • the effort persister likewise writes only an Nke-valid effortValue into respawn flags

The child therefore launches with --effort xhigh, which does not set the ultracode boolean, and there is no dedicated CLI flag that could carry it.

Workaround (verified on 2.1.204)

Add --settings '{"ultracode": true}' to the claude … agents launch. The agents view forwards --settings verbatim into every dispatched child's argv (--settings is also on the respawn-flags allowlist), and a session launched with that flag reports ultracode active. Caveat: #64817 reports gaps with the ultracode settings key on some surfaces (standing per-turn reminder not injected / dropped after first prompt on desktop).

Suggested fix

Carry the ultracode bit explicitly across dispatch and respawn — e.g. emit the ultracode settings key (or the apply_flag_settings equivalent) into child argv when the dispatch-default effort is ultracode, or let "ultracode" pass through the dispatch-defaults sanitizer and normalize it child-side.

Related: #71774, #72435 (persistent ultracode default), #64817 (settings-key gaps).

🤖 Generated with Claude Code

View original on GitHub ↗