CCD-CLI 2.1.128+ (Claude Code Desktop remote) does not invoke statusLine in headless sessions despite compiled support

Resolved 💬 3 comments Opened May 11, 2026 by wcurvelo Closed May 15, 2026

Summary

The CCD-CLI runtime (~/.claude/remote/ccd-cli/2.1.128, used by Claude Code Desktop for headless stream-json sessions) does not invoke the user-configured statusLine command, despite the binary containing compiled symbols for that feature.

The regular claude CLI (2.1.131 tested) invokes statusLine correctly. The bug only manifests in CCD-CLI sessions.

Impact

User-side context-awareness tooling that reads from a cache file populated by statusLine becomes silently stale indefinitely in CCD-CLI sessions. We rely on this for context-window warnings (75% / 85% thresholds for save-intermediate / encerrar). Without the cache update, our hook either emits a "stale" warning forever or, worse, presents misleading old context numbers.

This silently breaks any setup where statusLine is the only mechanism populating a downstream artifact.

Reproduction

  1. Configure ~/.claude/settings.json:

``json
{
"statusLine": {
"type": "command",
"command": "bash /home/user/.claude/statusline-marechal.sh"
}
}
``

  1. Make the script write a timestamped file (e.g. ~/.claude/rate-cache.json with ts: $(date +%s))
  2. Open a Claude Code Desktop session in any project (which spawns CCD-CLI)
  3. Use the session normally for hours/days
  4. Observe: rate-cache.json mtime does not update across turns
  5. Verify the script works: echo '{...synthetic payload...}' | bash <script> → updates cache correctly

Empirical findings

CCD-CLI process args (from cat /proc/<pid>/cmdline):

/home/user/.claude/remote/ccd-cli/2.1.128
--output-format stream-json --verbose --input-format stream-json
--effort xhigh --model claude-opus-4-7[1m]
--permission-prompt-tool stdio
--allowedTools ...
--setting-sources=user,project,local
--permission-mode bypassPermissions
--allow-dangerously-skip-permissions
--include-partial-messages
--plugin-dir ...

No --statusline or equivalent flag visible.

Binary string analysis (strings ~/.claude/remote/ccd-cli/2.1.128 | grep -oE "(statusLine|StatusLine|status_line)[a-zA-Z_]*" | sort -u):

StatusLine
StatusLineCommand
statusLine
statusLineText
status_line_mount
status_line_result

This suggests the statusLine feature is compiled into CCD-CLI but the invocation path differs from the regular CLI. The symbols status_line_mount and status_line_result hint that invocation is tied to a UI mount event — which presumably doesn't fire in stream-json headless mode.

Versions

  • claude --version: 2.1.131
  • CCD-CLI binary (running process): 2.1.128
  • OS: Ubuntu 22.04, kernel 5.15.0
  • Settings: only user-level ~/.claude/settings.json defines statusLine; no project-level override

Questions

  1. Is statusLine intentionally disabled in CCD-CLI headless sessions? If so, please document this.
  2. If unintentional, is there a workaround (flag, env var, settings field) to force invocation?
  3. Is there a documented alternative event/hook in CCD-CLI to populate context state per-turn (something analogous to statusLine for headless mode)?

Workaround currently in place

We patched our UserPromptSubmit hook to parse the transcript_path JSONL directly:

  • tail -200 $transcript | jq -sc '[.[] | select(.type=="assistant" and .message.usage != null)] | last'
  • Extract input_tokens + cache_creation_input_tokens + cache_read_input_tokens
  • Detect context window via model string match (*1m*, *[1m]*) or heuristic (total > 195000 → 1M)
  • Compute ctx_pct = total / context_window_size

This works empirically on claude-opus-4-7[1m]. Code available on request.

Would prefer a first-class solution from CCD-CLI side though.

Related

We saw --include-partial-messages in args — perhaps statusLine invocation could be expanded to emit a sidechannel event in stream-json output, allowing downstream tooling to pick it up?

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗