Skip to content

fix(ce-sessions): add Pi agent session discovery and parsing#824

Open
xavivars wants to merge 3 commits into
EveryInc:mainfrom
xavivars:fix/ce-sessions-pi-support
Open

fix(ce-sessions): add Pi agent session discovery and parsing#824
xavivars wants to merge 3 commits into
EveryInc:mainfrom
xavivars:fix/ce-sessions-pi-support

Conversation

@xavivars
Copy link
Copy Markdown

Pi stores sessions at ~/.pi/agent/sessions//*.jsonl with a distinct JSONL format not recognized by any of the three session scripts.

  • discover-sessions.sh: add discover_pi() for ~/.pi/agent/sessions/
  • extract-metadata.py: add try_pi() detector (type='session' + cwd field) and Pi message parsing in keyword extraction (type='message' envelope)
  • extract-skeleton.py: add handle_pi() for Pi's message/toolCall/toolResult structure; update auto-detection to recognize Pi sessions first
  • SKILL.md: document Pi as a 4th platform throughout
  • tests: add pi-session.jsonl fixture and Pi coverage across all test suites

Fixes #823

Pi stores sessions at ~/.pi/agent/sessions/<encoded-cwd>/*.jsonl with
a distinct JSONL format not recognized by any of the three session scripts.

- discover-sessions.sh: add discover_pi() for ~/.pi/agent/sessions/
- extract-metadata.py: add try_pi() detector (type='session' + cwd field)
  and Pi message parsing in keyword extraction (type='message' envelope)
- extract-skeleton.py: add handle_pi() for Pi's message/toolCall/toolResult
  structure; update auto-detection to recognize Pi sessions first
- SKILL.md: document Pi as a 4th platform throughout
- tests: add pi-session.jsonl fixture and Pi coverage across all test suites
Copy link
Copy Markdown

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

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: cfd45e32df

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

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

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

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread plugins/compound-engineering/skills/ce-sessions/scripts/extract-skeleton.py Outdated
Comment thread plugins/compound-engineering/skills/ce-sessions/scripts/extract-metadata.py Outdated
Copy link
Copy Markdown

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

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: 485a6216e1

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

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

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

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +283 to +286
for block in (content if isinstance(content, list) else []):
if block.get("type") == "text":
texts.append(block.get("text", ""))
text = clean_text(" ".join(texts))
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Parse string Pi user messages when building skeletons

Pi UserMessage.content can be serialized as a plain string, but handle_pi only iterates content when it is a list, so string-form user prompts are silently dropped from the skeleton. In sessions that use string content, this yields extracted transcripts with little or no problem statement context, which can mis-rank or mis-summarize prior work even though metadata detection succeeded.

Useful? React with 👍 / 👎.

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.

ce-sessions skill does not discover or parse Pi agent sessions

1 participant