claude-code - 💡(How to fix) Fix [DOCS] Agent view docs omit that `/bg` and `←` keep directories added with `/add-dir`

Official PRs (…)
ON THIS PAGE

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Root Cause

Because the preserved-state list is framed as "Configuration flags from the original launch," a reader can reasonably infer that only startup --add-dir values survive. The v2.1.144 behavior change for /bg and -detach preserving directories added via /add-dir is not documented on the page that teaches those flows.

RAW_BUFFERClick to expand / collapse

Documentation Type

Missing documentation (feature not documented)

Documentation Location

https://code.claude.com/docs/en/agent-view

Section/Topic

From inside a session and the attach/detach guidance for background sessions

Current Documentation

The docs currently say:

Press Enter or on a row to attach when you want the full conversation. The session takes over the terminal exactly as if you had run claude. Press on an empty prompt to detach and return to the table.

To move a session you already have open into agent view, run /bg inside it, or press on an empty prompt to background it and open agent view in one step.

Backgrounding from an interactive session starts a fresh process that resumes from the saved conversation...

Configuration flags from the original launch carry through to the backgrounded session, so its MCP servers, settings, and fallback model remain in effect:

  • --mcp-config and --strict-mcp-config
  • --settings
  • --add-dir
  • --plugin-dir
  • --fallback-model
  • --allow-dangerously-skip-permissions

Related docs also say:

/add-dir <path> ... You can later resume the session from the added directory with --continue or --resume

and:

--continue, -c ... Includes sessions that added this directory with /add-dir

What's Wrong or Missing?

The agent view docs explain that launch-time flags carry through to backgrounded sessions, but they do not say that directories added later with /add-dir are also preserved when you background with /bg or press to detach.

Because the preserved-state list is framed as "Configuration flags from the original launch," a reader can reasonably infer that only startup --add-dir values survive. The v2.1.144 behavior change for /bg and -detach preserving directories added via /add-dir is not documented on the page that teaches those flows.

Suggested Improvement

Add an explicit note in agent-view near the /bg / detach behavior, for example:

Backgrounding also preserves directories added earlier in the session with /add-dir, so the backgrounded session and later --continue / --resume lookups still include those directories.

If the behavior is identical for both /bg and -detach, say that directly on the same page so users do not have to infer it from separate /add-dir, --continue, and session-picker pages.

Impact

Medium - Makes feature difficult to understand

Additional Context

Affected Pages:

PageLine(s)Context
https://code.claude.com/docs/en/agent-view60-65, 258-269/bg and detach are documented, but preserved state is described only in terms of original launch flags
https://code.claude.com/docs/en/commands43-46/add-dir and /background are documented separately, but not tied together
https://code.claude.com/docs/en/cli-reference62, 100--continue and --resume mention sessions that added the current directory with /add-dir
https://code.claude.com/docs/en/sessions35Session picker includes sessions started elsewhere that added the current directory with /add-dir

Total scope: 4 pages affected

Version context: This missing clarification matters for the v2.1.144 change: /bg and -detach now preserve directories added via /add-dir.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING