Skip to content

feat(session-context): add --skip option for sub-agent session reads#330

Merged
rhuanbarreto merged 2 commits into
mainfrom
feat/session-context-skip
May 23, 2026
Merged

feat(session-context): add --skip option for sub-agent session reads#330
rhuanbarreto merged 2 commits into
mainfrom
feat/session-context-skip

Conversation

@rhuanbarreto

Copy link
Copy Markdown
Contributor

Summary

  • Adds --skip <n> option to all session-context subcommands (claude-code, cursor, copilot, opencode)
  • When the lessons-learned skill runs as a sub-agent, it creates its own session — the most recent one. Without --skip, the session-context command reads the sub-agent's sparse session instead of the parent's rich development context. --skip 1 bypasses the sub-agent's session and reads the parent transcript.
  • Updates the lessons-learned skill prompts (Claude Code and opencode plugins) to use --skip 1 by default

Test plan

  • All 1127 tests pass (including 8 new skip-specific tests across all 4 editors)
  • All 27 ADR checks pass
  • Lint, typecheck, format, knip, build check all green
  • Reference docs updated (EN + pt-br) with --skip option and example
  • Manual verification: run archgate session-context claude-code --skip 1 with an active session to confirm it reads the second-most-recent session file

rhuanbarreto and others added 2 commits May 22, 2026 11:53
When the lessons-learned skill runs as a sub-agent, it creates its own
session (the most recent one). The session-context command then reads
the sub-agent's sparse session instead of the parent's rich development
context. Adding --skip <n> lets sub-agents skip their own session and
read the parent session transcript via --skip 1.

Changes:
- Add skip field to ReadSessionOptions interface
- Implement skip logic in all 4 session readers (claude-code, cursor,
  copilot, opencode)
- Add --skip <n> CLI option to all session-context subcommands
- Update lessons-learned skill prompts to use --skip 1
- Add tests for skip behavior across all editors
- Update reference docs (EN + pt-br) with --skip documentation

Signed-off-by: Rhuan Barreto <rhuan@barreto.work>
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented May 22, 2026

Copy link
Copy Markdown

Deploying archgate-cli with  Cloudflare Pages  Cloudflare Pages

Latest commit: 80c30a7
Status: ✅  Deploy successful!
Preview URL: https://b81f4703.archgate-cli.pages.dev
Branch Preview URL: https://feat-session-context-skip.archgate-cli.pages.dev

View logs

@rhuanbarreto rhuanbarreto merged commit a3fcdd5 into main May 23, 2026
11 checks passed
@rhuanbarreto rhuanbarreto deleted the feat/session-context-skip branch May 23, 2026 21:45
@archgatebot archgatebot Bot mentioned this pull request May 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant