feat: suppress --append-system-prompt from args display, add Resuming line for --goto#34
Conversation
… line for --goto Co-authored-by: brianruggieri <2104689+brianruggieri@users.noreply.github.com>
brianruggieri
left a comment
There was a problem hiding this comment.
Code reviewed. All 180 tests pass, shellcheck is clean, no Bash 3.2 incompatibilities.
Changes reviewed:
--append-system-promptfiltering from args display: correctly handles the two-element (flag + value) form, which is the only way it entersclaude_args. Edge cases (no args, only--append-system-prompt, mixed args) all covered by tests.Resuming:line for--goto: straightforward, correctly set only whenfind_session_titlesucceeds.assert_not_containstest helper: follows existing pattern.- 5 new tests cover the claimed behavior well.
One minor fix pushed: Removed excess padding on the "Resuming:" label so it aligns with the "Starting:" / "Directory:" group above it rather than the "Dynamic titles:" settings block below.
Note: When fix/status-write-improvements merges, there will be a textual conflict at the end of tests/test-suite.sh (both branches append tests before the Summary section). It's a trivial append conflict to resolve.
There was a problem hiding this comment.
Pull request overview
This PR refines ccp startup output to avoid exposing internal inline-context prompt injection details and to provide clearer feedback when resuming sessions via --goto.
Changes:
- Adds a
Resuming: <title>startup line when--gotosuccessfully restores a session. - Filters
--append-system-prompt(and its value) out of the user-facing “Claude args” startup display. - Extends the shell test suite with
assert_not_containsand new startup messaging tests.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| bin/ccp | Adds restored_title for --goto resumes and filters --append-system-prompt from the printed Claude args. |
| tests/test-suite.sh | Adds assert_not_contains and new tests intended to verify args filtering and --goto resume messaging. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| "${BIN_CCP}" --ai-context --ai-context-strategy inline --no-dynamic "messaging test" \ | ||
| >"${cli_out}" 2>&1 || true | ||
| assert_not_contains "bin/ccp: inline strategy hides --append-system-prompt from args display" \ | ||
| "--append-system-prompt" "$(cat "${cli_out}" 2>/dev/null || true)" | ||
|
|
||
| # Extra user-supplied args should still appear when --append-system-prompt is also injected | ||
| cli_out2="${CLI_TMP_DIR}/startup-inline-extra.out" | ||
| CCP_CLAUDE_CMD=/usr/bin/true CCP_STATUS_PROFILE=quiet \ | ||
| STATE_DIR="${CLI_STATE_DIR}" SESSION_FILE="${CLI_SESSION_FILE}" \ | ||
| "${BIN_CCP}" --ai-context --ai-context-strategy inline --no-dynamic "messaging test" -- --some-flag \ | ||
| >"${cli_out2}" 2>&1 || true | ||
| assert_contains "bin/ccp: extra args still shown when inline strategy active" \ | ||
| "--some-flag" "$(cat "${cli_out2}" 2>/dev/null || true)" | ||
| assert_not_contains "bin/ccp: --append-system-prompt still hidden when extra args present" \ | ||
| "--append-system-prompt" "$(cat "${cli_out2}" 2>/dev/null || true)" |
| # Extra user-supplied args should still appear when --append-system-prompt is also injected | ||
| cli_out2="${CLI_TMP_DIR}/startup-inline-extra.out" | ||
| CCP_CLAUDE_CMD=/usr/bin/true CCP_STATUS_PROFILE=quiet \ | ||
| STATE_DIR="${CLI_STATE_DIR}" SESSION_FILE="${CLI_SESSION_FILE}" \ | ||
| "${BIN_CCP}" --ai-context --ai-context-strategy inline --no-dynamic "messaging test" -- --some-flag \ | ||
| >"${cli_out2}" 2>&1 || true |
Two startup output improvements: the inline AI context system prompt was leaking into the "Claude args" display, and
--gotosession restores gave no confirmation of what was resumed.Summary
--append-system-prompt+ its value from the startup "Claude args" line — keeps internal injection details out of user-facing output while still showing any real user-supplied argsℹ Resuming: <title>in the startup block when--gotosuccessfully matches a saved sessionChanges
bin/ccp: Addedrestored_titlelocal; set on--gotomatch; startup block now shows "Resuming:" when set, and builds a filtereddisplay_argsarray that strips--append-system-promptpairs before printingtests/test-suite.sh: Addedassert_not_containshelper + 5 tests covering: inline hides prompt arg, extra user args still appear,--gotoemits "Resuming:" with correct titleBefore/after for inline strategy with no extra args:
Testing
shellcheck bin/ccp lib/*.sh install.sh uninstall.shpassesbash tests/test-suite.shpasses (170 tests)Checklist
[Unreleased]Original prompt
💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.