Skip to content

Capture Claude hook permission and system prompt context - #95

Merged
Stephen Belanger (Qard) merged 3 commits into
mainfrom
t3code/fix-linear-sdk-tickets
Sep 23, 2026
Merged

Stephen Belanger (Qard) merged 3 commits into
mainfrom
t3code/fix-linear-sdk-tickets

Conversation

@Qard

@Qard Stephen Belanger (Qard) commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Record Claude hook permission mode on the turn that starts under that mode.
  • Retain the client system prompt as session/root metadata.
  • Document captured Claude content and local-redaction limitations.
  • Cover the SessionStart-to-user-prompt flow and permission-mode changes between turns.

Validation

  • cargo fmt --manifest-path bt-daemon/Cargo.toml --check
  • cargo test --manifest-path bt-daemon/Cargo.toml --all-features --locked
  • make validate-claude

Closes SDK-407
Closes SDK-408

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-23T14:53:01.364469Z 9f89250 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9f892507d1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "Codex (@codex) review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".

Comment thread bt-daemon/src/translate/claude.rs

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we attach permission to every span?

@Qard

Copy link
Copy Markdown
Collaborator Author

Only the root span.

@AbhiPrasad

Copy link
Copy Markdown
Member

should we also attach this to turn spans, and tool calls? If users change permission mode while the session is ongoing.

@Qard

Copy link
Copy Markdown
Collaborator Author

Yep, doing that now. Uncertain about system prompt...does that change with permission mode? Should that be on every turn too?

@AbhiPrasad

Copy link
Copy Markdown
Member

I think system prompt doesn't need to be on every turn. We can always change if something comes up.

@Qard

Copy link
Copy Markdown
Collaborator Author

Yeah, I left system prompt as root-level, just changed the permission mode to be per-turn.

@Qard
Stephen Belanger (Qard) merged commit d95d69f into main Sep 23, 2026
20 checks passed
@Qard
Stephen Belanger (Qard) deleted the t3code/fix-linear-sdk-tickets branch September 23, 2026 15:26
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.

2 participants